3898 Commits

Author SHA1 Message Date
Christopher Tate
be3206ecdc am 5c3e277f: Fix bad alarm delivery
* commit '5c3e277fb42bd799287936c5aee0d30fbcc7e65c':
  Fix bad alarm delivery
2014-12-16 21:04:56 +00:00
Christopher Tate
5c3e277fb4 Fix bad alarm delivery
The man bent over his hourglass,
A programmer of sorts. The day was green.

They said, "You have a blue hourglass,
You do not fire alarms when they're asked."

The man replied, "Alarms as they're asked
are changed within the blue hourglass."

And they said then, "But fire, you must
Alarms beyond us, yet themselves,

Alarms within the blue hourglass
That trigger exactly when they're asked."

 ---

Fix the delivery-fuzzing semantics that had been introduced in
81f9882b5aadd6a2289c9f521a06a7af5f35ebf0.  That patch turned out
to be incomplete; in particular, alarms scheduled later might require
the validity of an already-scheduled kernel alarm even if they did
not affect the head alarm batch directly, and this was not being
addressed.  For now, roll back the fuzzed delivery logic entirely.
(This is not a full revert because that patch also caused exact alarms
to be considered standalone for batching purposes, and we need to
preserve that new policy.)

Bug 18726690
Bug 18765436

This is a 'git revert' of 81f9882b5aadd6a2289c9f521a06a7af5f35ebf0
*except* that this CL preserves the "exact alarms are treated as
standalone" portion of the original patch.

Change-Id: I54c763775877de5b6eeb5617544aa6100bb17526
2014-12-16 12:48:47 -08:00
Mark Renouf
d3adc51a1b If no display settings are matched, return the first one. DO NOT MERGE
Language changes will prevent previously saved display settings from
being loaded. This provides a fallback in the event a single entry exists
but does not match the current (localized) name of the Built-In Display.

BUG: 18130296
BUG: 18190800
Change-Id: Ibeff56045fc5713b9f79707dfb92bafc9fadd84f
(cherry picked from commit cf0f740e39f79da3fc8367c61ed473273248e8c1)
2014-12-12 18:24:58 +00:00
Bart Sears
08c7233451 Merge "Tune delivery and batching of alarms" into lmp-dev
automerge: 3ec6a91

* commit '3ec6a91204ffac6e81eaad7ca29e817e9502f856':
  Tune delivery and batching of alarms
2014-12-12 13:15:38 +00:00
Christopher Tate
a91ef1ec04 Properly recognize repeating wakeup alarms
automerge: 8965a8d

* commit '8965a8da5513cf31a313ecdac3506718c2813932':
  Properly recognize repeating wakeup alarms
2014-12-12 13:14:30 +00:00
Bart Sears
3ec6a91204 Merge "Tune delivery and batching of alarms" into lmp-dev 2014-12-12 01:52:31 +00:00
Christopher Tate
b62aa5530e Tune delivery and batching of alarms
cherry-pick from lmp-mr1-dev

* Inexact alarms no longer coalesce with exact alarms.  The motivation here
is that exact alarms are far more likely to be wall-clock aligned, and in
general pulling all alarms toward wall-clock alignment is a bad idea.

* Wakeup times are now fuzzed within the target batch's allowed window
rather than being hard pinned at the start of the window.

Bug 18631821

Change-Id: Iefaf34eee3f2a6546abefc27e177ee2fdcff935f
(cherry picked from commit 81f9882b5aadd6a2289c9f521a06a7af5f35ebf0)
2014-12-11 23:23:17 +00:00
Christopher Tate
8965a8da55 Properly recognize repeating wakeup alarms
cherry-pick from lmp-mr1-dev

The code in place was inappropriately treating all recurring alarms
as non-wakeup for purposes of deferral.  Worse, it was overriding the
"this deliverable batch of alarms includes a wakeup alarm" bookkeeping,
so could potentially cause inappropriate deferral of even standalone
wakeup alarms.

Bug 18591317

Change-Id: I2a62ed4badcaeb549c1ac4f086014aa829e45427
(cherry picked from commit 864d42eb96a9127b7d2f10ad11e709c24b4b4304)
2014-12-11 23:22:41 +00:00
Filip Gruszczynski
b8c0694ae8 Private Window flag to disable touch events in WallpaperService.
Change-Id: I18b46340f89cbea0b6daeb1efe9c31656f4e1a5d
2014-12-04 15:02:18 -08:00
Narayan Kamath
7377998dac resolved conflicts for merge of a42f7c1d to lmp-sprout-dev
Change-Id: I8e53c9d7e0014b4ffc621c561b737aa2dae5460c
2014-11-26 10:39:08 +00:00
Christopher Tate
7265abe77a Be increasingly aggressive about fstrim if it isn't being run
The current heuristics depend on devices being alive at midnight+ in
order to run periodic background fstrim operations.  This unfortunately
means that people who routinely turn their devices off overnight wind
up with their devices *never* running fstrim, and this causes major
performance and disk-life problems.

We now backstop this very-friendly schedule with an increasingly
aggressive one.  If the device goes a defined time without a background
fstrim, we then force the fstrim at the next reboot.  Once the
device hits the midnight+ idle fstrim request time, then we already
aggressively attempt to fstrim at the first available moment
thereafter, even if it's days/weeks later without a reboot.

'Available' here means charging + device idle.  If the device never
becomes idle then we can't do much without rendering an in-use device
inoperable for some number of minutes -- but we have no evidence of
devices ever failing to run fstrim due to this usage pattern.

A new Settings.Global element (type 'long', called
"fstrim_mandatory_interval") is the source of the backstop time.  If
this element is zero or negative, no mandatory boot-time fstrim will
ever be performed.  If the element is not supplied on a given device,
the default backstop is 3 days.

Adds a new string to display in the upgrading dialog when doing
the fstrim.  Note it is too late for this to be localized, but since
this operation can take a long time it is probably better to have
it show *something* even if not localized, rather than just sit there.

Bug 18486922

Change-Id: I5b265ca0a65570fb8931251aa1ac37b530635a2c
2014-11-25 16:35:06 -08:00
Jeff Brown
694c1d2b2d Merge "Support keeping activities resumed while dozing." into lmp-sprout-dev 2014-11-21 00:54:05 +00:00
Jeff Brown
fbe96706bb Support keeping activities resumed while dozing.
If the lock screen is not shown, then let activities keep running
while dozing.  This is important to support ambient mode on watches
since it allows the home app to keep running.

To make this possible, we need to inform the activity manager about
the exact wakefulness state, not just the overall boolean
interactive state.

Bug: 18284212
Change-Id: Ia35c99127ce51ffc178f3a2f51fca67d24061c71
2014-11-20 16:49:18 -08:00
Geoffrey Borggaard
90ed95faed am c3f5d718: Merge "Fix null handling in proxies." into lmp-dev
* commit 'c3f5d7183a21cb081bab1a6bca3fc115523e4e78':
  Fix null handling in proxies.
2014-11-20 20:59:00 +00:00
Geoffrey Borggaard
79adc958e5 Fix null handling in proxies.
ProxyInfo.getPacFileUrl() can not be null.  It will be equal to
Uri.EMPTY.  Checking for null was causing global proxies to never be
disabled.  Or more accurately, global proxies would be disabled, but
would reappear after a reboot.

ProxyInfo.getExclusionListByString() can be null.  If no
exclusion list was specified, the proxy settings would not be
successfully saved, they would disappear after reboot.

Bug: 18453223
Change-Id: I1c27e5dca5b9664bb7468ea909bff489fa110a07
2014-11-20 19:48:20 +00:00
Prashant Malani
fb26a2c80b Merge "Don't animate screen brightness if there is a pending off transition" into lmp-sprout-dev 2014-11-15 09:46:33 +00:00
Craig Mautner
33d92c5678 Use package name as custom resolver process name
The process name was being assigned null. This meant that after the
process attached we weren't matching the name in
ActivityStackSupervisor.attachApplicationLocked(). That meant missing
the call to realStartActivityLocked() and then the resolver didn't
start until window manager timed out and resumeTopActivity was
called five seconds later.

Fixes bug 18301267.

Change-Id: If3721caeebb309c6054150b2f707e3d6e38a74d2
2014-11-14 15:09:54 +00:00
Prashant Malani
33538249f2 Don't animate screen brightness if there is a pending off transition
When the DisplayPowerRequest policy is POLICY_OFF, a screen state
transition animation to DISPLAY_OFF is intiated. However, in
updatePowerState() the screen brightness setting, based on the current
display state, is set to normal brightness and an animation is
triggered. This causes a transient flash on some devices, which are
transitioning from a dimmed screen to screen off.

This change checks for a pending screen off transition before
triggering a screen brightness animation, to prevent the flashes.

Bug: 18136235
Change-Id: I37f9fb28b3ec8a4fdbb45920c40d25ebd50c220b
2014-11-13 15:23:27 -08:00
Jeff Brown
24c1d664c4 Merge "Remove an unnecessary condition from previous change." into lmp-sprout-dev 2014-11-13 07:04:54 +00:00
Jeff Brown
a191aa99ab Remove an unnecessary condition from previous change.
Change-Id: Ib966fbb373294ad60caf7f1d9cbb7fafd05ded6b
2014-11-12 23:01:12 -08:00
Jeff Brown
1cbff0e310 Merge "Improve screen brightness boost behavior." into lmp-sprout-dev 2014-11-13 06:58:03 +00:00
Jeff Brown
7b5be5e2a7 Improve screen brightness boost behavior.
Wake-up when entering brightness boost mode, don't boost in ambient
mode since some display device drivers do strange things in that mode and
boost doesn't work.  Waking up feels more natural as well.

Don't flutter the power HAL's interactive mode bit simply due to changes
in display ready state since that may result in visible artifacts
such as display flashes.

Don't stop the auto-brightness sensor while temporarily boosted.

Don't prevent the display from entering the ready state while in brightness
boost since that would unnecessarily delay the transition from DOZING to AWAKE
until boost is finished.

Restart the user activity timeout when brightness boost ends and prevent
the display from dimming while boosted.

The pixel fairies basked in the sunlight.

Bug: 18262044
Bug: 18261782
Change-Id: I8c42a1e6091b0fe1253e90265ac248087ebc24e1
2014-11-12 18:49:36 -08:00
Jeff Sharkey
2e7000040e am d68b87cd: Recover apps with malformed certificates.
* commit 'd68b87cdd402d46013170d9316a31c82be4e4816':
  Recover apps with malformed certificates.
2014-11-12 22:20:46 +00:00
Jeff Sharkey
d68b87cdd4 Recover apps with malformed certificates.
There was a window of time in Lollipop where we persisted certificates
after they had passed through a decode/encode cycle.  The well-written
OpenSSL library was liberal when decoding (allowing slightly malformed
certs to be parsed), but then strict when encoding, giving us
different bytes for effectively the same certificate.

A related libcore change (0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)
now returns the original bytes verbatim, fixing both pre-Lollipop
installs and installs after that change.

This change recovers any apps that had been installed during the
window of time described above by doing a one-time check to see if
the certs are effectively equal.

Bug: 18228011
Change-Id: Ib82bd6db718d0490d7a26c9c1014b7c8457a7f2d
2014-11-12 13:16:06 -08:00
Andres Morales
f33d9db43a am b1477d11: Merge "[DO NOT MERGE] Increase min free levels for cached processes on 64bit" into lmp-dev
* commit 'b1477d11ca873db761dd378a5fea93b26d695f78':
  [DO NOT MERGE] Increase min free levels for cached processes on 64bit
2014-11-06 23:57:25 +00:00
Andres Morales
b1477d11ca Merge "[DO NOT MERGE] Increase min free levels for cached processes on 64bit" into lmp-dev 2014-11-06 23:51:00 +00:00
Andres Morales
423c44dc91 [DO NOT MERGE] Increase min free levels for cached processes on 64bit
Requires less memory pressure to start killing cached
processes.

Change-Id: Ia02f5aee115535badc900330b9361f0099203e4f
2014-11-06 15:44:02 -08:00
Jeff Hao
2a83226c75 Merge "Change boot screen title to "Android is starting" when not upgrading." into lmp-sprout-dev 2014-11-06 20:45:01 +00:00
Paul Lawrence
3bde026aeb am afb6b50e: Merge "DO NOT MERGE: Don\'t log passwords returned from vdc" into lmp-dev
* commit 'afb6b50e824153de5e2f0c4d49dd95fde79fa04f':
  DO NOT MERGE: Don't log passwords returned from vdc
2014-11-06 17:14:35 +00:00
Paul Lawrence
70c9a06af0 DO NOT MERGE: Don't log passwords returned from vdc
Turns off logging of responses from native daemon connector altogether.
Proper solution to follow in LMP MR1

Bug: 18260068
Change-Id: I25bc9cb61049a3efdd9a9cd11195864a04ef05fd
2014-11-05 19:07:57 -08:00
Jeff Hao
2e594cfe98 Change boot screen title to "Android is starting" when not upgrading.
Bug: 17565501
Bug: 18247218

(cherry picked from commit 9f60c08a446e38f9e2d5271546ef69ca5941eba9)

Change-Id: I1ec32b318b6221277fc3ffbc19966bf3330c2d93
2014-11-05 23:51:42 +00:00
Casey Burkhardt
2997285f36 Merge "Disable circular display mask with color inversion" into lmp-sprout-dev 2014-11-03 16:55:27 +00:00
Jeff Brown
e333e674a7 Add a function to boost screen brightness temporarily.
When PowerManager.boostScreenBrightness() is called, the screen
brightness is set to maximum for 5 seconds.  This action is
also considered to be user activity.

Bug: 17934954
Change-Id: I1cb4a03a60705c6c1c5cc9ff84b1c5dbd2932fcd
2014-10-31 18:45:11 -07:00
Casey Burkhardt
87023b8eea Disable circular display mask with color inversion
Causes WindowManagerService to only add a circular display mask on
qualified devices if the accessibility display color inversion
feature is turned off.  When enabled, this causes a visual artifact.

Bug:18120660
Change-Id: I0b1ac08487098942e2e0dd2794905e845a70c1bc
2014-10-28 16:25:06 -07:00
Jason Monk
07faf0e1a1 Add missing passive discovery flag
automerge: 4444c5b

* commit '4444c5b27874866f18cd8f4abb8914cc17857ea7':
  Add missing passive discovery flag
2014-10-28 00:52:56 +00:00
Jason Monk
4444c5b278 Add missing passive discovery flag
MediaProjectionManagerService had an active media callback which
was causing a service to be bound 100% of the time.  Adding a
passive flag makes it only observe events, and allow the service
to only be bound when needed by apps requesting active discovery.

Bug: 18042409
Bug: 17969854
Change-Id: I1bfa6609e2aa507ee2ce227de50f0e5ae951e000
2014-10-27 19:25:50 -04:00
Paul Lawrence
0e6178b81e am c220d8e5: Stop crypto UI from crashing during encryption
* commit 'c220d8e57ca97c70db1fd72f040bd6c6f70bbf13':
  Stop crypto UI from crashing during encryption
2014-10-24 20:08:33 +00:00
Paul Lawrence
c220d8e57c Stop crypto UI from crashing during encryption
Don't try to read crypto meta data during this time

Bug: 18037893
Change-Id: I3628572b3b90e6fc0a7c71089b447fb0e5303ee9
2014-10-24 10:37:40 -07:00
Craig Mautner
5cd68ee4df Merge "Cherry pick task movement changes from aosp" into lmp-sprout-dev 2014-10-22 20:38:06 +00:00
Bryce Lee
f03ba4f13b Merge "[Theater Mode] framework implementation through global setting" into lmp-sprout-dev 2014-10-22 20:33:08 +00:00
Craig Mautner
cbd84af39a Cherry pick task movement changes from aosp
The following cherry picks from aosp contain code that keep windows
tracking the task movement.

https://android-review.googlesource.com/#/c/111380/
https://android-review.googlesource.com/#/c/109930

Maybe fixes bug 15729183.

Change-Id: Ida69fe365b06025d119e32b22a8d04958cdbabf3
2014-10-22 13:28:40 -07:00
Bryce Lee
584a445179 [Theater Mode] framework implementation through global setting
Bug: 17684570
Change-Id: I64a9c9c0620049cdfcca0150648fa201281f7178
2014-10-21 15:55:55 -07:00
Jinsuk Kim
5c0f472d82 CEC: Add missing protections for some HdmiControlService API - DO NOT MERGE
A few methods are found to be missing protection with system permission.
Add enforceAccessPermission() like other methods.

Bug: 17408780

Change-Id: I58a336b5cc9df2d195bdfe7b928898dde5ff169f
(cherry picked from commit b22d9ee0a364b10d488dd6a2e8ba69d5ca7f6258)
2014-10-21 21:57:34 +00:00
Adrian Roos
c19586a805 am 7b4a38b1: Delay discovery of system trust agents
* commit '7b4a38b197ce43cb286d80fc6c4e9713b2807f13':
  Delay discovery of system trust agents
2014-10-21 21:43:05 +00:00
Adrian Roos
7b4a38b197 Delay discovery of system trust agents
Waits for BOOT_COMPLETED when enabling system trust agents.
This fixes an issue where no agents were discovered because the
packages were not ready after an OTA.

Bug: 18065140
Change-Id: Ibff9948e1536e07f868d6b29f432923a137091e6
2014-10-21 17:07:41 +02:00
Griff Hazen
1aad144c8f Disable zen log printouts by default
Bug: 18056528
Change-Id: I77359476ff2f67027383fcdb91d2843d040533c7
2014-10-20 14:02:59 -07:00
Svetoslav
ebb38bcc03 am cd2b54e6: Merge "Accessibility no longer overrides strong encryption." into lmp-dev
* commit 'cd2b54e6e546099e028f9e41966ab7cf1deedd3c':
  Accessibility no longer overrides strong encryption.
2014-10-17 23:04:12 +00:00
Svetoslav
a6711ff6f0 Accessibility no longer overrides strong encryption.
Updating the accessibility layer behavior to reflect the new
model where accessibility no longer overrides strong encryption.
Now enabling an accessibility service lowers the encryption
level but the user can bump it up in settings if desired.

bug:17881324

Change-Id: Ic60d760c267d3f934040a42e1963b179bd8b9f5f
2014-10-17 14:33:11 -07:00
Lorenzo Colitti
d04d6c91a3 am b7d85148: Merge "Allow root and system to bypass the always-on VPN firewall rules" into lmp-dev
* commit 'b7d8514822aefbf8274f5464dc12cee151e2b78b':
  Allow root and system to bypass the always-on VPN firewall rules
2014-10-16 09:23:24 +00:00
Lorenzo Colitti
ffd7335088 am 917c547b: Merge "Don\'t make lockdown VPN source firewall rules over-broad." into lmp-dev
* commit '917c547beb9adecf2e7d2b355e85e37c2557c5d3':
  Don't make lockdown VPN source firewall rules over-broad.
2014-10-16 09:23:21 +00:00