3692 Commits

Author SHA1 Message Date
Dianne Hackborn
b591da942e Merge "Maybe fix issue #17449495: Nakasi is pretty laggy/slow to do anything" into lmp-dev 2014-10-03 00:40:26 +00:00
Dianne Hackborn
3f16dd49e8 Maybe fix issue #17449495: Nakasi is pretty laggy/slow to do anything
Tweak the oom tuning to raise everything by 50%.  This is the same
increase we did for Volantis; I am thinking that most of the issue
there was not it being 64 bit, but it being tighter on RAM.  From
my testing, it looks like in user switching there was some paging
going on with Nakasi, and with this change things seem to be better.

We should probably revisit this for future work on RAM.  It seems
likely that a 64 bit device will need more RAM, so probably the value
I am picking here is larger than we actually need for other devices.
I think this is the safest change at this point though -- it leaves
Volantis the same, where we already had tweaked it to address paging
issues, raises it on Nakasi (to the same value as Volantis) where we
seem to have paging issues, and on our other devices also raises it
but those are generally not under memory pressure so this shouldn't
really make a difference.

Change-Id: Ib19394068734d322a015ed07370d9d4961877e4b
2014-10-02 17:21:27 -07:00
Jason Monk
5190063952 Merge "Synchronize on all sendProxyBroadcast calls" into lmp-dev 2014-10-02 22:36:47 +00:00
Baligh Uddin
9cdde5f834 Merge "Fix a bug with screen brightness during screen off animation." into lmp-dev 2014-10-02 21:38:25 +00:00
Matthew Williams
5c6756fefb Revert "Protect LOGIN_ACCOUNTS_CHANGED receiver in SyncManager"
This reverts commit cf2bd348e73e880fe5bfc7a025732d4ec606ff1f.

Reverted because for account removal the AccountManagerService
delegates the sending of LOGIN_ACCOUNTS_CHANGED to the authenticator.
See b/17511110.

Change-Id: Ic03016af98070b4add5f7a5ec1fdff32ba63298e
2014-10-02 20:47:59 +00:00
Jing Ji
d594197868 Allow system app to take ownership of built-in permissions
Previous commit bfed9f34c makes the preloaded system app take
precedence over third-party apps when defining permissions, but
it also makes it be able to override android built-in permissions.

Now allow preloaded system app to take the ownership of built-in
permissions instead of overriding it.

Change-Id: I10d588d0284e4316ea4be552fd6191f33e3c725b
2014-10-02 20:40:21 +00:00
Craig Mautner
9dfad8c7f0 Merge "Remove misleading error log." into lmp-dev 2014-10-02 20:13:55 +00:00
Jeff Brown
bf4e414cf0 Fix a bug with screen brightness during screen off animation.
Due to a recent change there was a regression that caused the
screen brightness to be animated down to 0 while the screen
off animation was running.  When the brightness was low this
would cause the screen off animation to be cut short.

This change ensures that we take into account the actual screen
state instead of the desired screen state when making screen
brightness decisions in case we are in the middle of a transition.

The darkness came early.  The pixel fairies trembled.

Bug: 17718416
Change-Id: Ib4b55d61b359abbc70920e324f08a5db07bdd035
2014-10-02 13:11:02 -07:00
Jason Monk
cf0f97a3aa Synchronize on all sendProxyBroadcast calls
To avoid race conditions.  Also make mDefaultProxy volatile for
safety.

Bug: 17697364
Change-Id: I8f0abb1a6e1c816f3addc11a69ff794ad767f2cf
2014-10-02 15:39:38 -04:00
Craig Mautner
333c2ec883 Remove misleading error log.
It's perfectly ok for a secondary display to not have a home stack.
There is no reason to report it.

Related to b/17677973.

Change-Id: Ia9d52cabb601760d32d2b847dfa0ca4f304e4e2a
2014-10-02 12:24:02 -07:00
Sreeram Ramachandran
e4a05afe85 Send app permissions to netd.
Based largely off Robert's http://ag/546170 (thanks!)

Bug: 15413737
Change-Id: I8a1f0a184923c4c0a4935e6b88895bcc05e39f02
2014-10-01 20:22:34 -07:00
Dianne Hackborn
c338784bf6 Merge "More work on issue #17656716: Unhandled exception in Window Manager" into lmp-dev 2014-10-02 00:23:18 +00:00
Erik Pasternak
4d82c46ef5 Merge "Implement auto-sleep functionality." into lmp-dev 2014-10-02 00:00:40 +00:00
Dianne Hackborn
8d05172112 More work on issue #17656716: Unhandled exception in Window Manager
Fix Slog.wtf to not acquire the activity manager lock in its code
path, so that it can never deadlock.  This was the original intention
of it, but part was missed.

Now we can put back in the code to detect when strict mode data is
getting large (a little more targeted now to the actual problem),
and use Slog.wtf to report it.  And as a bonus, when this happens
we will now clear all of the collected violations, to avoid getting
in to the bad case where IPCs start failing.  So this should be
good enough for L to fix the problem, with wtf reports for us to
see if the underlying issue is still happening.

Finally, switch a butch of stuff in the system process from Log.wtf
to Slog.wtf, since many of those are deadlocks waiting to happen.

Oh and fix a crash in the settings provider I noticed in APR.

Change-Id: I307d51b7a4db238fd1e5fe2f3f9bf1b9c6f1c041
2014-10-01 16:58:56 -07:00
Dianne Hackborn
c3e7f87bf9 Merge "Fix issue #17740687: Device does not boot after flashing LMP dev TOT(1478825) build." into lmp-dev 2014-10-01 23:29:49 +00:00
Dianne Hackborn
144508d5da Merge "Revert white space changes." into lmp-dev 2014-10-01 23:21:11 +00:00
Winson Chung
7f76e50562 Merge "Fixing invalid check to get component enabled state. (Bug 17679693)" into lmp-dev 2014-10-01 22:53:29 +00:00
Dianne Hackborn
9449a6162e Fix issue #17740687: Device does not boot after flashing LMP dev TOT(1478825) build.
There was a path through idle where we could clear mBooting but not set
mBooted, so we would no longer start activities.  This is probably happening
because if you start a user or userdebug build with the device plugged in
to adb, the system early on starts the USB security dialog, before home is
started.  If that goes idle first, we will end up in the case where we
clear booting (because something went idle) but not set booted (because it
was not home that went idle).

Change this so that we always set booted when clearing booting.

Change-Id: I40053710eefa939315aeb9475ecdd2e8a87351ff
2014-10-01 15:53:28 -07:00
Dianne Hackborn
01945f240a Revert white space changes.
Change-Id: I3bc9995adf5cefd91f5a9fd4d2a701056dba3ca9
2014-10-01 15:14:28 -07:00
Winson Chung
dcf21d1545 Fixing invalid check to get component enabled state. (Bug 17679693)
Change-Id: I225d59bf766122d667d990d7e5b1971c6e8af2aa
2014-10-01 15:04:16 -07:00
Jeff Brown
05af6adb8d Implement auto-sleep functionality.
Added a new SLEEP_TIMEOUT setting which governs how long the device will
remain awake or dreaming without user activity.  By default this
value is set to -1 which maintains today's existing behavior.

We basically represent the time we are allowed to be dreaming as a new
kind of user activity summary state called DREAM, similar to BRIGHT
and DIM.  When the sleep timeout expires, the state is cleared and
the dream ends.

Bug: 17665809
Change-Id: I59aa7648dcec215f1285464fc1134934a09230e5
2014-10-01 15:01:10 -07:00
Craig Mautner
245645ca46 Merge "Don't clear visible-behind activity if it is top" into lmp-dev 2014-10-01 17:48:14 +00:00
Craig Mautner
64ccb70867 Don't clear visible-behind activity if it is top
Previously if an activity requested to keep running behind
translucent activities (Activity.requestVisibleBehind()) and then
converted itself to opaque (Activity.convertFromTranslucent()), we
would clear the visible-behind activity. This change tests to see
if the top activity is the visible-behind activity and does not
clear it in that case.

This change also clears the visible-behind activity whenever it
comes back to the front. That forces the activity to call
requestVisibleBehind() each time it is resumed.

Fixes bug 17648436.

Change-Id: Id0fc4d7e2a2b907675305d98bad1b08cb610919e
2014-10-01 10:14:53 -07:00
John Spurlock
c909e1b2df Zen: Fix new event category check.
Allow events through if configured, and use a switch
for separating mode-specific logic.

Bug:17580878
Change-Id: Id7b5d8b50173015d6a78568ed0a90e0bccf98549
2014-10-01 11:17:43 -04:00
Brian Carlstrom
7123bd690f Merge "Use VMRuntime.isBootClassPathOnDisk" into lmp-dev 2014-10-01 04:21:26 +00:00
Jeff Brown
62434d6a4b Merge "Reduce latency from doze to screen on." into lmp-dev 2014-10-01 02:31:30 +00:00
Dianne Hackborn
62321ab114 Merge "Maybe fix issue #17700474: manta: high occurrence of device booted..." into lmp-dev 2014-10-01 01:16:15 +00:00
Dianne Hackborn
7622a0f8e4 Maybe fix issue #17700474: manta: high occurrence of device booted...
...but dev.bootcomplete flag is not set

Rework things to address a few issues I found:

- When the activity goes idle, the way we were handling finishing the
  boot there was calling finishBooting() with the lock held, but it
  shouldn't.  We now dispatch that and turning on the screen together
  in a separate message.

- Make sure we don't try to start the home activity until we have
  reached the point of the system being ready and mBooting being set.
  This ensures we don't do any work prematurely.

Change-Id: If30c1f287af73bc2164e7aadbe98022ae42cc5e7
2014-09-30 18:05:18 -07:00
Jeff Brown
0a434776b8 Reduce latency from doze to screen on.
Don't wait for the brightness ramp to complete before reporting
display ready.  Keep track of whether we have any unfinished
brightness changes and take care to grab a wakelock to ensure
they are eventually applied.

Ideally we would rewrite the whole state machine to more carefully
coordinate screen state and brightness changes but that's too
risky for now.

The pixel fairies are having a bad day.

Bug: 17718416

(cherry picked from commit 875f80c2732a3fbe652a6e8fc14031041f791308)

Change-Id: I7a2d8ba4591a12b773653d3dbf86c7db016f967e
2014-09-30 18:00:40 -07:00
Brian Carlstrom
a39871ef5e Use VMRuntime.isBootClassPathOnDisk
Bug: 17679443
Change-Id: If53c236058a7237d735c2344a715cf0a36301f9b
2014-09-30 16:49:32 -07:00
Winson Chung
86ef70eb08 Fixing build (Bug 17381033)
Change-Id: I95a7c8167f82a4fe982bdc9588d5fbaf5a627d0b
2014-09-30 16:17:12 -07:00
Winson Chung
c12f574574 Merge "Fixing an issue with leaking starting windows. (Bug 17657878)" into lmp-dev 2014-09-30 22:48:43 +00:00
Craig Mautner
4fb4163f4c Merge "Call Surface.release() for starting windows" into lmp-dev 2014-09-30 22:47:05 +00:00
Winson Chung
c11b19caef Fixing an issue with leaking starting windows. (Bug 17657878)
In some cases, when starting an animation while another starting window is visible,
the starting window is never scheduled to be removed.  In that case, we try and
schedule the closing app starting window to be removed when we are starting the
transition to a new activity.  This also partially addresses issues related to
leaking windows in b/17381033.

Change-Id: Id26525cd71380852f109ec2f55a4a60db5086ded
2014-09-30 22:21:26 +00:00
Craig Mautner
49a2edf92a Call Surface.release() for starting windows
If the window maanger received BinderDied for a starting window
before activity manager then it would null
AppWindowToken.startingWindow and not go through the
PhoneWindowManager.removeStartingWindow call later. That meant that
Surface.release() was never called from
ViewRootImpl.dispatchDetachedFromWindow(). Which in turn meant that
graphics memory was being leaked.

This change notifies the PhoneWindowManager to go through the
removeStartingWindow path when the starting window gets removed for
any reason.

This change also ensures that scheduleRemoveStartingWindow is
always called with the window manager lock held.

Fixes bug 17381033.

Change-Id: Ic6860d0e1410c9bb5053d85ae21a08b11f573b6d
2014-09-30 15:05:37 -07:00
Jeff Sharkey
b27d43a880 Merge "Clear ident when obtaining provider across users." into lmp-dev 2014-09-30 21:10:49 +00:00
Jeff Sharkey
c0322ecda5 Clear ident when obtaining provider across users.
When calling getContentProvider() across user boundaries, and
creating the provider for the first time, we need to clear caller
identity.  (We could have torn down the provider while the system
was under memory pressure.)

Bug: 17409650
Change-Id: I67713a03e5f7106f5e8fcf33fe3fdae81ce644ec
2014-09-30 14:01:32 -07:00
Svetoslav
44d4eeaa48 Merge "Use default encryption password if an accessibility service is enabled." into lmp-dev 2014-09-30 20:01:04 +00:00
Svetoslav
16e4a1aade Use default encryption password if an accessibility service is enabled.
When device is encrypted the user has to authenticate in order to decrypt
the data partition which is required for running accessibility services
and Text-To-Speech. In order to address this issue we are falling back
to use the default password if there is an enabled accessibility service
and the user has secure lock. This will enable the user to authenticate
when accessibility layer is completely functional.

bug:17671790

Change-Id: Iafffe7bcd234008cf91ffb5011b21b803dca227a
2014-09-30 13:00:11 -07:00
Matthew Williams
bc156ba430 Merge "Fix deadlock caused by clearAllBackoffs in SSE" into lmp-dev 2014-09-30 03:09:10 +00:00
Lorenzo Colitti
d8f7e04828 Merge "Update LegacyTypeTracker state before sending connect broadcasts." into lmp-dev 2014-09-30 03:05:49 +00:00
Jean-Michel Trivi
4a154af9aa Merge "Send volume keys to the default stream if not actually playing" into lmp-dev 2014-09-30 00:11:14 +00:00
RoboErik
165809b331 Send volume keys to the default stream if not actually playing
This ensures that we'll only adjust volume on a session's stream if
that stream is actually in use.

bug:17690423
Change-Id: I5fce8265a015bbc5034afa16719d9a0bbf257598
2014-09-29 14:43:10 -07:00
RoboErik
9eef5bf8d1 Merge "Be more paranoid about threading in MediaSessionRecord" into lmp-dev 2014-09-29 20:48:11 +00:00
RoboErik
df382cada1 Be more paranoid about threading in MediaSessionRecord
This makes copies of objects with bundles before posting to another
thread and is more aggressive about locking before making assignments
of mutable objects.

bug:17692568
Change-Id: I28e8229718b862c485e870fd2ca06a3a18a7c454
2014-09-29 13:21:47 -07:00
John Spurlock
39838b98f1 Merge "Zen: Fix downtime calculation for Sunday mornings." into lmp-dev 2014-09-29 20:04:47 +00:00
John Spurlock
d8826bcb2b Zen: Fix downtime calculation for Sunday mornings.
Previous calculation would always exit downtime on Sunday mornings,
due to the target day ending up at zero (an invalid day).

Bug:17682999
Change-Id: Icc5f01a42c3c644170eea9e60442cf77ce15a06c
2014-09-29 15:39:04 -04:00
Christoph Studer
f7c4509ffb Merge "NoMan: Evaluate all contacts matching EXTRA_PEOPLE URI" into lmp-dev 2014-09-29 16:13:29 +00:00
Christoph Studer
9ffa50096f NoMan: Evaluate all contacts matching EXTRA_PEOPLE URI
Bug: 17660485
Change-Id: I8684067538fcd2d43a9f95c6aa707b275b13ee40
2014-09-29 18:08:26 +02:00
Paul Jensen
89e0f0937a Move mobile provisioning APN support into telephony.
Most of this logic is simply removed from ConnectivityService.
The captive portal detection is now done by the NetworkMonitor.
The notification logic is still left in ConnectivityService as
it's used by both the NetworkMonitor and telephony's mobile
provisioning logic.

bug:17324098

Change-Id: Ibd1c42b1a75795f90a6483d3d0a5a14f88b193d8
2014-09-29 11:37:43 +00:00