3714 Commits

Author SHA1 Message Date
Dianne Hackborn
7f7d240b13 Merge "Fix issue #17752399: Multiple apps broken by GET_TASKS permission change" into lmp-dev 2014-10-06 18:48:34 +00:00
Yuncheol Heo
71c4578def Merge "CEC: Reset active source status on routing control" into lmp-dev 2014-10-06 16:16:47 +00:00
Jinsuk Kim
995fcfc591 CEC: Reset active source status on routing control
Set active source status to false when broadcast routing control
commands indicate other device is about to be the new active source.

Bug: 17840270
Change-Id: I176e21ec8789624e29421b912ba641a21f0f5f21
2014-10-06 14:53:07 +09:00
Jeff Sharkey
4c88087776 Merge "Recover from missing upgrade to system package." into lmp-dev 2014-10-06 04:01:34 +00:00
Jeff Sharkey
1c13310577 Recover from missing upgrade to system package.
When a system app has been upgraded, we mark the built-in version as
disabled, and skip it when parsing built-in apps, since we expect
the userdata version to be scanned a few moments later.

However, in very rare cases we can end up missing the expected
userdata version, and we'd end up dropping the package entirely, even
though we have a built-in version to fall back to.  This change
handles that case by rescanning and enabling the built-in version when
the userdata version never materializes.

Also include critical log messages in check-in dumpsys to help track
down how we ended up in this state.

Bug: 17805839
Change-Id: I9971f882f9bb8ab7934c20b04e0b72366c4d04d0
2014-10-05 14:12:45 -07:00
Jeff Sharkey
3438bc1bfd Merge "Correctly rollback failed system app installs." into lmp-dev 2014-10-05 01:06:28 +00:00
Jeff Sharkey
914bd793b3 Correctly rollback failed system app installs.
Fix bug where we disabled system app, but never turned it back on
when the scanPackageLI() failed.

Bug: 17805839
Change-Id: I73999263aee703af187afd980fa0d0ce8451cf0c
2014-10-03 16:48:11 -07:00
Robert Greenwalt
f393e4910b Merge "Switch the NetworkInfo.mIsAvailable default" into lmp-dev 2014-10-03 23:41:55 +00:00
Dianne Hackborn
2d7576b082 Fix issue #17752399: Multiple apps broken by GET_TASKS permission change
Keep around GET_TASKS as a permission available to apps, so apps still
think they have it and don't get all uppity because they don't.

Add a new REAL_GET_TASKS that is the actual permission now.

Plus some temporary compatibility code until everyone can transition
fromn GET_TASKS to REAL_GET_TASKS.

Change-Id: I12c1102eed24844685dcbd2fa3b612811603958f
2014-10-03 16:26:04 -07:00
Robert Greenwalt
483d1fb3a6 Switch the NetworkInfo.mIsAvailable default
The placeholder for disconnected networks was setting it to false, but
this technically means that we know an attempt to connect to that
network will fail (which we don't really now).  Some applications use
this an decide not to bother trying - an MMS app for example would
never send an MMS because it thinks the network is never available.

This is a L regression.

bug:17669247
Change-Id: Id6041f226da069c267c56418d42c55978c36c66f
2014-10-03 16:05:36 -07:00
Jeff Sharkey
900e3b5fc5 Merge "More durable logging around system app upgrades." into lmp-dev 2014-10-03 22:35:19 +00:00
Jeff Sharkey
3933a5dc8c More durable logging around system app upgrades.
We've been seeing some really funky behavior when upgrading or
downgrading system apps around OTA time.  Put more of these one-time
logs into durable storage to help investigate.

Bug: 17805839
Change-Id: If898d7df229c1f71e598b0d965325c272060e5e7
2014-10-03 15:21:49 -07:00
Christopher Tate
b88ba912f6 Merge "Fix alarm delivery-order sorting" into lmp-dev 2014-10-03 19:56:36 +00:00
Christopher Tate
1590f1ee7b Fix alarm delivery-order sorting
We also refine the order of delivery within any given package.  Now,
we identify which apps have wakeup alarms being delivered in the
current pass, and deliver all of that app's alarms before moving
on to alarm delivery to apps who are only receiving non-wakeup alarms
in the current delivery pass.  The TIME_TICK alarm is also hoisted to
the start of the current delivery pass if present.

Bug 17778686

Change-Id: I6306a00fe657787a77d0254c0807ac51e810fdcf
2014-10-03 12:33:35 -07:00
Robert Greenwalt
24861eabe6 Merge "Send callbacks for Net property changes" into lmp-dev 2014-10-03 15:36:39 +00:00
John Spurlock
a23867c4e8 Merge "Disable notification effects during phone calls." into lmp-dev 2014-10-03 13:49:43 +00:00
Robert Greenwalt
a848c1cc0a Send callbacks for Net property changes
LinkProperties and NetworkCapabilities changes were not calling app callbacks.

bug:17681483
Change-Id: I67dac3c4dc1284f5c4bfb24de239da4ec776336f
2014-10-02 21:05:44 -07:00
Paul Jensen
a11b5e34f5 Merge "Send updated NetworkAgent score to NetworkFactories when validated." into lmp-dev 2014-10-03 02:18:12 +00:00
Paul Jensen
6eead851d2 Merge "Allow any unvalidated Network to satisfy NetworkRequests." into lmp-dev 2014-10-03 02:16:44 +00:00
John Spurlock
32fe4c6e64 Disable notification effects during phone calls.
Listen for phone call state changes in NoMan, and disable
incoming non-call notification effects when non-idle.

Bug:17658454
Change-Id: I6f7d66413970fbff6822ab29a12f91cbed068261
2014-10-02 21:05:06 -04:00
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
Paul Jensen
c8b9a7428d Send updated NetworkAgent score to NetworkFactories when validated.
Previously the score was not sent out causing other NetworkFactories
to have the lower unvalidated score and to repeatedly try to bring
up a new Network only to have it torn down.
Also, avoid logging an error when tearing down a network with only
listening requests.

bug:17726566
Change-Id: I82ff7c9bd5ec962f62a50ad0042c278622953969
2014-10-02 11:06:43 -04:00
Paul Jensen
4b9b2be894 Allow any unvalidated Network to satisfy NetworkRequests.
Explicitly selected Networks may never be validated (e.g. Chromecast)
but are still given a high score so they can explicitly become the
default Network.  Without this fix they do not become the default
Network if another Network is present.  This was an artifact of how
unvalidated Networks were handled, but now that unvalidated Networks
are properly handled, ala 50807d, we can freely rematch even
unvalidated Networks and NetworkRequests.
Also, never linger and teardown unvalidated Networks as the user
might be in the process of signing in.  This better matches prior
behavior when unvalidated networks didn't match NetworkRequests,
and thus were never lingered.
Also, don't disconnect networks that may be lingering.  The
disconnect logic in rematchNetworkAndReqeuests() is adjusted to only
fire when a network is newly validated.
It is incorrect to consider rematching uncreated Networks and
explicitly selecting created Networks, so this change logs error
messages in those cases.

bug:17647968
bug:17396616
Change-Id: Id6b8a350b8200f484d5bfd14ca0a8f64f08846a0
2014-10-02 10:56:51 -04: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