• Home
  • History
  • Annotate
  • only in /frameworks/base/services/core/
History log of /frameworks/base/services/core/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
13eb2e20a30abcfa45f41cd11a1fc110717c7c2b 13-Jul-2016 Tim Murray <timmurray@google.com> Don't dump stack traces for background ANRs.

Dumping stack traces can be extremely expensive, and doing so for
background applications often has extremely negative side effects for
foreground applications. This can be exacerbated by resource-intensive
applications, because those may exhibit thermal throttling in the first
place. For such applications, the additional performance hit caused by
stack dumps may be catastrophic.

Instead, don't dump stack traces for background ANRs except for the app
that actually ANR'd.

bug 30112521

Change-Id: I8a05059343254861c436a193690cd1c50a95d674
60e8ddee376b26b9bd61eb4103e72c63df7bbe29 01-Jul-2016 Lorenzo Colitti <lorenzo@google.com> Make registerDefaultNetwork work on metered networks.

Bug: 29927488
Change-Id: I3b705c2ab0d1493546ffa5185bb5b07d5e25c897
8dc558bba2f71993d3c6ce16dd9d9d2e152847cd 30-Jun-2016 Christopher Tate <ctate@google.com> Make sure SELinux labels are correct after move-to operations

In some circumstances wallpaper-related files are moved into position,
and must then take proper effect. Make sure that they have the
correct SELinux labels afterwards to avoid preventing some valid

Bug 29469965

Change-Id: I6d7c86be63d568fa0ad8841d109a7ff2149fdd54
9536c809dda20bd01c3d5c30df046b271ba2ec4f 30-Jun-2016 Jeff Sharkey <jsharkey@android.com> Move getRecentTasks() to ParceledListSlice.

In extreme cases the list of recent tasks can grow beyond the size
of a single Binder transaction. This change moves over to
ParceledListSlice which handles chunking any large results.

Bug: 29635557
Change-Id: Iaf1227234f5f8c9451f73a6a5c1dc89f2067f05f
55427a6650cb24da345be2cfb28e94e254a64249 29-Jun-2016 Rob Carr <racarr@google.com> Merge "Only use one SurfaceControlWithBackground per AppToken." into nyc-dev
91b22809648a33d64c159e8496773b1b3b2ab6ca 29-Jun-2016 Robert Carr <racarr@google.com> Only use one SurfaceControlWithBackground per AppToken.

In the past, if an app never renders to a SurfaceView, it will be
invisible despite having FLAG_OPAQUE. This means an app could leave a
totally empty SurfaceView (never drawing in to it) on top of a second
SurfaceView, and expect the second one to be visible. This is probably
buggy app behavior because FLAG_OPAQUE means if they ever draw anything at all
in to the top SurfaceView the bottom one will become totally invisible.
However this has worked in the past, so we have to preserve things for
apps. To accomplish this we ensure only the bottom most visible
SurfaceView for a given AppToken will receive a background. We achieve
this by synchronizing through the app token whenever visibility or
layering of a SurfaceView changes.

Bug: 29580298
Change-Id: I0023326323cb961b56404fd49093384e7b72aa54
d0063106b67c9aa44d9473102a1116aad136f50f 29-Jun-2016 Jim Miller <jaggies@google.com> Relax security constraint around getAuthenticatorId().

Fixes bug 28603656

Change-Id: I54216d4b9a3ab23f9d5bfe0f40f2dd27e723c21e
dd85da6e94fc7fd239fd97b954c1c78e66b265d6 28-Jun-2016 Felipe Leme <felipeal@google.com> Remove redundant setPendingIntentWhitelistDuration() calls.

Since all pending intents are stored on a Set in the Notication object,
there is no need to individually check for specific pending intents.

BUG: 29480440
Change-Id: I27a18bb535a9a4bb6cb4e76bdc189e6c315a684a
a7778b065428af7f23605053f939a668dd297182 28-Jun-2016 Felipe Leme <felipeal@google.com> Fixed whitelistManager set on unbindServiceLocked()

It must call updateWhitelistManagerLocked() because the app might have
other services with the whitelistManager set, in which case the process
record should not have whitelistManager reset.

Fixes: 29480440

Change-Id: I268278c646aaa89a352f02178b294c02c3c11d35
5f72b129c4f2396d2139ef0ed91f2d83054c1add 28-Jun-2016 Shreyas Basarge <snb@google.com> Merge "SyncOperation float cast fix" into nyc-dev
b2cd9c95bf5fdfb8a1ff85c0f8f9c66738dca463 28-Jun-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Mark app pending intents in notification extras" into nyc-dev
ddb948896ca7059161e09d0063b3332352772c0a 24-Jun-2016 Svet Ganov <svetoslavganov@google.com> Mark app pending intents in notification extras

We need to make every peniding intent that went in the notification
system to allow special handling of such intents when fired by a
notification listener. If a pending intent from a notification
is sent from a notification listener, we white-list the source app
to run in data saver mode for a short period of time. The problem is
that actions and the notificaion can have extras which bundles may
contain pending intents but the system cannot look into the bundles
as they may contain custom parcelable objects. To address this we
keep a list of all pending intents in the notification allowing
the system to access them without touching the bundle. Currently
the pending intents are written to the parcel twice, once in the
bundle and once as the explicit list. We can come up with a scheme
to optimize this but since pending itents are just a binder pointer
it is not worth the excecise.


Change-Id: I7328a47017ca226117adf7054900836619f5679b
a39d3806511d7ada54fcc9e4d73a0693e8014545 28-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix bug where process whitelist manager state would not be correct." into nyc-dev
4d6be6b308e4e49b9496968811fbe0c21c623215 28-Jun-2016 Andre Eisenbach <eisenbach@google.com> Merge "Add extra waiting when switching users" into nyc-dev
f4806982981d528a9feabb1f0c0169d89920920a 28-Jun-2016 Chris Tate <ctate@android.com> Merge "Fix #29737133 : content-trigger jobs not running properly" into nyc-dev
4b425712c6a777148af767cb30240d632c51f55b 28-Jun-2016 Christopher Tate <ctate@google.com> Fix #29737133 : content-trigger jobs not running properly

When removing the ContentObserver wrapper from our internal
bookkeeping we were using the wrong key. That led to future
re-registrations thinking they were reusing a currently-
registered observers, but instead never getting onChange()

Change-Id: Id3111db057ae63194049d7d48d45b75be6bb0000
414011116777e66bb3364fa86b856aa3574edbfa 28-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Add extra waiting when switching users

If disabling Bluetooth times out, wait for an additional amount of time
to ensure the process is shut down completely before attempting to restart.

Bug: 29738770
Change-Id: I43dec35a1e03d12cb07863babea97d55baa32528
a590d2be935ef502943a1e6615500aa10e67c85a 28-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix bug where process whitelist manager state would not be correct.

We can't update this in updateOomAdjLocked(), because we very
deliberately only iterate through services in there as needed.
The correct thing to do is update the process as services/connections
are associated with it, so do that.

Now basically all of the logic for tracking the state is in
ActiveServices, as we bind and unbind services and add and removing
them from process records. It's a little messy because we don't
have a central place for removing them from process records, which
should be cleaned up in the future.

Part of fixes for issue #29480440

Change-Id: Iac96f002a5b4e3b0277df244ff7b90f59a6e8440
06b1d786e9360f7e577e16a0b9af6cd8b9bc9b82 27-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Resume only activities in focused stack" into nyc-dev
c11ce7b1cd1d1e5cda2c1e8acb5b165cd7ce50ef 27-Jun-2016 Andrii Kulian <akulian@google.com> Resume only activities in focused stack

While performing ensureActivitiesVisibleLocked we should only
resume activity in focused stack. Otherwise we can get several
resumed activities at the same time.

Bug: 29619461
Change-Id: Id65fe1a29841ee3166694bfb6a8236151b9fc7ec
ace6f6d5ca70df4a8d78209840f67cfc8f879eeb 24-Jun-2016 Shreyas Basarge <snb@google.com> SyncOperation float cast fix

Fix casting of Float into Double in SyncOperation.

Bug: 29510536
Change-Id: I553e8988e4bc09c3624e42f6f108f723007d32c4
594c9cb356f04e04f8c2fe0cacd0f85b6fa8a375 24-Jun-2016 Adrian Roos <roosa@google.com> Merge "Improve ANR dropbox reports" into nyc-dev
73d1ce85ac5e7d2bb20996bdadb3df5f31cb4bc1 24-Jun-2016 Adrian Roos <roosa@google.com> Improve ANR dropbox reports

Work towards better diagnosing b/29501073. Adds logic to ensure that the dropbox
entry generated for ANRs fits at least some part of the logcat before the MAX_DROPBOX_SIZE
mark. Also reduces the MAX_DROPBOX_SIZE to be better match size restrictions.

Bug: 29501073
Change-Id: Ice5599582cbb536b7d81aa0c0340ff753ca86ebf
dcbdc0df43310d9ecb2324be8c5bd54d7727230e 24-Jun-2016 Brad Ebinger <breadley@google.com> Access internal ringer mode to properly vibrate in DND

Currently, an incoming call will not vibrate properly in certain cases
in DND mode. Specifically, if Priority Only mode is set, but Calls from
anyone are allowed. We now get the internal ringer mode to detect if the
incoming call is ringing while in DND mode.

Bug: 29184073
Change-Id: I1e0e7cf384a2bc1df1378043cd3f7e9dec57a94c
060d5a0e0a304400ee2ec1479346a37793bce0d7 23-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "When uninstalling, only kill the requested user." into nyc-dev
85f449eaba207d5d3a72bd091855a02ff019404c 23-Jun-2016 Jeff Sharkey <jsharkey@android.com> When uninstalling, only kill the requested user.

When an app is being uninstalled for a specific user, only kill the
app under that user; leave the app running under other users.

Bug: 28875343
Change-Id: Ie60753cfd22df10a2b17d8c3732b6f19d2fe1fb9
42147f0ff36c5e44766b102eb036f3a74731af74 23-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't compare intent filters on singleTask adjacent launch" into nyc-dev
354c8cde6ca7bcd872d0138c162fcf2fde982369 23-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Show unsopported display size dialog on relaunch" into nyc-dev
039ba48973733b7ca5573ac3ee1eb36341d61ecd 23-Jun-2016 Andrii Kulian <akulian@google.com> Don't compare intent filters on singleTask adjacent launch

Bug: 29578845
Change-Id: Ic1614fc1f321e80ffdc2ab498d720657f393c239
f9f2c7ceefa1348c57f1070327cf5d36c9c0d8d5 23-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Use granted userId to look up provider info" into nyc-dev
f42cbe83380dea5c6514d1249ece2ad5c5daa760 22-Jun-2016 Andrii Kulian <akulian@google.com> Show unsopported display size dialog on relaunch

If the display density change made app restart when it was focused
or we navigate back to it after density change and it makes it
restart - we didn't display unsupported display size dialog.

Bug: 29574686
Change-Id: Ic8fdc8a54df160f947e2d340ab2cb2931bac195d
dea7aa0da11bbdb0da7141d945d5aabb1d0426d6 22-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed whitelistManager assignment." into nyc-dev
18553f5f7309d3c41c0ee92d5bb84f3ac75e7630 22-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Avoid runtime restart when storage is missing." into nyc-dev
335387a1df8a79060bf2f99a27502cf545227aa8 22-Jun-2016 Lifu Tang <lifu@google.com> Merge "Added more logs to track WakeLock usages" into nyc-dev
11f197c3fe24c5fdccf3c2feacb22bc16d73d5fc 22-Jun-2016 Jeff Sharkey <jsharkey@android.com> Avoid runtime restart when storage is missing.

When primary shared storage is completely missing, catch the thrown
exception and treat as if ejected.

Bug: 29461637
Change-Id: I8eb5cdeb01983efbf26da3d32ab19a6630662156
a3290363e19d97014c00dcb2682b1bafc44d13ed 22-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Start primary storage move outside lock." into nyc-dev
6e051cc2c3fe3f7186930792dcd8e1a04b78a311 22-Jun-2016 Felipe Leme <felipeal@google.com> Fixed whitelistManager assignment.

It must be set before looping through all app services...

Fixes: 29480440

Change-Id: I38f78255ea44f00ea4226010d334b94fb4baadb4
cbd2a140c1150845c279fa109fbc9b028ebf1a4c 22-Jun-2016 Lifu Tang <lifu@google.com> Added more logs to track WakeLock usages

Bug: 28829595
Change-Id: I607745a27e830e42300ee307412e57c2254bff55
9bbaacf845f6f387cd6e16834da50f7c1a0b451f 20-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Use granted userId to look up provider info

In getPersistedUriPermissions, use granted userId instead of the calling
userId to look up provider info.

Bug: 29058113
Change-Id: Ia637be414f9ef3b8e9bce13bb56bd335cfb28ac7
75c7cc6ca9ffd821288acead552b00978567cb6d 22-Jun-2016 Chong Zhang <chz@google.com> Merge "Unblock 'am start -W' if activity is brought to front without launching" into nyc-dev
a62a7eef2435a906eaca29e798408fda8c44d1d1 22-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #29545190: JobScheduler ContentUri NOTIFY_FOR_DESCENDANTS flag..." into nyc-dev
00d9d9f11e7645059b8dbce4d80e8fc7ca5312d0 21-Jun-2016 Julia Reynolds <juliacr@google.com> Don't iterate over a list items are removed from.

Change-Id: I896cd4578da15e21d422ca8db42e34bbd10912e8
Fixes: 29512540
a31460ce1206ad938a809a2e19d51d2283398943 22-Jun-2016 Jeff Sharkey <jsharkey@android.com> Start primary storage move outside lock.

Otherwise there is a potential deadlock when an unsolicited event
arrives from vold while we're still waiting for the move operation
to be processed.

The safe fix here is to kick off the move after dropping the lock.

Bug: 29501052
Change-Id: I2160c6a7a19c1d9981c692a2be2b04019352db2e
2058553b8d57ac7156aad6387c0e9b397ce6f265 22-Jun-2016 Nicolas Prévot <nprevot@google.com> Merge "Don't allow showing an activity if user is stopping or shutting down." into nyc-dev
1219c924bdf98fd5342fe5bb7cd09da1012d2e1a 20-Jun-2016 Nicolas Prevot <nprevot@google.com> Don't allow showing an activity if user is stopping or shutting down.

Change-Id: I9fc97c5dc37e6d5656b82b277954b5963eb345c4
121e1645d1396b47f0fefa978f8c77d2c4c6c968 22-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix issue #29545190: JobScheduler ContentUri NOTIFY_FOR_DESCENDANTS flag...

...isn't respected if previous job was scheduled with same URI

Change-Id: Ib04f6d7cf72e7efc8e84c1a759e91ba520eda139
5022da313f6b2fbd16e55ebabaadbb308e96e908 22-Jun-2016 Chong Zhang <chz@google.com> Unblock 'am start -W' if activity is brought to front without launching

If -W is used to start an activity successfully, but this activity just
brings another activity to front without actual launching, the waiting
will be stuck because neither activity will report launch complete.

In this case, we have to treat it as if the -W started an activity and
received return code START_TASK_TO_FRONT. It needs to wait for the new
activity to become visible (or report launch complete if it's already

This reverts earlier commits afb776d5447e19565c9a826a554911decb9ed92a,
since it's causing problems with launch time reporting.

bug: 28333487
bug: 29451567
Change-Id: I9fd79ab5b3ed8f9de5df34ed9c7b0be3a94620b2
c211539769dfaa507cfaf7dc22e9feb56065018c 22-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Parse "vendor/priv-app" to find privileged applications"" into nyc-dev
56b9656372b51eee6f1849cd2f1428ace78729bc 22-Jun-2016 Todd Kennedy <toddke@google.com> Revert "Parse "vendor/priv-app" to find privileged applications"

This reverts commit 02708b1ac41e12029b806085f8ff76a0e2c916b5.

Change-Id: Ie1ba362a9f5ee46516a79c35bd4a6e45f84b6a32
472224cd8126deb823c2654b4cf903a6fe6c3431 21-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Prevent startNavigating() call when GPS is off" into nyc-dev
7595478ff2c8da07311da19d2e402ed90ed7fc8f 21-Jun-2016 Chris Wren <cwren@android.com> Merge "registerUpdatedByApp should be synchronized" into nyc-dev
aab580af55d3185f39dbea5eec8c50c0b10251ac 21-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Always report window move to client" into nyc-dev
fa2715e03ba460144f2101637b47cbbd7cfa24eb 21-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ignore system apps on enforceMeteredApnPolicy()." into nyc-dev
5f9afa968dcb2477a992c4a95a898bca71b16c46 21-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Reduce race when connecting to an existing content provider." into nyc-dev
e0aaeaaaf18be7969def21e3f441da3b81b2cc30 21-Jun-2016 Chris Wren <cwren@android.com> registerUpdatedByApp should be synchronized

Bug: 29524139
Change-Id: I226b5f32fdab6b369451d0c64310f788944495d0
1e7d8d381768ddb8868ba50612a1e48d44bfce6f 21-Jun-2016 Selim Cinek <cinek@google.com> Merge "Fixed an issue where the deleteintent of children wasn't sent" into nyc-dev
4de5a3ac6655f76b67af38712ae5aeb6d7c15938 21-Jun-2016 Dianne Hackborn <hackbod@google.com> Reduce race when connecting to an existing content provider.

We lost the code that checks to see if the target process still
exists and aborts trying to use it if so. To reduce the race
there, we have a new explicit check of the state of the process.

Hopefully fixes some of issue #28737082.

Change-Id: I37a7a6e9767516d564168ef5e110c4adafe3fb76
260d667b27af006193fbb9de58332b87bc6c85d2 20-Jun-2016 Dante Russo <drusso@codeaurora.org> Prevent startNavigating() call when GPS is off

When system comes back from idle state,
GnssLocationProvider invokes startNavigating()
even when GPS is turned off in settings.

Bug: 29512509
Change-Id: Ifcc6a06d698f65f868d18244f7166663ab57f57e
CRs-Fixed: 1022372
9980514ee05593dec2f276e13b095735c0bfad25 21-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Compare intent filter when launching adjacent" into nyc-dev
8a1bc54ab050daac935536f7fc5a8b9130e3eed3 21-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Parse "vendor/priv-app" to find privileged applications" into nyc-dev
ee27cabe343a665bc2224cdb598857d143b567b2 21-Jun-2016 Felipe Leme <felipeal@google.com> Ignore system apps on enforceMeteredApnPolicy().

BUG: 29514913
Fixes: 29448383
Change-Id: I19eb004c937e1c872bbf82caa7a919e43d48a259
02708b1ac41e12029b806085f8ff76a0e2c916b5 05-Nov-2015 Jeremie GARCIA <jeremie.garcia@intel.com> Parse "vendor/priv-app" to find privileged applications

Change-Id: Icbbafba96b7880f51ca3afcee53d5f3dd5b86a45
Signed-off-by: Jeremie GARCIA <jeremie.garcia@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
Bug: 29488499
f159b74608f76433a4e4ee563e13f7fa38ea559c 21-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't re-launch stopped activities while the device is sleeping" into nyc-dev
ce87a8af9dbf8ee6fb1a40a41451e89bb40246c2 21-Jun-2016 Selim Cinek <cinek@google.com> Fixed an issue where the deleteintent of children wasn't sent

Especially in context of autobundling this could lead to bad bugs

Change-Id: Idf722f9675f6f6e49d49c08798e38e09b1c5c01e
Fixes: 29515621
f00e7804727c3cadb44068583b73e59347bac6db 21-Jun-2016 Sudheer Shanka <sudheersai@google.com> Merge "Allow call addSharedAccountsFromParentUser with CREATE_USERS permission." into nyc-dev
d2480ab7bb70c8150a2c663fe049370b0860553d 21-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #29438842: Enter the "am broadcast -a..." into nyc-dev
089586fd9178873eee9791bfae6eb11e30a52d35 20-Jun-2016 Wale Ogunwale <ogunwale@google.com> Don't re-launch stopped activities while the device is sleeping

Don't ensure configuration for stopped activities while the device
is sleeping as we don't want to relaunch activities in this state.
Note that the right configuration will be applied to the activity
the next time we try to make it visible. The re-launch will happen

Bug: 28518380

Change-Id: Id79d7817ba8f213d89cae6964de09cafe17481f9
beaf3707fa5e853384ef2165b21e05154d51632e 20-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Don't re-launch activities while the device is sleeping"" into nyc-dev
ec3f8409b84e555f21290372de911ff704406e72 20-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix NPE in reading package-usage.list file" into nyc-dev
ea05cd57f5b2b26650276a7ff03053e7cb78c538 20-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix issue #29438842: Enter the "am broadcast -a...

...'android.hardware.action.NEW_PICTURE'" to terminal, but does not have a response.

Change-Id: I264f386810237a7abc767f68363afeccda557b9c
60920d5aa11bbb0e82a7f101cee825586e87aff0 20-Jun-2016 Wale Ogunwale <ogunwale@google.com> Revert "Don't re-launch activities while the device is sleeping"

This reverts commit 0619545be9adca4458cb627c18c211faad6b6275.

Bug: 29497152
Bug: 28518380
Change-Id: I8684b731b1e9973ead7066dc650eff720f70ac91
3b2297d05f407839b36d3866987d708b80fc9763 20-Jun-2016 Sudheer Shanka <sudheersai@google.com> Allow call addSharedAccountsFromParentUser with CREATE_USERS permission.

Bug: 29189712
Bug: 29500492
Change-Id: I0fca4951d41c14aa1739e01ca15d674b86a15d7c
7c6692646c87ec0057102e77304c8ffc440c36eb 20-Jun-2016 Chong Zhang <chz@google.com> Merge "Make sure fontScale in configuration sent to app is equal to global" into nyc-dev
6be533ef6c7d52cdd0f5eae47bf9512b759aa45a 18-Jun-2016 Chong Zhang <chz@google.com> Make sure fontScale in configuration sent to app is equal to global

We don't want the default value 1.0 from empty config to be applied
as an override.

bug: 29367672
Change-Id: Ia9947c24fa9435ba5b208eb9bd05e0b07b574015
83dce3642abb44fb83384a2e95ce2b89bfd80e20 20-Jun-2016 David Brazdil <dbrazdil@google.com> Fix NPE in reading package-usage.list file

A zero-length file is a valid package usage file of version 0 but
checking against the version 1 magic would throw a NPE.

Bug: 29491065
Change-Id: Ie54b1dd3218e4b1251c29db0c784a5ddf605394f
c2d75c898b09d87a5e7c39a0b7f387872a815490 20-Jun-2016 Jeff Davidson <jpd@google.com> Merge "Fix runtime restart when using aggregated net observers." into nyc-dev
99407db8ddb70141a9582b4d9f5d5012067748fe 20-Jun-2016 Narayan Kamath <narayan@google.com> PackageManager: Don't fail app installs if dexopt fails.

bug: 29493857
Change-Id: I953de204319b943d9389bb4c787f859e169e8d21
70b6cd903ee7ccca80d55bec4d8510da7cc9c0bf 20-Jun-2016 Shreyas Basarge <snb@google.com> Merge "Fix for the missing sync bug" into nyc-dev
fddf5df01f5f86d4a20356f5b5466997660be281 18-Jun-2016 Chris Wren <cwren@android.com> Merge "assume a generous prior in the rate estimator" into nyc-dev
1bf8782605527629a374ba8f4a8be8c973e7b794 18-Jun-2016 Andre Eisenbach <eisenbach@google.com> Merge "Fix race with BT disable in BLE_ON_STATE" into nyc-dev
e555cb9f4afdd7a8e7c55379a13e8be696cca3e2 18-Jun-2016 Christopher Tate <ctate@google.com> Unspecified alarm worksource names are the rule, not the exception

Bug 29443799

Change-Id: I6457a3680a26c900ed9c8e2ac2ab3f5fc4dfc007
8cbe1a6309ed330000269dccbfce26de97f11e83 17-Jun-2016 Amith Yamasani <yamasani@google.com> Merge "Clean up ex-users in lock settings db" into nyc-dev
7ef9f61be627a764902ee59bdc2af6aea83916df 17-Jun-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Don't dispatch Uris with appended user handle" into nyc-dev
a0b91d77d62020652b7f003326ffe11c7e4d87c2 16-Jun-2016 Calvin On <con@google.com> Fix race with BT disable in BLE_ON_STATE

This will restart the BT stack when it detects a transition
into OFF state while the user enable flag (mEnable) is set.

Bug: 29363429
Change-Id: I9839119b34c4694ad92e96240c6989008b2f8d52
6bc33b07f43b6568be9920905083c20b879a97b1 17-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #29328569: NPE in " com.google.android.configupdater"" into nyc-dev
888b7a8faf7d6c2aa4272bebeb875eac9a2ff21c 17-Jun-2016 Chris Wren <cwren@android.com> assume a generous prior in the rate estimator

currently with one data point the estimator is biased high. If we don't
have any data we want to be biased low to allow the first interaction
to be an isolated burst.

Also add metrics for enqueue rate to make it easier to debug this
code in the future (currently we only have metrics after the
rate limiter).

Bug: 29379789
Change-Id: I7b1d379290a55f120d039fd29d1bc0abbc6d4932
d3bbb13fe29e8b6c931497daeb124669e050b419 17-Jun-2016 Andrii Kulian <akulian@google.com> Compare intent filter when launching adjacent

When we're looking for a task during adjacent launch, we need to
perform full intent filter comparison instead of just comparing

Bug: 29424577
Change-Id: I10f271986a8dc405e28a053e4cb122c1e9aa6ee0
7774bd554c28e33b732e449d029137537eb917da 17-Jun-2016 Wale Ogunwale <ogunwale@google.com> Always report window move to client

ag/1037916 added logic to only report window movement to the client
if the window doesn't have a task or its stack is bounds animating.
This causes problems on the client side for window that don't fall
into this category as they will have the wrong information of where
they are no screen.

Bug: 29093176
Change-Id: I958174af430f2c4003a1c0a74956964d209c0e4a
1f0151220e8c3054e826d2c89056bb3aeaf6542e 17-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Do not schedule restarts if the system is shutting down" into nyc-dev
1347cdb2e1adf2e892e2bb0640b546bb86d1cec2 17-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Call AppOpsService from the handler thread" into nyc-dev
c577a50d099c35c5e2c96f50b62cfa81843398ef 17-Jun-2016 Alan Viverette <alanv@google.com> Merge "Notify user when application does not support current display zoom" into nyc-dev
9b80b94167a7d218da28b357d1daabf5ab1f309d 17-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Do not schedule restarts if the system is shutting down

Bug: 29357754
Change-Id: Id5cf43fb6c4c6ea04d60bd09e910a9cec194c753
1c3be1a5b19b5f29eb8466d8b746a28d5a48e935 17-Jun-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of cffb19c to mnc-dev am: 3f9ea2d386 am: d6c1126fab am: e2c9b1af3e
am: d2a4e1b39c

Change-Id: I8e59a88278ba50ab7e3768031611065131ed6834
d2a4e1b39c4b2efc9475c6d7c0674fb9ba63f685 17-Jun-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of cffb19c to mnc-dev am: 3f9ea2d386 am: d6c1126fab
am: e2c9b1af3e

Change-Id: Iab52ff84be41c1d18274d1a82492b624a7456726
e2c9b1af3e68a66e18a16c2b658f925fceb16980 17-Jun-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of cffb19c to mnc-dev am: 3f9ea2d386
am: d6c1126fab

Change-Id: I0414a137b1aab218fa57f291dbf2f7a1519bd973
d6c1126fabdf91624715a42c199099f3c8b3a962 17-Jun-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of cffb19c to mnc-dev
am: 3f9ea2d386

Change-Id: Iadf90edb02bacf645896f7d074d011a2aca4b251
66ec21a817db000ffc9868eddcf0fcb1caf9eee7 17-Jun-2016 Dianne Hackborn <hackbod@google.com> Work on issue #29328569: NPE in " com.google.android.configupdater"

Make the activity manager look at the "killed" state of a process
before deciding it is in a state where a new client can attach to
a content provider. Hopefully this will get rid of some races
around attaching to providers and processes being killed.

Also add a little more information when killing a client of a
provider describing the oom adj of that provider's process.

Change-Id: I4efe5daf0a96e4663d5df88827ef401b1311de3f
3f9ea2d386507fd814b33fd9fa6c2a2824f80416 17-Jun-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of cffb19c to mnc-dev

Change-Id: I4dba574de2678d851e3d82961a07de27d61f5940
48ee87d4a7e6a1f9127875fd4ecf99f62d1faedb 17-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow apps with CREATE_USERS permission to create restricted users." into nyc-dev
cffb19c812dd6d619e292519ca5ede61310aeab6 17-Jun-2016 Christopher Tate <ctate@google.com> Don\\\'t trust callers to supply app info to bindBackupAgent() am: c58054f25f am: cd777e95a7
am: ec6c3f7a32

Change-Id: Idc2b6c712078493b4186edad750d8d5beab58adf
ec6c3f7a3207f75611380603f728ba4598d7c3a7 17-Jun-2016 Christopher Tate <ctate@google.com> Don\\'t trust callers to supply app info to bindBackupAgent() am: c58054f25f
am: cd777e95a7

Change-Id: I199f1354df85fcda372002887eafc1e6fb9b19d8
cd777e95a77ba0035566088a5432aa28a409e7d1 17-Jun-2016 Christopher Tate <ctate@google.com> Don\'t trust callers to supply app info to bindBackupAgent()
am: c58054f25f

Change-Id: I3b0bd91c38b5f13770f09f39c2eea78b63c29d7c
ec30ca35aa6bb51643d266b73f3c93d30c96ac3f 17-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Call AppOpsService from the handler thread

Otherwise it may cause deadlocks, for instance if
updateUserRestrictionsInternalLR is called with AMS lock held.

Bug: 28888422
Change-Id: I455c7392f206ff0bb6c99ec5c4a531921a115070
bd4c3ea7ae57f43dbaca6456f9a2853d2e7d827d 16-Jun-2016 Shreyas Basarge <snb@google.com> Fix for the missing sync bug

Cancel a job before re-scheduling it to avoid
the situation where a job could still be in
JobScheduler's pending queue.

Retry a sync even if it has specified the
do_not_retry extra if the sync failed due
to SyncAlreadyInProgress.

Bug: 27532761
Change-Id: Ia5d2b31fa4e44560a3f170a2bdbf53151bff7a20
f6e3c9a5537a5e1e7ef7be956d8a335106afd8f7 16-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't re-launch activities while the device is sleeping" into nyc-dev
320c15e1b27033b1cab0ec75ec976f707c0dac2a 16-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Bring task to front when we can't move to adjacent stack" into nyc-dev
f33af2285b74ff7f092149ee86ec687a892aa600 16-Jun-2016 Yorke Lee <yorkelee@google.com> Merge "Limit global drags to apps targeting SDK 24 and above" into nyc-dev
0619545be9adca4458cb627c18c211faad6b6275 16-Jun-2016 Wale Ogunwale <ogunwale@google.com> Don't re-launch activities while the device is sleeping

- Don't ensure configuration for top running activity that is in the
stopped state if the configuration change while the device is sleeping
as we don't want to relaunch activities in this state.
- Don't make activities visible while the device is sleeping and the
activity isn't in voice interaction mode. Making it visible can also
lead to the activity been relaunched due to configuration changing.

Note the the right configuration will be applied to the activity the next
time we try to make it visible. The re-launch will happen then.

Bug: 28518380
Change-Id: Ic22193db645dec358065cb05e7f1afc6fc8ac49f
47c3afa10bbe868a4414b114775e0414ef890045 16-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check extra type before blindingly casting to Parcelable." into nyc-dev
47cfac6803c8f558d5f7310563be65f5944eede2 16-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #29371078: Foreground jobs should not count..." into nyc-dev
ad6f2e580f783d5d320d3265bd617adedf55c944 16-Jun-2016 Andrii Kulian <akulian@google.com> Bring task to front when we can't move to adjacent stack

If task was requested to move to adjacent stack with mLaunchStackId set
and FLAG_ACTIVITY_LAUNCH_ADJACENT not set - we don't move it from its
current stack. If the task was covered with other task(s) it wouldn't
be brought to front.
This CL checks if mLaunchStackId is provided and is a valid stack for this
task, then we move it to front of current stack as a safer option.

Bug: 29103549
Change-Id: I3065960f082cfbf9a5b43c6e83b5cebe3dd69df6
e25c8532b6dd05cf339f21c564f6300c5cc94971 16-Jun-2016 Gustav Sennton <gsennton@google.com> Merge "Support using uninstalled WebView packages as WebView implementation." into nyc-dev
75aa534d3aafe17a912b2c2734bee9a76b1edd83 16-Jun-2016 Felipe Leme <felipeal@google.com> Check extra type before blindingly casting to Parcelable.

BUG: 29402928
Change-Id: If1729b8a4fcde724372b0a23cfae723a5d9b4faa
7df9b45bfe3cc6a6b3f33be008bb69a31b15999f 16-Jun-2016 Alan Viverette <alanv@google.com> Notify user when application does not support current display zoom

Bug: 29322470
Change-Id: Id33215f6b0b20b332c3c9101aedf9de0261ee5ea
0e8524719559f0be9c8145dbf9f52100e1fb60c3 15-Jun-2016 Yorke Lee <yorkelee@google.com> Limit global drags to apps targeting SDK 24 and above

Bug: 29127791

Change-Id: Ib5f85a207bdb79eeac0418fda78e452d225761bc
32d67fab83d96a9c05d03a44fcb44e0410bb61df 16-Jun-2016 Todd Kennedy <toddke@google.com> Merge "Make sure we're locked" into nyc-dev
53d414745c60407b032db543219616b0b74d1557 16-Jun-2016 Sudheer Shanka <sudheersai@google.com> Allow apps with CREATE_USERS permission to create restricted users.

Bug: 29189712
Change-Id: I0f2677adddb22c11cb5a3e38763b0967d9cbd541
f11a574027a8dbe18d79ce467984d63d07fea9e1 16-Jun-2016 Amith Yamasani <yamasani@google.com> Clean up ex-users in lock settings db

Just in case a userid was not properly cleaned
when the user was removed, make sure it is
cleaned up when a new user takes up the same
userid. This prevents inconsistent lockscreen
state and avoids a crash in Settings when trying
to set a password for the new user.

Fixes: 29412112
Change-Id: Ic4f0efbb97786b0290c74325b28c9d74825e9e53
6437205648e1948685821490a585198010d1606b 16-Jun-2016 Victor Chang <vichang@google.com> Merge "Fix that work apps settings page crash after changing work profile to use separated lock" into nyc-dev
0df2c5566a9d7d71ca84cb072114f051bbe7a344 14-Jun-2016 Gustav Sennton <gsennton@google.com> Support using uninstalled WebView packages as WebView implementation.

A package can be uninstalled for the system user but still be installed
on the device. Currently, we do not use such a package as WebView
implementation which means we fall back to using the fallback WebView
However, if the fallback package is not valid (because it needs to be
updated first) loading WebView will fail.

With this change we fetch allow the fetching of information from
packages that are uninstalled for the system user so that we can still
load WebView when the only valid WebView provider is uninstalled for the
system user.

Also listen to package additions/changes/removals for all users -
otherwise we won't notice when a package becomes replaced if it was
already uninstalled for the system user.

Bug: 29321185
Change-Id: Ia23c4493844877aea1b4eab7e666fd37540c4f97
3d5604dc901aa11e31ca353347b3be348583d289 15-Jun-2016 Todd Kennedy <toddke@google.com> Make sure we're locked

Before calling a method ending with LPw, we need to have the mPackages lock.
Make sure we do that.

Also, ditch the iterator for traversing an ArraySet.

Bug: 29356333
Change-Id: I67df971f2961b577f31153cef46fb153458d6965
43f6a45e7e111af8a843e001b555082cb356a529 16-Jun-2016 Ricky Wai <rickywai@google.com> Merge "Add permission checking on service calls in LockSettingsService" into nyc-dev
3e343ffd913fe0c408c8a975a9ad442da65a498a 16-Jun-2016 Robin Lee <rgl@google.com> Merge "Move 'is already always-on' check into Vpn.java" into nyc-dev
d430f1a0be42bbf85fe75578a871d920ff922770 16-Jun-2016 Ruben Brunk <rubenbrunk@google.com> Remove coarse location pre-grant for preinstalled VrListenerServices.

Bug: 28919229
Change-Id: I97393308129c65ef2822014775d3e77e25dc21e6
7ab4025474d3ce80b00fbc96962a585f918a0be1 16-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix issue #29371078: Foreground jobs should not count...

...as active for idle maintenance

Nor jobs of whitelisted apps.

Now they don't.

Also remove the no longer used "active download" tracking code.

Change-Id: I553197801f6eabaf15716f3201dd65257a0d4e94
931a7c03e070fce6d9be40978159c2bfcb2b9e3a 16-Jun-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Fix VR transition for display on/off sequence." into nyc-dev
af9f004f99d81bdc81a05e179ff04d6b3fcb1041 16-Jun-2016 Ruben Brunk <rubenbrunk@google.com> Fix VR transition for display on/off sequence.

- Ensure VR transition has been applied before display power
off sequence.

Bug: 29364940
Change-Id: I1224ac653d466919cb418e5c357a748606c4fd7d
4f2b1b455e0f256ef9cb345d844ac89b6c3fd20c 16-Jun-2016 Amith Yamasani <yamasani@google.com> Merge "More thorough cleansing of expired users" into nyc-dev
3138a9938b19d596b1581a538eb019f134903d06 16-Jun-2016 Svet Ganov <svetoslavganov@google.com> Don't dispatch Uris with appended user handle

This change fixes a bug where we started appending the user id
to the changing Uri for observers to know what user's Uri changed.
This is problematic as it changes the Uri structure expected by
observers. Also there are no public APIs to factor out the user
id from the Uri. If a system component needs to know for which
user a Uri changed it can use ContentObserver#onChange(boolean,
Uri, int) where the last argument is the user id.


Change-Id: I5f0982ac3c8d6b6eab060bab65d3b53182660ac7
4ff3bcfa0c143ad14c81d07f90ed6dc375701ab1 15-Jun-2016 Jeff Davidson <jpd@google.com> Fix runtime restart when using aggregated net observers.

When observing network traffic on a per-iface basis (as opposed to a
per-iface+uid basis), do not attempt to redistribute VPN traffic,
because it is unnecessary and will lead to a crash further down the

This is a one-line functional change, but some comments have been
added throughout to clarify behavior.

Bug: 29390363
Change-Id: Icca13f181d7698ca3ddc92aa9248f06f130d49a3
68dd6233bdfb7c33299ecf0c37a70460d31bb794 15-Jun-2016 Kevin Gabayan <gabayan@google.com> Compute AnyMotionDetector angle using atan2. Bug: 29232136 am: db843c913f
am: e46d4fd7ad

Change-Id: I666fc7432cf6140c938423ec4370ca7727996bd6
e46d4fd7ad9f57d0b6395f1106694ac058a645b2 15-Jun-2016 Kevin Gabayan <gabayan@google.com> Compute AnyMotionDetector angle using atan2. Bug: 29232136
am: db843c913f

Change-Id: I1d2af755dd1a06fc2fef464b6ad5bc5e26f11ff6
d04aaa323c3a788d26f18fc66e0a59b47e525b38 13-Jun-2016 Amith Yamasani <yamasani@google.com> More thorough cleansing of expired users

If any /data/system_[c|d]e folders were not erased
when the user was removed (maybe due to a reboot),
make sure they're cleaned up on restart as well
as when the userId is recycled later.

Mark the users' system folders with the correct
serial number for later verification.

AccountManager shouldn't be querying accounts of
partially created/destroyed users.

Change-Id: I4313756b7464f34cd5ce4fb296d61daa50b41fcb
Fixes: 29285673
b2a45c00f6710b2cec2ad30a2c47973dfe91d437 15-Jun-2016 Toni Barzic <tbarzic@google.com> Merge "Clear calling identity before calling mountService" into nyc-dev
f156ab3f3afd5e22a244e2d6a47c90309709a5be 15-Jun-2016 Chris Wren <cwren@android.com> Merge "Revert "boost starred people to at least high importance"" into nyc-dev
e85da2bc2eeabb425c4b1270dbd0e22095aac957 15-Jun-2016 Michael Wright <michaelwr@google.com> Merge "Make lid switch edge rather than level triggered." into nyc-dev
7f405f170f66d201f893a2f29866f528f0ec7fc8 31-May-2016 Ricky Wai <rickywai@google.com> Add permission checking on service calls in LockSettingsService

Bug: 28941207
Change-Id: I113db10bb57f250d44361a0a5144a7d1c990ba4d
6ba96df81536aefca7de3be645af99e4667d483a 15-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only skip trimming task if the stacks are not null." into nyc-dev
159c13801bb58714c463a7a170517776d590e3e8 15-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow apps with CREATE_USERS permission to call UM.getUserInfo." into nyc-dev
3e5df9fb50f98ae3738bef5c8dbddcbbb4a4b95d 15-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Toast timeout: Just strip FLAG_KEEP_SCREEN_ON" into nyc-dev
e5266730ebee0e8db5e7881e0e78db22f67fba7b 15-Jun-2016 Winson <winsonc@google.com> Only skip trimming task if the stacks are not null.

Bug: 29121819, 29359871
Change-Id: I8f8602796e316ed5b36a033e4eaa020650064f74
accaa08c98d5c4dd012149e452d6fb19ce0c134b 15-Jun-2016 Sudheer Shanka <sudheersai@google.com> Allow apps with CREATE_USERS permission to call UM.getUserInfo.

Bug: 29355382
Change-Id: Iaf73c453156e3a989660d05124b0c0938619abd7
39647560d1e3b85f5bc92a9a464ba63b44faad3e 15-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make sure task exists in WM before trying to set the resizing state" into nyc-dev
291aea2202495ca090b053695cbbe2e20a06d40b 11-Jun-2016 Robert Carr <racarr@google.com> Toast timeout: Just strip FLAG_KEEP_SCREEN_ON

We added the toast timeout to fix b/21693547. Where the client
leaks non visible toasts which end up keeping the screen on.
Simply removing the toast windows as we were doing previously,
isn't very good though. If the timeout fires when an app could
still use the toast (e.g. due to long pause under debugger),
the app could crash. It's not obvious how (if even possible
without API semantic/guarantee change) to prevent this issue
from the client side. Furthermore, #33 at b/21693457 implies that
we need to respect FLAG_KEEP_SCREEN_ON even for windows that
never submitted a buffer. With time constraints as they are,
the only solution I can think of that solves both without
chance of regression is just stripping FLAG_KEEP_SCREEN_ON when the
timeout fires.

Bug: 29105388
Change-Id: Ic2df897f86acf814ea3d4f911a0532d65af0c19f
5c176ff133649fd22fdabe7d0377a77133b50043 14-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Don't update task to return to type for last task over home"" into nyc-dev
d6aee18cabe75cbd4e98bfa380dffb89d89e0efc 14-Jun-2016 Wale Ogunwale <ogunwale@google.com> Make sure task exists in WM before trying to set the resizing state

It is possible for a task to be removed from the WM and stack in AM
while resizing (e.g. app crashes). In this case we want to make sure
the task exist in WM before we try to set the dock resizing state vs.
depending on the fact that the task is in recent list in AM.

Bug: 29325623
Change-Id: Ib89a7bfe12fe1f2c4c6c56ac9e13b0052ea2b4ec
2f4636a33357d9b2a4acf652f85873845c2e7d02 14-Jun-2016 Chris Tate <ctate@android.com> Merge "Note null alarm worksource names under the alarm's package" into nyc-dev
c58054f25fb8ad624a749ed48e3f5775de4bec14 14-Jun-2016 Christopher Tate <ctate@google.com> Don't trust callers to supply app info to bindBackupAgent()

Get the canonical identity and metadata about the package from the
Package Manager at time of usage rather than rely on the caller to
have gotten things right, even when the caller has the system uid.

Bug 28795098

Change-Id: I215786bc894dedf7ca28e9c80cefabd0e40ca877
369be64bf3dab596a1d804d36bf3ac5e9667baa4 14-Jun-2016 Andrii Kulian <akulian@google.com> Revert "Don't update task to return to type for last task over home"

This reverts commit 21893824c1d15a1a46cb75725ad951620569c3c6.

Original commit revealed issue b/29342752 when launch logic was applied
to incorrect stack while moving to PiP mode.

Bug: 29342752
Bug: 29237751
Change-Id: I88d75399eb4b9daf4de87a9a560eb0df0b515173
166b0abf13af62ba577b898d4c5ad806f691604a 14-Jun-2016 Shreyas Basarge <snb@google.com> Merge "Update SyncManager min period to match JobScheduler" into nyc-dev
5e94a16b74924d3cd694bc3388be9457cc2d4622 14-Jun-2016 Makoto Onuki <omakoto@google.com> Merge "Don't take the DPMS lock in DPMI.createPackageSuspendedDialogIntent" into nyc-dev
0029f57123688fc3599dda5c5a583ce528770d07 14-Jun-2016 Christopher Tate <ctate@google.com> Note null alarm worksource names under the alarm's package

And log a nastygram because it implies the app is misbehaving.

Bug 29333122

Change-Id: Ia683304b8a9eafb234df81e874ee3f0636c4e56a
26704957fe48d75a5b4f3a51cff520a9e4d8b82c 13-Jun-2016 Makoto Onuki <omakoto@google.com> Don't take the DPMS lock in DPMI.createPackageSuspendedDialogIntent

This method is called by AM with the lock held, so can't take the
DPMS lock.

It still takes a different lock, but we don't call into the external
world while holding this lock, so this is fine.

Bug 29242568

Change-Id: Idbecdd7d97385ca66c693903443471fdbae833e6
89d4a9a189b93ce8a6e76f40a19adc38889efed8 14-Jun-2016 Victor Chang <vichang@google.com> Fix that work apps settings page crash after changing work profile to use separated lock

Change-Id: I77df9d4a6e23ca6041da15f5908436375efa3b21
Fix: 29176549
3b840e378a97a71c6592fb924b39d73d89931a38 14-Jun-2016 Shreyas Basarge <snb@google.com> Update SyncManager min period to match JobScheduler

Use JobScheduler's minimum period in SyncManager.
Syncs will respect JobScheduler's min period anyway,
this change ensures that dumpsys of both services
show the same period.

Bug: 29253834
Change-Id: I0cd7f85da56af967963573a048c3a71436ed9c5b
9ff1a588786cb2963d76c75f3a077fc17fa1589c 10-Jun-2016 Robin Lee <rgl@google.com> Move 'is already always-on' check into Vpn.java

It's with the rest of the logic now and allows checking whether the
lockdown state matches, too, which led to a lot of misunderstandings.

Fix: 29199431
Change-Id: I94a2c38c4837f9c33b5b9c2becb52eeb7e2a2534
78452db2856d627008d64bb2054e8673f93df795 14-Jun-2016 Paul Jensen <pauljensen@google.com> Merge "Show sign-in to network notification to all users, not just owner." into nyc-dev
42edc7c2c25aabe44d41b12bfa4557b028491671 14-Jun-2016 Chong Zhang <chz@google.com> Merge "Prevent crash from null ApplicationInfo after package is removed." into nyc-dev
1de22da763576cd54b2d3d51bc47ce99cf89f1ab 13-Jun-2016 Chong Zhang <chz@google.com> Prevent crash from null ApplicationInfo after package is removed.

Bug: 29234926
Change-Id: I8c2fed7c7e862e1f6798d5ed535d1937f9a74c1a
62b08eb5f2949caa033bec904aceadbadfb216a3 13-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Don't update task to return to type for last task over home" into nyc-dev
c977f81dad9e07a0f3f5f12fd3dfc1a42675740c 13-Jun-2016 Chris Wren <cwren@android.com> Revert "boost starred people to at least high importance"

This reverts commit 7e431621c41af719354cb7100c2c9195179cdbe6.

Change-Id: I69e06505f79ecb9e2983cec0d0dcddb7979a3f94
f419bd9e03574d63581694f646f1b1136e7574d8 13-Jun-2016 Makoto Onuki <omakoto@google.com> Merge "Push DO/PO package names from DPMS to PM" into nyc-dev
d054f4f2fe316de1ee7df70aa9884c621c16dbf0 13-Jun-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Fix permissions update for VrListenerService on user changes." into nyc-dev
29dbc3cc47a27ae09f0f5aacd778aded427444bc 08-Jun-2016 Winson <winsonc@google.com> Prevent trimming recent tasks belonging in different stacks.

- When launching an adjacent task, we usually have the same activity
not necessarily launched with MULTIPLE_TASK, so the old recent task
is incorrectly found removed.

Bug: 29121819
Change-Id: Id3bbafe0d3c535fd1a05bb373e521345c18f43d5
f8e903fe2c297b2e8a6cf22a148620930cf148b0 13-Jun-2016 Paul Jensen <pauljensen@google.com> Show sign-in to network notification to all users, not just owner.

All users should be made aware a captive portal is in place and be
given the opportunity to sign into the network. Without this fix
other users are not notified and given a chance to sign-in.

Change-Id: I1bf823d5f6a36f391dca4be5f6a584e8562a72a7
Fixes: 23079964
6f1ed200b3aa01af88eb309a55a428ceac56a9a2 13-Jun-2016 Ricky Wai <rickywai@google.com> Merge "Disable quiet mode after UserManager.trySetQuietModeDisabled() is unlocked" into nyc-dev
21893824c1d15a1a46cb75725ad951620569c3c6 11-Jun-2016 Andrii Kulian <akulian@google.com> Don't update task to return to type for last task over home

Resizing docked stack to fullscreen size results in dismissal
of docked stack and moving of tasks to fullscreen stack.
When tasks, which were originally launched from home or recents,
are inserted on top of fullscreen stack, their mTaskToReturnTo
value was overwritten.
This CL doesn't allow to overwrite this field of task if there
is no next task in stack and it was launched from home or recents.

Bug: 29237751
Change-Id: If56cd3f68b6b400c2d5c945431371acfe6269682
938a70142ebb504ef2e079708c48315f80707b53 11-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Restore setCropInTransaction HiddenForCrop behavior." into nyc-dev
0360a900f79af557d4e008c087684578b2296339 11-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Place a black layer behind SurfaceView." into nyc-dev
db843c913f67230da010aa60d4e83632556e98c3 10-Jun-2016 Kevin Gabayan <gabayan@google.com> Compute AnyMotionDetector angle using atan2.
Bug: 29232136

Change-Id: Ie57d0228eb42246c4ac1d7a01e2782a621b7e78f
(cherry picked from commit b070577d35436ca0f5463e6ed19a28ae431cfbfb)
d25c718a12725c9721dfc79deb0c27f15aa65d58 11-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Solve the infinite loop on clearExternalStorageDataSync" into nyc-dev
086d2929f739ab217c38f99b76fd70f30dcfa478 09-Jun-2016 Robert Carr <racarr@google.com> Place a black layer behind SurfaceView.

For SurfaceView's which do not implement
SurfaceRedrawNeeded we can see holes through to the
background in various scenarios. We prevent this by
placing a DimLayer behind opaque SurfaceViews. SurfaceFlinger
will remove it from the visible layers when the SurfaceView
totally obscures it.

Bug: 28763785
Change-Id: I9b4d1ba8be786f30432a6a3b42e5616662cdc090
4320d33a065173dff97ddb462c8a6a0a649a41e5 11-Jun-2016 Robert Carr <racarr@google.com> Restore setCropInTransaction HiddenForCrop behavior.

Prior to c/1106850 setCropInTransaction hid the surface
for crop width and height <= 0. That CL allowed
setting -1 for crop width and height which SF
determines as clearing the crop. Other portions of the code
depend on the old behavior though for negative values, so restore
the behavior of setCropInTransaction and use a new clearCrop
method for the new code.

Bug: 29276588
Change-Id: I728666009c362ff635c7ebfb3ef2e83428fb03fe
1b4124fc954db07064e80d3e25c3549507c255ca 10-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reduce shell power over user management." into nyc-dev
99bf020f707553601b4830aefe264d54d1f7fbfd 08-Jun-2016 Tetsutoki Shiozawa <tetsutoki.x.shiozawa@sonymobile.com> Solve the infinite loop on clearExternalStorageDataSync

5000 msec timeout is set for waiting DefaultContainerService, but
it's not working. It's not possible to exit a wait loop even if it
takes over 5000 msec.

Bug: 29232999

Change-Id: I74a45637e0a3fa5a7b151e6b3dc0b3aaece96d53
e33f61319049810ae9cb318e2ba45e8a3449fb43 02-Jun-2016 Svetoslav Ganov <svetoslavganov@google.com> Fix permissions update for VrListenerService on user changes.

- Fixes a bug where we would not update the
overlay restrictions if the VR listener we are bound to
changes bug the VR enabled state doesn't.
- Also fixed a case where the notification listener access
and location permission were not granted/revoked for the
correct user. For example, if a vr activity in one user calls
a VR activity in another (possible for cross profiles) we end
up not revoking the special access for the vr service in the
first user. The notification listener setting was also updated
for the system user instead of the user for which we grant/revoke
specal access.
- Properly remove the overlay restrictions for the old user
if we transition from a vr actiivty in one user to a vr activity
in a profile of this user.

Bug: 29273985
Change-Id: Ib1de6f2f5445001ac61edca5c77ea3a066544307
f5cea03eb036c05cacc711ff90c97a48ffb2bc17 09-Jun-2016 Sudheer Shanka <sudheersai@google.com> Reduce shell power over user management.

Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.

Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
4e85376fe16e8719b465c262ead189a8b4619dcc 10-Jun-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Blame only location observers that actually receive updates" into nyc-dev
6da2fb61ce731ed4cb894b1a0ca3f5416308fc7d 10-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check for valid paths when getVolumeList() returns invisible volumes." into nyc-dev
123a0e712eabcfec5987f9423e4b5db67231a31a 10-Jun-2016 Felipe Leme <felipeal@google.com> Check for valid paths when getVolumeList() returns invisible volumes.

The FLAG_INCLUDE_INVISIBLE was created to let SM.getStorageVolumes()
return mounted volumes (like USB drives), but in the current form it
might return invalid volumes. For example, when a SD Card is adopted as
an internal storage, it will return 2 volumes instead of one, the "bad"
one being:

type=EMULATED diskId=null partGuid=null mountFlags=0 mountUserId=-1
fsType=null fsUuid=null fsLabel=null
path=null internalPath=null

As such, we need to filter out those volumes that don't have a path.

BUG: 29250241
Change-Id: I3f84b53eac98f31f918d843c70f9d42983e2a438
9303ecb3178932d488824936b3f01b6da3f2cacb 10-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #29252997: Should be able to dump only broadcast stats as checkin format" into nyc-dev
792918e5fda62004f0dc83981a4a6648c3f7c5d4 10-Jun-2016 Chong Zhang <chz@google.com> Merge "Use user id 0 to get missing appId for debugger" into nyc-dev
e998c73c3380f525b218cd95a3d3f575935c5222 10-Jun-2016 Svet Ganov <svetoslavganov@google.com> Blame only location observers that actually receive updates

The location manager service keeps update records for all apps
registered to receive location updates. If an app does not have
the location permission then its update record is skipped when
dispatching location updates. However, the battery blame is spread
across all apps requesting location updates even if they don't
receive such because of lacking permission.


Change-Id: Iee96fd6f304c7a49f9c70484e52abc0ed1538a29
4663b4e806c1e35dee385bfc1cf6a1f069a5b0b3 10-Jun-2016 Phil Weaver <pweaver@google.com> Merge "Stop magnifying surface insets." into nyc-dev
f73bd84ed7d520b71631f569f07501707e107fb1 10-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix issue #29252997: Should be able to dump only broadcast stats as checkin format

Change-Id: I36d4e5e20ff2ed1b4d02a04390e0415b9b2394a3
d25944e120aa9029aa6b5cb89f5f08fd95afdbbc 10-Jun-2016 Chong Zhang <chz@google.com> Use user id 0 to get missing appId for debugger

When forceStopPackageLocked is used to kill existing app process for
relaunching with debugger, user id could be -1 and getPackageUid will
already return -1. This results in killPackageProcessesLocked() not
able to find and kill the app, and wait for debugger will.

This also revert commit 55c9d739 (ag/969408) which tried to fix the
same problem but got it wrong. It's valid to -D when the process is
already running, as we're supposed to kill it. The really problem is
that the killing fails because of bad appId.

bug: 28980761
Change-Id: Ibebdcc26865464216a1f4b6773e540921cdad7d2
f8af34365c8332b48b1af9988030d2952b595d83 10-Jun-2016 Phil Weaver <pweaver@google.com> Merge "Improve accessibility window title behavior" into nyc-dev
155edc693eecb64d821a95567e719d0de7ee9c85 09-Jun-2016 Phil Weaver <pweaver@google.com> Improve accessibility window title behavior

Un-reverts ag/1057448, but uses a version of Resources#getText
that returns null rather than throw an exception when no title
is available. This is the same call made before, so this change
should be safer.

Bug: 28744278
Change-Id: I8c123f4f6d74f796ab9e8ffcf955aaf881770da1
1a77efe9ba5d111044a734415cb75ffb7cf959e1 09-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Don't update mTaskToReturnTo when task is cleared" into nyc-dev
7ee53be300573c9bdc71607d32d4a642e4ad3dc8 09-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Unlock mBluetoothLock.readLock() instead of double-locking it

Bug: 29011117
Change-Id: Ie9e359c3ee079c2cecc33f11cfff7c0dc6406be1
4624d687f7060d940563181a73c27b14d4603996 09-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "PiP animation: Move window with resize when ending animation." into nyc-dev
4b7f2d46be85700b9f1d90c9986a13cc2453156c 09-Jun-2016 Andrii Kulian <akulian@google.com> Don't update mTaskToReturnTo when task is cleared

If activity launch has moved other task that was over home while
clearing task - don't override its mTaskToReturnTo not to loose
the original value of other task.

Bug: 28986980
Change-Id: Ib1680769fbb8a8d99f2b210c8d9cd8fe6fd5a196
a9408d4a4809dd229fb7fb8f9594cb6db4b1da64 03-Jun-2016 Robert Carr <racarr@google.com> PiP animation: Move window with resize when ending animation.

At the end of the animation (when going from larger to smaller),
we are left with a scaled surface, that we want to seamlessly
resize to an unscaled surface of the new size. Because we have scaled
the shadow region of the surface, the position of the content
will differ before and after the resize applies. We use new
SurfaceFlinger API to cause position updates to apply after
resize. Because we have to switch into SCALING_MODE_FREEZE,
we could end up prematurely cropping the window, so we
switch to using screen space crop for the pinned stack.

Bug: 28899837
Change-Id: I9b762a237413e4fa3d432e67d30c7125bfef484c
b1dd80bcfe8d495478d185a5d88fc2cb981e9c47 07-Jun-2016 Ricky Wai <rickywai@google.com> Disable quiet mode after UserManager.trySetQuietModeDisabled() is unlocked

Bug: 29150970
Change-Id: Ie04cec116564147272896e4a5ca076bbc08e60b1
cf70a17a7100e06d873d15edcfa4497685476327 07-Jun-2016 Narayan Kamath <narayan@google.com> PackageManagerService: fix NPE while renaming foreign dex markers.

The User passed in to scan*LI is null during the initial boot scan
and maybeRenameForeignDexMarkers wasn't expecting it. We attempt to
rename markers for all users if that happens.

bug: 29167406
Change-Id: I892dcc542e75d62d72c062b8ce5506ef85df5fc2
1c4da6654fab74c8f477304c93211f07e432816d 09-Jun-2016 David Sehr <sehr@google.com> Merge "Simplify code paths computation, allow adb root to dump" into nyc-dev
9e94c455f8e65c81863c93c0e380be4c6bab2752 09-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Always re-enable keyguard state when the user switches." into nyc-dev
e36da9c8c9f8f50a47dd985f795dbb2b24cbef54 09-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Temporarily increase timeout for devices with buggy driver"" into nyc-dev
7014eef54af5e0e4b28700ff69561a90090f1994 08-Jun-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Teach persistable Uri grants about direct boot" into nyc-dev
ac063d64ea133461338a1bf89f949bc5b3825565 08-Jun-2016 David Sehr <sehr@google.com> Simplify code paths computation, allow adb root to dump

Bug: 28748264
Change-Id: I1aefa5d98e80b58d6ed500c5d2d610569cf25c3a
b99e19c729c3809743a808acefdae707cedf925b 08-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensure pinned animation scaling is consistently applied." into nyc-dev
f581be6ff5a08023b780a9502c7895351e4f2b17 08-Jun-2016 Svet Ganov <svetoslavganov@google.com> Teach persistable Uri grants about direct boot

We read the persistable Uri grants on boot at which point
the user is not unlocked. This results in ignoring Uri
grants for boot unaware content providers.

This change reads all persisted Uri grants on boot but
filters them out during query based on the current user
unlock state.


Change-Id: I2643fc098f42359e72a4c534236debc9b9389256
c29f62c7388f550da2c7368c5dbc0aec7d1564fe 07-Jun-2016 Makoto Onuki <omakoto@google.com> Push DO/PO package names from DPMS to PM

Bug 29126573

Change-Id: I95ea1559f6acf5d2f0e1b0953568cdfc938e83b9
e1451c4e308c3dbdfc629bc4c6c2e0a94b4a8065 08-Jun-2016 Julia Reynolds <juliacr@google.com> Merge "Handle alarm firing outside of DND period." into nyc-dev
718f321369cc9b7fde264b29c05f9dc0fc53c7b7 08-Jun-2016 Amith Yamasani <yamasani@google.com> Merge "Add a separate read permission for oem unlock state" into nyc-dev
464f7e498365340e76a5b9dfcf2235d9c93eafc0 08-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix #29073394: Need to bind to scorer after user is unlocked." into nyc-dev
ee5e4cc83646a7a3b7fcb9079ef95b514a70324d 08-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Package changed/removed listeners for always-on VPN" into nyc-dev
fc7130964024dc80c2c9a5e878418a81d35df00b 08-Jun-2016 Phil Weaver <pweaver@google.com> Merge "Revert "Improve accessibility window title behavior"" into nyc-dev
3d5e396583a845e63e102ff449d856c01125f550 08-Jun-2016 Jim Miller <jaggies@google.com> Revert "Temporarily increase timeout for devices with buggy driver"

Bug 28201240 has been fixed, reverting workaround

This reverts commit 93d828de59986a990bfd2fffcfc399deae5ba6ba.

Change-Id: Iaa10c63b48dd434badc3f6d2c23859391996abac
94b4029f03df2869c2f0e845961233cf8a87ab61 08-Jun-2016 Chong Zhang <chz@google.com> Merge "Check if task was top of stack before it's removed" into nyc-dev
c9adac6abb4baa771a06e4c78b0feec3e916f730 08-Jun-2016 Chong Zhang <chz@google.com> Merge "Set fontScale in override config to be equal to global." into nyc-dev
266ed9acc396ff007b75b8356429d703117de2d7 08-Jun-2016 Phil Weaver <pweaver@google.com> Revert "Improve accessibility window title behavior"

Bug: 29127065

This reverts commit 2a7e4442bf9892842e0fc7eba9296e8fcf9f8ea5.

Change-Id: Ibc5527cfedd49c685ffd1b8ae59e87ed99c93d39
9eb2c1e85cd5def851ebe833a7f56a49f00e448f 02-Jun-2016 Julia Reynolds <juliacr@google.com> Handle alarm firing outside of DND period.

Change-Id: Ib8bb878709ab8b5db8aba7f31e239e44409e18d4
Fixes: 28459870
92ab103cb666059d48eca9e79977cf559abdde0a 04-Jun-2016 Chong Zhang <chz@google.com> Set fontScale in override config to be equal to global.

The default fontScale in EMPTY config is 1.0. This will result in
updateFrom always overriding the fontScale to 1.0 since it's non-zero.

We can't set it to 0.0 either as that will make the override config
not equal to EMPTY. The rest of the code doesn't work well with that.

So here we always set the override fontScale to be idential to global.

bug: 29113700
Change-Id: I1dbe507145b8190a9ae5e108948c833d4e037e1d
cae13b0afff4b1ef3da25a31f2eb9b16faa14a4b 07-Jun-2016 David Sehr <sehr@google.com> Add usage line for dump-profiles

Previous commit did not include the usage line to be printed when user types
adb shell cmd package

Bug: 28748264
Change-Id: I0a684dbc44c8cc5ec7cd4eba82ce18feed53368c
2379796e114d99488e634665df24e2dd55532810 06-Jun-2016 Erik Wolsheimer <ewol@google.com> DO NOT MERGE ANYWHERE Fix NPE when UID has no packages.

CP of 377ded0fce449f77cd7efae35f97722cdab52693

BUG: 25224723
BUG: 28815187
Change-Id: I248468f0d9ccd6aef36b2076bf7f90efb833efd2
812800cb92090db31f609b907c4458ba76cf7f42 13-May-2016 Robin Lee <rgl@google.com> Package changed/removed listeners for always-on VPN

Fix 2 problems of always-on vpn after always-on package is removed
1. Prevent network being locked down (blocking all network traffic)
Otherwise, user has no way to download the vpn app from Play Store,
and never be able to gain control of the network again.
2. Allow user to connect other vpn app.

1. Switch off always-on mode if the package gets removed.
2. Restart always-on mode if the package gets replaced/upgraded.

Bug: 29050764
Change-Id: Id3e389ae0b11c6002a5167919292d9634c2014cb
110a12dff13276baa12e8587449a1a7f3a318451 02-Jun-2016 Narayan Kamath <narayan@google.com> PackageManager: Rename foreign use markers on app installation.

The foreign use markers contain the codePath for a given executable
dex file, so we'll need to rename them when the codePath changes
during an application update. If we don't do this, we might compile
that are used widely across processes (such as GMS core) with
suboptimal filters.

This seems like a messy and brittle design in general, and will be
rewritten post N so that we don't rely on file system topology.

bug: 28998083

Change-Id: Ie4f3995ba52f098edb911b5a388c63696bbd77ac
258aa3e56b02b95e8e855ef949a29babe178b4a5 01-Jun-2016 Narayan Kamath <narayan@google.com> PackageManager: Dexopt core-apps during service bringup.

Code from these apps can be loaded by the system_server and so
we need to make sure they're compiled before their package contexts
are requested. Leaving them interpreted will cause performance issues.

On a Nexus 6P with WITH_DEXPREOPT=false, this adds an additional
26 seconds to every upgrade / first-boot and ends up optimizing a total
of 20 apps.

bug: 28639246
Change-Id: Ief3c0048fda4f1b1742fbf3e2476e65fa607a18a
916f79882d7867d27fbd7abb32ec53028d9d3951 06-Jun-2016 Paul Jensen <pauljensen@google.com> Merge "Include network name in validation logs for dumpsys" into nyc-dev
265f4113ee42e89f324b087a81044a9f1dab457e 06-Jun-2016 Robin Lee <rgl@google.com> Merge "Fix that fail to setup any vpn after Network Settings reset and always-on vpn is on" into nyc-dev
bc02a3901dea52d236dd855722191155156cb856 03-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix issue #29006049: Add logging for implicit broadcasts

We now have stats on broadcasts. We collect them over a day and
then reset, retaining the last days stats. When a checkin happens,
we return either the last day or the current stats and then clear
them. Not bothing to persist anything to storage, this data is
not that critical.

Change-Id: I1c3b331bcd03f79fa5e10575d9bc2ad7d9104f6f
3e6ac81d7d618bd4f9b51c03c9226c8801e0d450 04-Jun-2016 Jim Miller <jaggies@google.com> Always re-enable keyguard state when the user switches.

This fixes a bug where an app running as a secondary unlocked
user could overwrite the current keyguard disabled state.

Fixes bug 28817843

Change-Id: I2cd88c41906a082c3a58ed06d74f901e304af500
eb47d6205f28d89d8bb1a3e127659dc24727fa7e 04-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "am/UserController: Log system uptime at two 'boot complete' markers." into nyc-dev
e4cf36fbd1ba3ec5e05c5df0421bb97b5f7f3ff0 03-Jun-2016 Chong Zhang <chz@google.com> Check if task was top of stack before it's removed

To decide if home stack should be brought foreward. If the app is
finishing, it's no longer considered "running" and cleanUpActivityLocked
could move focus to the activity below. Then removeActivityFromHistoryLocked
would fail to bring front home stack as the removed task is no longer top.

bug: 29030518
Change-Id: I887e7c226258651d887cb0a4a6c6caab0a04e6e6
d2b21047c8c133d99cbd4821a5dc88f60d933445 03-Jun-2016 Amith Yamasani <yamasani@google.com> Add a separate read permission for oem unlock state

New privileged permission READ_OEM_UNLOCK_STATE added
for system privileged apps.

Changing the unlock state still requires the old
permission OEM_UNLOCK_STATE, which is signature protected.

Bug: 28953956
Change-Id: Iedd2ad1d2d1dc3ae91122d7c406e3ee623a47d61
0409211e7f993bb793e920bb0afa97a38821002d 02-Jun-2016 Robert Carr <racarr@google.com> Ensure pinned animation scaling is consistently applied.

For the pinned stack animation, we have the special mode
where setSurfaceBoundaries computes additional scaling
factors to force the window to occupy the stack size
(which we animate). We need to make sure prepareSurfaceLocked
also respects these scaling factors or we have issues when
switching in and out of the fullscreen stack.

Bug: 28899837
Change-Id: I72ccba54b38993693ff6771882fb99ef82af5827
a087d7f4fa6de262aef346acb336fcb826d05d23 03-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Delete account from DE and CE databases" into nyc-dev
627fc2021dd3cfc65fba046f29f467f4c7362ecc 03-Jun-2016 Fyodor Kupolov <fkupolov@google.com> Delete account from DE and CE databases

When authenticator no longer exists and the user is unlocked, we should
remove accounts from both tables in a single transaction.

Bug: 28910995
Change-Id: Ibabf5d3e5ba561ffb3dda03aef99e358e2f71c58
0808eb8069ee75b93b3773b4123a85540eae738f 03-Jun-2016 Paul Jensen <pauljensen@google.com> Include network name in validation logs for dumpsys

Previously this was included in the log messages from NetworkMonitor
but that has been removed (ag/944107), making it frequently impossible
to know what network the logs apply to as there may be no way to
correlate NetIDs to WiFi SSIDs or Cellular networks if the log has wrapped.

Bug: 26075613
Change-Id: I2e3cd41fffb616ab9f855cb16790360bd3414793
b04a5eab84687d39685a75a04d62b4303134379a 30-May-2016 Victor Chang <vichang@google.com> Fix that fail to setup any vpn after Network Settings reset and always-on vpn is on

Cause: It revoked the user consent of the vpn app without reseting always-on vpn.
In addition, prepareVpn sets legacy vpn as the current package, the state in
Vpn.class is broken, as it thought the current always-on package is legacy vpn,
(mAlwaysOn is only for app vpn, not for legacy vpn). As a result, prepareVpn rejects
all VpnService.prepare.

Bug: 29031820
Change-Id: Id6bf1d6f38cf134a872811806301b8a602fb5725
21e39a2e0c15d74f148f244c64ca484ac8c08db1 03-Jun-2016 Michael Wright <michaelwr@google.com> Make lid switch edge rather than level triggered.

Right now, because of the way that configurations are applied, when
the display turns on because of an incoming phone call the fact that
the lid is "shut" will automatically put the phone back to sleep,
causing the ringer to be silenced. By making this edge triggered, the
display will only sleep or wake up when the lid is initially shut or
opened, respectively, avoiding this issue. In the future we may want
to revise this so that the lid-shut state is better understood
throughout the system to avoid these types of issues, but for now
this is sufficient.

Bug: 26600446
Change-Id: I10d403b62944ed6eceaff58cddad5c243a2884df
265bd89c3cb6f99d38d2f126a88c12fc6502431c 03-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Fix task selection logic" into nyc-dev
0bc61eb176644e243b0e131a29a5f66a4303d9b0 03-Jun-2016 Pankaj Kanwar <pkanwar@google.com> Merge "Delay handleEnable() until Bluetooth state is OFF" into nyc-dev
e47ec14318f64c29bf16b5a6bb662bc19206d6b0 02-Jun-2016 Pavlin Radoslavov <pavlin@google.com> Delay handleEnable() until Bluetooth state is OFF

During shutdown of the Bluetooth stack, if a request to
enable Bluetooth is received, the request is processed immediately.
As a result, we don't let the Bluetooth service to shutdown cleanly,
and the Bluetooth process with the native backend doesn't go away.
This creates various issues in the native backend stack.

Now, after an enable request is received, if necessary we delay
acting on it, until the Bluetooth state is OFF.

Bug: 17723234
Change-Id: I55db4bbd4f45227aa49eae996dcc328f76557a9b
206b9faa09ada62ce07026301723805b687e9892 02-Jun-2016 Andrii Kulian <akulian@google.com> Fix task selection logic

When task was selected for activity launched with flag FLAG_ACTIVITY_NEW_TASK
first matching task was omitted if there was another match lower in stack.
This lead to task shuffling in same stack.

Bug: 28848683
Change-Id: I94e55693fc7ed926fc151ba988d257bd2417dd45
a4b32b963beaa48d50a3aafdf038cfd1dc160765 02-Jun-2016 Phil Weaver <pweaver@google.com> Stop magnifying surface insets.

Apparently magnification never should have touched the insets, but
the effects were small so we got away with it before. Now messing
with them disrupts the size of pop-up windows when magnification is

Bug: 29048161
Change-Id: I4ab84f4f14cb92ca29b9085aaba7b854580f2c48
967b5815fb55e25419dcfdcf2144cce513123a61 02-Jun-2016 Jeremy Joslin <jjoslin@google.com> Fix #29073394: Need to bind to scorer after user is unlocked.

Scoring apps aren't required to be encryption aware so they may not
be discovered and bound to when the PM is queried during bootup.
To fix this we perform discovery after ACTION_USER_UNLOCKED is seen.

BUG: 29073394
Change-Id: Ic423f3f06f42932724e5f7cc53ede3be1c4f2f13
6afd15641470f174ad27442630563ab4276c6763 02-Jun-2016 Jorim Jaggi <jjaggi@google.com> Fix unminimizing dock stack for AppTask.moveToFront

Some apps call AppTask.moveToFront instead of startActivity from
their trampoline activity. We need to handle this case also and
need to do all the post processing after starting an activity
so the docked stack gets unminimized.

Change-Id: I8400995bf1d1a4a4467d01fd55fca7e5800b4645
Fixes: 28722017
899608a83f9a05d64b3fa4743215c9dd1af66077 27-May-2016 James Hawkins <jhawkins@google.com> am/UserController: Log system uptime at two 'boot complete' markers.


Bug: 28070626
Change-Id: I6ff8e840a1c1faf804d6889ac0c3ad96cca8d6f3
(cherry picked from commit 64ce4e7e810c9e002771afbe0838742a82fc4ef9)
2002061f349edfbf583b115af647f0ca34cf749e 02-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only reset global restriction owner on DO->PO for the right user" into nyc-dev
43c3a7e5a781640b862cf6f51805b3823f46fd02 02-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "make the notification enqueue rate threshold a setting" into nyc-dev
763a9bb09518884c42abe90c1553bc07c0872879 31-May-2016 Chris Wren <cwren@android.com> make the notification enqueue rate threshold a setting

Bug: 28693065
Change-Id: I08bd2ed342d5347c0075183b239558c50ada4a0a
bd2b9e0d53a211d0a5093b8bf24ac32e1a72ffea 02-Jun-2016 Jae Seo <jaeseo@google.com> Merge "TIF: Release an existing audio patch before creating a new one" into nyc-dev
9bdf289f0a1874d151684497cb3acd8f96fbd58d 02-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Skip cancelling jobs with FLAG_WILL_BE_FOREGROUND." into nyc-dev
7c5bcfc21ac87c56c57b1929ce04481fa0e116c7 02-Jun-2016 David Sehr <sehr@google.com> Merge "Installer connection support for dump_profiles" into nyc-dev
380f3b12a4725a0534d62ada7c6f3bd67ebd0d01 02-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Release AssetManagers when ejecting storage." into nyc-dev
2957d9d604a1d6cda9be33ba75ba1ad7d7185a22 02-Jun-2016 Chia-I Wu <olv@google.com> Merge "Fix clipRect transform rounding errors" into nyc-dev
34618b586996dfbfd87a3b7f0d18f26d4d1ebb51 01-Jun-2016 Jeff Sharkey <jsharkey@android.com> Skip cancelling jobs with FLAG_WILL_BE_FOREGROUND.

When FLAG_WILL_BE_FOREGROUND is set on a job (such as a download), we
need to treat the job as if it had a foreground service running so
it can continue making forward progress. We already ignore the device
idle state when offering to start the job, so this just avoids the
hiccup of stopping the job only to restart it a minute later.

Bug: 26571724
Change-Id: I348903dd3a7dd7104b0c1bf4310e2a48655d2588
98bf12f99989ba2550fac83ee48ecbb6f1582f07 26-May-2016 Jeff Sharkey <jsharkey@android.com> Release AssetManagers when ejecting storage.

When ejecting a storage device, the system process needs to rapidly
release any open FDs to prevent itself from being killed by vold.

This change examines all ResourceImpls cached inside the system
process and evicts any that reference the storage device being
ejected. (ResourcesManager will gladly recreate any evicted entries
when asked again in the future.)

Also replace broken use of WeakHashMap, since we want the values to
be weak references, not the keys.

Bug: 28867548
Change-Id: Ib9cfc66497149b6d3f8d49213e9779408a331d2a
6df8a9a89fc87649595926592bf895768c861b68 01-Jun-2016 Julia Reynolds <juliacr@google.com> Merge "Only call finish on operations that have started." into nyc-dev
65f1973ba9f91c6727a7131b31b6c563cd880ee0 01-Jun-2016 Chong Zhang <chz@google.com> Merge "Do not sanitize override config for fullscreen" into nyc-dev
3e05055af775f9539d832b1191ae2ee9bc4acf21 01-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #29069028 NYC: device boot failure: NPE in AppIdleController" into nyc-dev
a8cc378d15b21c5d49c267fe300dbc7408dafb51 01-Jun-2016 Chong Zhang <chz@google.com> Do not sanitize override config for fullscreen

bug: 29063336
Change-Id: I65c5d635133a6b3791ce1aef63547f8d38ca24b5
4357e528208c301ccf733b074eb9a815997447c9 01-Jun-2016 Julia Reynolds <juliacr@google.com> Only call finish on operations that have started.

Change-Id: I77d10913a68be529ea2c5a3f2a53ad91a4a41f47
Fixes: 29069613
13d534e7f2419219e3e26e582b1f6f5ae79be408 01-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't crash activity manager when supplying invalid URI" into nyc-dev
970e3f412d34cbeae3706de5cb1de0b3ca741f87 01-Jun-2016 Dianne Hackborn <hackbod@google.com> Fix issue #29069028 NYC: device boot failure: NPE in AppIdleController

Make sure the core parts of JobSchedulerService are initialized
before we start creating the controllers.

Change-Id: I497df12f7e6fbd93581291ec691c4b45104d67d0
93193135b184a2f1c7518d8beeff7c51b2880606 01-Jun-2016 Brian Carlstrom <bdc@google.com> Merge "PackageManager: Don't clear app profiles during system upgrades." into nyc-dev
438693dd6cc4e3fe2ffb336d551c0d69e9546102 01-Jun-2016 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #28942589: Tune job scheduler" into nyc-dev
34a6258b2a7a55733ce80b2b88753dff91c12d52 01-Jun-2016 Narayan Kamath <narayan@google.com> PackageManager: Don't clear app profiles during system upgrades.

They don't need to be cleared and will remain valid as long as
the application itself hasn't changed.

bug: 28998083
bug: 29067239
Change-Id: I2e4a4ee1b168da81073b8e70b12918db592fe691
a87770828637813dacd176ba3c8d3810f7ed6ab8 25-May-2016 David Sehr <sehr@google.com> Installer connection support for dump_profiles

Bug: 28748264
Change-Id: I22322b5a0716a030d9873edcc6dfd7f3ef2d3bca
e9a988caca733d2f292991a52a0047685a69812f 28-May-2016 Dianne Hackborn <hackbod@google.com> Work on issue #28942589: Tune job scheduler

We now have a new settings key that provides all of the existing
tuning parameters, plus some newly redone ones for dealing with
different memory levels.

Changed the minimum batching for overall jobs from 2 to 1, so
we will never get in the way of immediately scheduling jobs
when the developer asks for this. We should now be able to rely
on the doze modes to do better batching of jobs for us when it
is really important.

Also work on issue #28981330: Excessive JobScheduler wakeup alarms.
Use a work source with scheduled alarms to blame them on the app
whose job they are being scheduled for, and add a check for whether
a job's timing constraint has been satisfied before considering it
a possible candidate for the next alarm. (If it is satisified,
the time is in the past, so we should not schedule an alarm for it.)

Finally clean up a bunch of the dumpsys output to make it easier
to understand.

Change-Id: I06cf2c1310448f47cf386f393e9b267335fabaeb
88be465ce572f84649e01744a7ec96b6346b3686 01-Jun-2016 Andrii Kulian <akulian@google.com> Merge "Update override config to include some changes from global config" into nyc-dev
d7007923c55994d64514706b212fa3e8c1a3b25f 01-Jun-2016 Hall Liu <hallliu@google.com> Merge "Add null check in showLockTaskToast" into nyc-dev
cc64dfcf66a19084a58372ea7f9f5139ccc93221 01-Jun-2016 Jorim Jaggi <jjaggi@google.com> Don't crash activity manager when supplying invalid URI

Change-Id: I30a058f14d5d0a09ba86fdd10312a51db7a4a9df
Fixes: 29039290
45784f13ef6e159cbfb6e167aacb535732dcb803 01-Jun-2016 Hall Liu <hallliu@google.com> Add null check in showLockTaskToast

Bug: 29056498
Change-Id: Ic4333ec4f43e3c2916a4963b5ddf9e6ad10136ed
1755dd08cbcdd2ffb14ac2eb84edc663843ced24 31-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Turn this wtf into just a log." into nyc-dev
1c39a112b43e50da4e801d634e28ae7a130c0dcb 31-May-2016 Todd Kennedy <toddke@google.com> Merge "Remove STOPSHIP" into nyc-dev
ac2b44f5021f6d863c37167b26fe7dfba9bc4c6f 31-May-2016 Adrian Roos <roosa@google.com> Merge "Fix crash with intent-less actions" into nyc-dev
f12fce1a3aa4b28335e3644057c346e205693189 28-May-2016 Andrii Kulian <akulian@google.com> Update override config to include some changes from global config

In override config for task we set Configuration#screenLayout field based on
initial global config + shrink to fit the area on screen given for this task.
However this field also contains information (like layout direction) that we
do not intend to override and it can be changed in global config separately.
In this case we need to update the override config with changes from global

Bug: 28616488
Change-Id: I22673257621b3f9ae7933b37bd0fb9446c6042ea
87ad1fce254bdb398c5a33753f0368a596fd81f0 31-May-2016 Chris Tate <ctate@android.com> Merge "Build JobStatus objects outside the lock" into nyc-dev
9d97ee2ad26b248a1778c4ccb43859b63b24a7b1 31-May-2016 Joe Onorato <joeo@google.com> Turn this wtf into just a log.

We're seeing this a bunch, but the overhead from the WTF is concerning.
So turn it off. It means that somewhere there is a race in tearing
down the app, or maybe some place fails to call back in some scenario.

Bug: 28932059
Change-Id: Ice14ade95bb9377ad622d440fb022953ad51c34c
ee32ede54063415fd6c48742ff6a2bf407adf971 31-May-2016 Jae Seo <jaeseo@google.com> TIF: Release an existing audio patch before creating a new one

Bug: 28115694, Bug: 28954262
Change-Id: I04e2e9176a008b72468592db7dc3c7ce376b94f2
8b655e0f57b071756e7d6a3547eeabe35885bcc9 31-May-2016 Hall Liu <hallliu@google.com> Merge "Disable app pinning when emergency call button pressed" into nyc-dev
ce289e937ee6b001cd14824e5dec3c6010b51e61 31-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Look at last used app when filtering." into nyc-dev
89f4bff149c62baf8371118aed2c4e6ac29976c5 31-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Cleanup performDexOpt with instruction sets." into nyc-dev
fa78b219b7dc006a2863fc0a6d2ff68324797f8f 26-May-2016 Nicolas Geoffray <ngeoffray@google.com> Look at last used app when filtering.

In order to cover cases where a device hasn't been used
for a while.

Change-Id: I897e833ed83912b848f25a7a81fe59f0ee655be1
98a633a89cf3223f79ea625323ec2b91bee72584 27-May-2016 Victor Chang <vichang@google.com> Fix VPN Request dialog appearing each time VPN is connecting

cause: ConfirmDialog is shown when prepareVpn(package, null)
returns false when the package is in always-on mode

We added the code in ag/949136 to stop app replacing app currently set to always-on.

Bug: 28941235
Change-Id: I370e56ad59332cc3fb722a98730fa73a97e26831
25f332ca19bbd8ab53cbadf989ce919a04c3a8a7 28-May-2016 Jorim Jaggi <jjaggi@google.com> Replace Log.wtf by Log.e

Bug: 28949995
Change-Id: I2193511566124980860843da0a822621184218b1
49b515a2a5d602ddb24d146d3b6ada54a496b6c2 28-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix issue #28930592: Scoring service binding is not reestablished." into nyc-dev
2608cc891ddb989d2ba604fe556eeb5080bbf51b 28-May-2016 Adrian Roos <roosa@google.com> Fix crash with intent-less actions

Follow-up to I00d46036a2cbb73f7f733fd35bf0b743a02807a1

Bug: 28818704
Change-Id: I9a444b9dd4cea92b4a770d7051c05c48818892ad
9764fea48350e9148b606f8e10686e298437e440 28-May-2016 Adrian Roos <roosa@google.com> Merge "Simplify crash dialog" into nyc-dev
2c69d1ecae5efff06a29bec3d73f9654b8851972 28-May-2016 Adrian Roos <roosa@google.com> Merge "Fix IME and NavBar overlap with Direct Reply" into nyc-dev
bf932b006743e25e50f5e493b011e520141536d1 27-May-2016 Chris Tate <ctate@android.com> Merge "Purge an app's scheduled jobs when the whole package is disabled" into nyc-dev
a6c05d5151027f902c5c56bded008cbe15bd6301 27-May-2016 Jorim Jaggi <jjaggi@google.com> Fix weirdness when home task forces rotation

- Make sure to retain the state when divider goes through a configuration
change in order to avoid that nothing happens when entering multi-window.
Save the state in DividerState and use a handler that's independant of the
attached state.
- Don't allow home task to dictate orientation unless the docked stack is
minimized. This caused a lot of weird bugs because when docking a task,
home stack gets moved to front, and if home task is front of stack, it
temporarily might dictate the rotation but later not anymore so this
causes two rapid configuration changes which may cause a lot of weirdness.

Change-Id: I6a2308af893cd8413ee8801e5b964f6ddc0abd51
Fixes: 28943853
c5fc6c602c16f0e985d8f8ba7f94075229e52320 27-May-2016 Jorim Jaggi <jjaggi@google.com> Merge "Close IME when attaching dock stack" into nyc-dev
0b56cc2804a8cd60bc4a4a0c2870236ffa15e68a 27-May-2016 Chong Zhang <chz@google.com> Merge "Revert commits related to wallpaper cropping" into nyc-dev
3c5d0f104109048ba55308f81ca0ce7fa1afb626 25-May-2016 Jorim Jaggi <jjaggi@google.com> Close IME when attaching dock stack

So we don't end up with animation weirdness.

Bug: 28905720
Change-Id: I04124995dd99fa26d2e9be467c5976d7b20810a7
7dac366a7f72e3d3f0c7e26616ec0ee55efe1fcd 27-May-2016 Hall Liu <hallliu@google.com> Disable app pinning when emergency call button pressed

Also disables app pinning when the "return to call" button is pressed
and brings up the in-call screen when app pinning is stopped if there is
an existing call.

Bug: 28558307
Change-Id: I7672123bfa6ba6b5e960bd5166876c50425d3f76
741c0ba8aa84f2879c50884f53955bceb5b6e7f2 27-May-2016 Chong Zhang <chz@google.com> Revert commits related to wallpaper cropping

bug: 28763785
related-to: 27989717
related-to: 28887408

Revert "Fix wallpaper crop during unlock animation"

This reverts commit 616c7c10b9ca461da44a1eead2a6cb8260c82b22.

Revert "Fix wallpaper cropped too soon when unminimizing dock"

This reverts commit f0b76b071c8434fbf4a76798e9cdd56ab67e523d.

Revert "Set final crop on wallpaper instead of intersect clip with stack bounds"

This reverts commit dcf0183cea1f93f20073cb04fa64f111ea880005.

Revert "Crop wallpaper windows to their current target stack bounds"

This reverts commit e6cb450b0db119d71601a8329bed380bb2b4e275.
efa291a8605e91d775faf46ada349ec7f81fcdb9 27-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent." into nyc-dev
ad028c1616be016e6bef0d9a664d3a0054804e01 17-May-2016 Adrian Roos <roosa@google.com> Simplify crash dialog

Remove "Reopen app" for background crashes, remove "Close"
for foreground crashes.

Make crash dialog cancelable with back / tapping outside.

Remove reset option for repeating crashes.

Change-Id: I3773ee6b6986efa35da30830fec223300cda5d75
Fixes: 28768481
Fixes: 28740658
dd654eaf406ee668a040c8964c63389fe4af80ad 27-May-2016 Adrian Roos <roosa@google.com> Fix IME and NavBar overlap with Direct Reply

In phone landscape, when the navigation bar is on the right,
and when the status bar is forcing the IME and NavBar, make
sure that the nav bar and IME don't overlap, even if the
NavBar is only transient.

Bug: 28914905
Change-Id: I22921f1aca7970c2d02dfd88408eb15c5b17151f
a1b79bfd7a15006a93da933695359765e0fee495 24-May-2016 Felipe Leme <felipeal@google.com> Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.

This scenario typically happens when the device is on Doze Mode and a
notification action is triggered from a Wear device.

In a nutshell, the workflow is:

- ProcessRecord has a flag telling whether a process has "whitelist
management" privileges.
- When NotificationManager binds a new NotificationListenerService, it
- On bind(), ActiveService asserts that only system apps can set that
- On computeOomAdjLocked(), ActivityManagerService sets the
ProcessRecord flag if necessary.
- Upon creating a notification, NotificationManager calls AM to mark its
PendingIntents as coming from a notification.
- When PendingIntentRecord sends it to the target, it checks if it's
from a notification and if so calls AM to do the temp whitelist.
- On unbind(), ActiveService removes the ProcessRecord flag if necessary.

Fixes: 28818704

Change-Id: I00d46036a2cbb73f7f733fd35bf0b743a02807a1
1ec8cd95426a22ded1ab9a13c7608ce9c699010a 27-May-2016 Jeremy Joslin <jjoslin@google.com> Fix issue #28930592: Scoring service binding is not reestablished.

Force stopping the bound scoring service would not automatically
reestablished the binding.

Replaced the custom BroadcastReceiver with a more standard
PackageMonitor implementation that handles the same actions in
addition to force stop.

Also added a few more debug log statements as they were helpful
during my development.

BUG: 28930592
Change-Id: Ic36ea77deb5e2117edc201e97d71be63bdd4230d
8a5536d53ef1eea92e1a2b997744a27ce904134c 27-May-2016 Zoltan Szatmary-Ban <szatmz@google.com> Only reset global restriction owner on DO->PO for the right user

Change-Id: I4ef727205bbd8ec319672480bac7b519b33d2a58
6c8187282ecc20419a5a70371bc6a21af6d364e0 27-May-2016 Toni Barzic <tbarzic@google.com> Clear calling identity before calling mountService

Change I8106bfba28da401b9fd38349c6a9fa9a24f54712 unwittingly
reintroduced requirement for apps that change password to have
This fixes the problem by clearing calling identity before
calling mountServce in fixateNewestUserKeyAuth, like it's done
in addUserKeyAuth.


Change-Id: I1bcd9f6eefa892b021d93df2638c8dba4d4b5400
fb6cf77a6721f2af4df09b33d649f66ad79559f6 27-May-2016 Nicolas Geoffray <ngeoffray@google.com> Cleanup performDexOpt with instruction sets.

Always use the packages' derived instruction sets.

This fixes a bug where otas and background dexopt would only
look at one instruction set.


Change-Id: I730b59d24943c71de30adb485a823fd79c6806a6
e6bcaf134aed92a00dc5c9ee789e8a7185ffb861 27-May-2016 Chia-I Wu <olv@google.com> Fix clipRect transform rounding errors

For clipRect.right and clipRect.bottom, we need to round them up.

Bug: 28864193
Change-Id: I2bd30eec8a8093e0fdcc7ce8484a0610fd068792
20237bc68fa32422fe256f75e331a4a3bdc3fd24 27-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only make Recents activity invisible if not focused on TV devices." into nyc-dev
b5c0788d3686351cfe594c6b680d2857f89e4a63 27-May-2016 Christopher Tate <ctate@google.com> Purge an app's scheduled jobs when the whole package is disabled

Bug 28979894

Change-Id: If8a99489eaaa219274289fdf2e90be8bdecb3bfa
cef12198a729209fc8bfb2b2483fb3730f0fd428 27-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Protect against NPE while to updating service connection activities." into nyc-dev
58f1167ecf03c4cdce7e881ccf7c0e0506c14613 27-May-2016 Rob Carr <racarr@google.com> Merge "Ensure surfaces only resize during relayout." into nyc-dev
32ceb9c801a86f901ec8230eec301c30e1deff3b 27-May-2016 Robin Lee <rgl@google.com> Merge "Move VPN restriction check into setup dialog" into nyc-dev
0d35765ca343ae7b04df7a93c233e5b6860eec22 27-May-2016 Jorim Jaggi <jjaggi@google.com> Merge "Handle trampoline activites in different tasks" into nyc-dev
352d584b20af23a6a99958aafcf8127e6dc09894 19-May-2016 Jorim Jaggi <jjaggi@google.com> Handle trampoline activites in different tasks

When the app uses a trampoline activity that launches in a different
task than the main task, we fail to show recents when the task is
docked and the user launches the trampoline activity from home. Add
logic to handle this case.

Bug: 28368989
Change-Id: Iea29e6cd1a9919da0e856955691fac4792e30604
cf984c56adf88ab9d85b9a6ca71d800c2a937e6c 25-May-2016 Jorim Jaggi <jjaggi@google.com> Fix toast with accessibility and app pinning

Bug: 28912468
Change-Id: Ica33ba691bbcb921c5d3e953890498c04bb624e3
793ac342196c57f6b89ad9d1425fc420fbb44bb5 27-May-2016 Wyatt Riley <wyattriley@google.com> Merge "Prevent use of a null sCallbackObj by Hardware FLP" into nyc-dev
ca2af9e38c31c823f72a6060c45b27fc968e6bd8 26-May-2016 Wale Ogunwale <ogunwale@google.com> Only make Recents activity invisible if not focused on TV devices.

Change was introduced in b/28246419 to fix Recents activity visibility
issues on TV, but was causing other issues on phones. So, only apply
rule on TV devices.

Bug: 28246419
Bug: 28943853
Change-Id: Icd19eae4ffa5e0a798bc9f63bc7a6c9a60422236
fed100742011bbc3092925c37e9f2df4ab04b6b5 26-May-2016 Robert Carr <racarr@google.com> Ensure surfaces only resize during relayout.

For clients which use an indeterminate measure spec in their
layout params (MATCH_PARENT). We could try and change their window size
due to a stack resize, before the client calls relayout. This isn't
safe as the client never had an opportunity to pause rendering, so it
could be in the middle of producing a frame for the old size to suddenly
find the buffer size change underneath it.

Bug: 28559097
Change-Id: I3982936fdf85c22def2f9c754d5508e029e4a84d
d6ee8993973050befff3a5f10f273ef9e8a050e2 26-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Delay PACKAGE_RESTARTED until after data cleared." into nyc-dev
678dba737bed94eb5eeeed63db74aa811ee896cb 26-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Careful process validation for unaware providers." into nyc-dev
a39d888651493d20f3814cd88a39a521450b3eac 26-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Suppress unlock notifications on non-FBE devices." into nyc-dev
d6ac76284d0a5a74988931d9a8d8c3785b5aa62a 26-May-2016 Wale Ogunwale <ogunwale@google.com> Protect against NPE while to updating service connection activities.

Bug: 28972558
Change-Id: I83f6e33248bb5b5c6ed34a3590d594bf82463a96
d9599faf6b872fb5e1db72f7239b21d05050bd47 26-May-2016 Julia Reynolds <juliacr@google.com> Merge "Unlocked access of mServices is bad." into nyc-dev
a4dbdaf5e96273dccd474e31700d84a1ad907503 26-May-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Remove ActivityManager calls with PM.mInstallLock held" into nyc-dev
4670d3efe26e500b4c06b2e436bff11e7b9200ae 26-May-2016 Jeff Sharkey <jsharkey@android.com> Delay PACKAGE_RESTARTED until after data cleared.

Some system internals are using the PACKAGE_RESTARTED broadcast to
rebind to services, which would fail if the package was still frozen
due to a long-running clear data operation. To avoid this, delay both
the PACKAGE_RESTARTED and PACKAGE_DATA_CLEARED broadcasts until after
the clear operation has finished.

Bug: 28964281
Change-Id: I18ac36c39ba90498b1eb0cc495da1f16c24614bf
585d8b28f5d174d0f50d0c7c3e5e7202f6cd36a1 25-May-2016 Jeff Sharkey <jsharkey@android.com> Careful process validation for unaware providers.

When unlocking a user, install any direct boot unaware providers into
processes that were started before unlock. Mirror the conditional
logic used in all other provider locations.

Bug: 28708253
Change-Id: I2044558456d7f8e509374659f7c89abf01869cd9
ad92957ee31c756d3f2b3ada45357e4a180e82e3 26-May-2016 Julia Reynolds <juliacr@google.com> Unlocked access of mServices is bad.

Change-Id: I626d2daffb3669c7bea4856f8ee66dbd13951163
Fixes: 28979051
33154deb700a8cf5df6fff39f0b3291d1278efa0 26-May-2016 Robin Lee <rgl@google.com> Merge "Check if we're connected before marking a UID blocked" into nyc-dev
8e5d7413b85a7b202bc917eee4287762b13b864b 26-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "boost starred people to at least high importance" into nyc-dev
4a39936d3669696dc6a25a4023daf7a7e4b158ef 26-May-2016 Jeff Sharkey <jsharkey@android.com> Suppress unlock notifications on non-FBE devices.

We have a longer-term plan to clean up FBE unlock notifications, but
in the meantime don't confuse users by quickly flashing them on
non-FBE devices.

Bug: 28840764
Change-Id: I696508ef981b6f8f51f22ea24487d87d27d5b6e3
ebbcb54a4380239ea3d0c4d1a20cd6b3c9ec0590 24-May-2016 Robin Lee <rgl@google.com> Check if we're connected before marking a UID blocked

This kills the always-on test, and any third-party app that correctly
checks whether it's blocked before attempting to make a connection.

Only affects always-on VPN when lockdown=true.

Bug: 28909500
Change-Id: I87aa9598d3872ae2ec409c2b19d73052c21ec878
c396f0f70ef40ea0fb42a0872a13f4c4e9a6a5f0 26-May-2016 Michael Wright <michaelwr@google.com> Merge "DO NOT MERGE Remove Pointer Capture API" into nyc-dev
1cb6f9d8a4827d50e26bf83068a928e47c5c1f1e 26-May-2016 Ricky Wai <rickywai@google.com> Merge "Add resetKeyStore() in LockSettingsService" into nyc-dev
610fb8a3f2dcdc66dbc4e31d92a08cc249b5ca7b 26-May-2016 Ricky Wai <rickywai@google.com> Merge "Store work lock type even it uses unified lock" into nyc-dev
19d34821b9c0a74d4269fff0bee87a7f486e1603 26-May-2016 Nicolas Prévot <nprevot@google.com> Merge "Use correct user id when checking uri grants for notification." into nyc-dev
ce9f5e3657b7a8fb68c6c65a2cd5a27eaf556cc8 26-May-2016 Seigo Nonaka <nona@google.com> Merge "Fix system locale propagation during user creation." into nyc-dev
c8f13d504f84ac96efc1283d42f19c1366cf790a 26-May-2016 Wyatt Riley <wyattriley@google.com> Prevent use of a null sCallbackObj by Hardware FLP

Bug: 28730136
Change-Id: I5898583e8108c4cfa8574a0adc5b50d6983b247e
dbcca24f8e239a34ededaef8a7fc924c196f98cb 26-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28964589: Binding dies when (unrelated) component is disabled in package" into nyc-dev
a1984286d397e4198d4e26572fb54cd55dce6d20 26-May-2016 Andrii Kulian <akulian@google.com> Merge "Fix exception when trying to update config of detached stack" into nyc-dev
7ab1a4d286898acffd1f3b444f9efc9e1d2a104e 26-May-2016 Phil Weaver <pweaver@google.com> Merge "Improve accessibility window title behavior" into nyc-dev
135c4760fddc7809ea5f7e9d58bc3f4b3a076875 26-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "BatteryStats: Allow for sample errors in wlan stats" into nyc-dev
38a37f336f96896146efc1a85310504bf4f77116 26-May-2016 Christopher Tate <ctate@google.com> Merge "Backport of backup transport whitelist" into mnc-dev am: 2cfc6baa22 am: 600d4f61ca
am: c69aa838a8

* commit 'c69aa838a8f89ba7476ce554ecf5a19a6de78b28':
Backport of backup transport whitelist

Change-Id: I0151279dfa467d6f456c2cfb4066cbc2ff4f7365
47fb83a1e256e5137b9830e044bf2acdf89e2ee0 26-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28964589: Binding dies when (unrelated) component is disabled in package

We go through the same path for uninstalling and changing an app...
both of which would do a full force stop. That is only appropriate
for uninstalling; for changing, we should just be killing its processes.

Change-Id: Ia87750d96d3e3eb7ee30841429eb926c20c5ad78
c69aa838a8f89ba7476ce554ecf5a19a6de78b28 26-May-2016 Chris Tate <ctate@android.com> Merge "Backport of backup transport whitelist" into mnc-dev am: 2cfc6baa22
am: 600d4f61ca

* commit '600d4f61ca15b375c9acef64d52913f0ab823deb':
Backport of backup transport whitelist

Change-Id: I308a0f0284990dc8e327c581cac49db899ad6cfa
600d4f61ca15b375c9acef64d52913f0ab823deb 26-May-2016 Christopher Tate <ctate@google.com> Merge "Backport of backup transport whitelist" into mnc-dev
am: 2cfc6baa22

* commit '2cfc6baa2286a256585a7fb6295f9b66ff641726':
Backport of backup transport whitelist

Change-Id: I73dff5d354cd5f26a7f2e68e16f8dd798d610fd3
e55e4b7f73be3b3babd28581a839d0b9700d555d 26-May-2016 Chong Zhang <chz@google.com> Merge "Update dock stack create mode after rotation if dock side changed" into nyc-dev
2cfc6baa2286a256585a7fb6295f9b66ff641726 26-May-2016 Chris Tate <ctate@android.com> Merge "Backport of backup transport whitelist" into mnc-dev
73d4b44ce3198b0b4ac477a64d5f12a152dba549 25-May-2016 Chong Zhang <chz@google.com> Update dock stack create mode after rotation if dock side changed

On some devices (such as tablets) dock stack could be created on top,
but put to right after rotation. Dock create mode needs to be updated
in this case, otherwise when a new stack is attached to the display
(for example launch into now-cropped fullscreen stack),
attachDisplayContent() will use wrong dock mode to derive the bounds.

bug: 28942558
Change-Id: I83e66aeac94bd3f96c4b6a0a740acf76234bbe82
c45f0aea71944464b7636023f56a53fa635c09e2 26-May-2016 Antonio Cansado <acansado@google.com> Merge "Cleaning up NetworkStatsManager." into nyc-dev
ac06a4907bff7d5ee0612dbb85180222e1455791 25-May-2016 Fyodor Kupolov <fkupolov@google.com> Remove ActivityManager calls with PM.mInstallLock held

UserController now pushes user state to UMS.

PM now checks user running/unlocking/unlocked state by calling

Bug: 28090199
Change-Id: I20e62b37f78238f28dd81f49f876732bbd3c6b34
0be2cfec46cebe44b638c2a95f613de53bb4526a 25-May-2016 Andrii Kulian <akulian@google.com> Fix exception when trying to update config of detached stack

There is an NullPointerException which can be reproduced with following steps
on angler:
1. In split-screen open activities from the same app.
Make sure to launch them from launcher.
2. Rotate device to landscape.
3. Force-stop the app using adb command.

After killing the app it will try to open launcher, which is fixed in
portrait mode on that device. This will update the configuration for all the
stacks, including already detached.

Bug: 28786255
Change-Id: Ia326c09cff9f1a3fb43cca5b48db29718553346a
48b18f4fa994e201e3eb4cca1e7c823b198359c5 25-May-2016 Robin Lee <rgl@google.com> Merge "Return legacy VPN info regardless of lockdown mode" into nyc-dev
7e431621c41af719354cb7100c2c9195179cdbe6 25-May-2016 Chris Wren <cwren@android.com> boost starred people to at least high importance

Bug: 28949659
Change-Id: If604062a282db5db463642315a8fa5f7cd6e597c
2a7e4442bf9892842e0fc7eba9296e8fcf9f8ea5 20-May-2016 Phil Weaver <pweaver@google.com> Improve accessibility window title behavior

Suppress the default, unlocalized strings from being read as title.

Bug: 28744278
Change-Id: Iea0f7d8fed3d6428ada725cf3ffa077ba974b74a
39e8022a75507be06179c3de7358cebb1bb22e06 25-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Force pending transactions to flush before screenshot." into nyc-dev
904237f83940676433104952d165d3b28d961044 25-May-2016 Antonio Cansado <acansado@google.com> Cleaning up NetworkStatsManager.

- Throwing SecurityExceptionand and IllegalArgumentException instead of null for new APIs
- removing @removed APIs

Change-Id: Ifbe65bfc5051aa33aff2baa22cfa8e67b0f7c358
3eddecc3bc6e4f9f2d9b6a64d6d1f0addfb286a4 25-May-2016 Christopher Tate <ctate@google.com> Build JobStatus objects outside the lock

Constructing a JobStatus can be a surprisingly heavy operation, potentially
involving IPC; so do so outside the primary lock when possible in order to
reduce lock contention.

Bug 28946245

Change-Id: I51fffa6d29d566647edb583ae6e46ed6038d36e3
2be3de172376caa0257a59dd6646952baf90b203 21-May-2016 Christopher Tate <ctate@google.com> Backport of backup transport whitelist

Sysconfig define a whitelist of permitted backup transports

Previously any apk bundled in priv-app could insert a backup transport.
Reduce risk surface by giving the OEM explicit control over who is
allowed to handle backup data.

Bug 28406080

Backport of 494df791728f4d42d67e935c327910975993ad29 from N

Change-Id: I9f90e324169a68720d608f74754d284a7e59cf87
15818e1156101f1d3a01009e7bc223d8ae88546d 25-May-2016 Chong Zhang <chz@google.com> Merge "Destroy saved surfaces if one of the last visible windows gets removed" into nyc-dev
83eec7037bfe8a84088cca6dc1446dcf1edb4695 25-May-2016 Julia Reynolds <juliacr@google.com> Note timezone changes.

Bug: 28945282
Change-Id: I62fc62e359435f19fecd7e52b2fe778475c5804c
2078d3499bca6cd6223ff76a5607eed7357aff22 25-May-2016 Roshan Pius <rpius@google.com> BatteryStats: Allow for sample errors in wlan stats

Add some leeway in the reported time because some inaccuracy
is expected in these stats between samples.

BUG: 28932100
Change-Id: Ia643fa666ca16c0c707d189ec2bc703fe1ef08a4
7b9eb419e35f12963eeea119b51a241146029b74 12-May-2016 Ricky Wai <rickywai@google.com> Store work lock type even it uses unified lock

If we are not storing this, LockPatternUtils.isSecure(workUserId)
will return false, and cause some methods like trySetQuietModeDisabled()
cannot show screen lock correctly.

Bug: 28738725
Change-Id: I7d0b61022b0afff2dac4cdae72d558118ea892e7
d398244513c62c9ea14a0f1c6ffef832e803c16f 24-May-2016 Ricky Wai <rickywai@google.com> Hide work profile key in user credentials screen

Bug: 28878708
Change-Id: Ib250fae2388b061430d93b7d65133002ce664993
f420c413b9abd58dcbea881535da5b603f7f7afc 25-May-2016 Ricky Wai <rickywai@google.com> Merge "Unlock work profile storage even work mode is off" into nyc-dev
99df649aa4907d9f9c6fe4bdf4acb517003f97f2 25-May-2016 Ricky Wai <rickywai@google.com> Merge "Do not tie managed profile synchronously in onUnlockUser()" into nyc-dev
4613fe41ac9e817e76d7087de45bf01f4a6584d6 24-May-2016 Ricky Wai <rickywai@google.com> Add resetKeyStore() in LockSettingsService

Before resetKeyStore(), it will back up child profile keys,
and will be restored after primary profile keystore is cleared.

Bug: 28878708
Change-Id: I0cb4a1f885d468894bc7eb95af694328bf92ce16
9d4e66ece64f6b65d8a902a6f03f945a0fe88868 25-May-2016 Hugo Benichi <hugobenichi@google.com> Merge "Fix default network transition event recording" into nyc-dev
1893c4cea7825e9f44f08b6165a04fd90c1adf9d 25-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updating user restrictions when they are removed" into nyc-dev
1654b1d11c3f4195d6f691bd1b6eb5aa672ffc94 24-May-2016 Hugo Benichi <hugobenichi@google.com> Fix default network transition event recording

When disconnecting from a default network X and falling back on another
connected network Y as the new default, ConnectivityService was
attempting to record this event as a X -> Y "atomic" transition.

In practice the default network connectivity is actually lost and
recovering default network takes some non-zero time.

This patch changes the event recording to always record disconnection as
X -> 0 events. At the same time, if there is a fallback network that is
elected as the new default ConnectivityService will also record a 0 -> Y

This patch also improves pretty-printing of DefaultNetworkEvent.

Extract from $ adb shell dumpsys connectivity_metrics_logger --events
17:51:00.086: DefaultNetworkEvent(0 -> 100:CELLULAR)
17:51:25.232: DefaultNetworkEvent(100:IPv4 -> 101:WIFI) # wifi goes on
17:51:44.064: DefaultNetworkEvent(101:DUAL -> 0) # wifi goes off
17:51:44.187: DefaultNetworkEvent(0 -> 100:CELLULAR)

Bug: 28204408
Change-Id: I63252633235bf6ba833b9ac431a80dda75a93e67
0810732a2affee7264d12b73fbcfa82d0db991b4 25-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add missing "try ... finally" safeguards" into nyc-dev
7a1aa926109b090251d193426ba9fdc699e6f3b7 25-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28931042: wtf in system server" into nyc-dev
64e0dcb989f27fc9246f3b2f40accd261f574d7e 25-May-2016 Suprabh Shukla <suprabh@google.com> Updating user restrictions when they are removed

Local user restrictions were not being updated in
AppOpsService#setUserRestrictions when a restriction was removed.

Bug: 28908581
Change-Id: If22f5834fadca33ec8b80bc4fb3993c1e1c29824
f58631a6a265a12a64a5c697178e0f4784f562ac 25-May-2016 Chong Zhang <chz@google.com> Destroy saved surfaces if one of the last visible windows gets removed

Also, if by the time the app is closing, a window is still invisible
in layout (or is already removed), mark the window as mAnimatingExit,
so that the surface is destroyed (or saved again). If it's marked
for removal, the window gets removed as well.

bug: 28913302
Change-Id: Ifa3dc0742f9c8c09d741fd64dcdc01b49075628c
ae02bfdd289f7172faeb57664ef47de8b547fa05 25-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28931042: wtf in system server" into nyc-dev
e957a8a0b4100d001f79c866e7904d2426ac8da0 25-May-2016 Pavlin Radoslavov <pavlin@google.com> Add missing "try ... finally" safeguards

Safeguards for code protected by ReentrantReadWriteLock.

Bug: 28734075
Bug: 28799467
Change-Id: Ib7f598a92e8df6bd855ca48cdd094c1c73a935f2
a8e6f875bc07dc12d3c8284cef5b5d83d93ff743 24-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28931042: wtf in system server

More broadcasts (from telephony) that should be protected.

Also put a little more information in the wtf message to
help determine where broadcasts from out of the system process
are coming from.

Change-Id: Ie3df25c883482ca54c7a7c5db57ca609950f5cbc
f950ec9b1adeea9eea2fa323164030cdae07ee26 25-May-2016 Jim Miller <jaggies@google.com> Merge "Fix missing permission check when saving pattern/password" into mnc-dev am: 45c77d951a am: 9bf8474c27
am: 89e3f2ba98

* commit '89e3f2ba98ea6d69b1846e996c4c279a9b20c4e9':
Fix missing permission check when saving pattern/password

Change-Id: Ice157c9ee86cf29380766d3ec266cb57594a5868
89e3f2ba98ea6d69b1846e996c4c279a9b20c4e9 25-May-2016 Jim Miller <jaggies@google.com> Merge "Fix missing permission check when saving pattern/password" into mnc-dev am: 45c77d951a
am: 9bf8474c27

* commit '9bf8474c27642f48aa27e2edf1bdd83b27d692c1':
Fix missing permission check when saving pattern/password

Change-Id: I4238a43dc30be54375b6db129b360cc7d0a90b0e
9bf8474c27642f48aa27e2edf1bdd83b27d692c1 25-May-2016 Jim Miller <jaggies@google.com> Merge "Fix missing permission check when saving pattern/password" into mnc-dev
am: 45c77d951a

* commit '45c77d951ab5203b8e19c2ed2ce3a0816e42b118':
Fix missing permission check when saving pattern/password

Change-Id: I81947e95d5365bbf6a4927435f43c73dc4ac2bb0
fc2a7ce7acc5ede8b26f35819c8287df1fed135c 24-May-2016 Amith Yamasani <yamasani@google.com> Merge "Don't deliver broadcast to apps that are being backed up" into nyc-dev
a8c16935d9ba4d09d79e90ec430a7f3d31492d48 24-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28931042: wtf in system server

Broadcast needs to have a valid action. We'll just pick
a generic one, since the receiver here doesn't care.

Change-Id: Ifff87626d11dd9fafb4e68819e8c8cecdf7fe1aa
bb26248bbba6e4014ea89a97b86618b7289a5f29 24-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "Improve performance of LocaleList with Resources" into nyc-dev
b61e405397200f78b1c652143cba7c751df05a00 20-May-2016 Adam Lesinski <adamlesinski@google.com> Improve performance of LocaleList with Resources

We allow each individual Resources object to select the best
Locale for the given APK. This allows one update to the configuration
instead of multiple updates, once the locale is chosen.

The Java locale is selected from the app context's locale.

Change-Id: I99e1e53f522e560f3b80bbd1e1c605f552dbdff0
ed353f173852551f0dc0b360512a9abc5c77c28e 24-May-2016 Tony Mak <tonymak@google.com> Merge "Fix first notification of each app is not shown" into nyc-dev
b5f3b5c2e5108b875fdb21726eeca41f58d59d49 16-May-2016 Amith Yamasani <yamasani@google.com> Don't deliver broadcast to apps that are being backed up

When doing a full backup, mark the process as being in
backup and don't deliver any broadcasts to an app in
that state.

Bug: 25350780
Change-Id: I1adc95431f709495d3c1141c7c5d3616cf9cc1f0
0f6363e8b3b091508181ea6cef5f5f87a4f75016 24-May-2016 Wyatt Riley <wyattriley@google.com> Merge "Adding SBAS offset to Gps/Gnss SvStatus converter" into nyc-dev
fd303327083fdf309b9d8a15343f9eb70c014b11 24-May-2016 Tony Mak <tonymak@google.com> Fix first notification of each app is not shown

When app tries to post its first notification,
value of now is equal to that of mLastEventTime.
And hence getRate return a very large number.

Bug: 28902358

Change-Id: If5b5b3c46e2bb80a9b40988ba7f7d777e40cc8e7
efd3a1749f2737199643cc29bea6132a9786223b 24-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed enforceMeteredApnPolicy when Data Saver is on." into nyc-dev
d4a45e0c40b46e3d57617a91dbb0a9dc4412208c 24-May-2016 Chong Zhang <chz@google.com> Merge "Fix wallpaper crop during unlock animation" into nyc-dev
cdcc53d007d613ccfcf3a36ce22fa6823c5fe954 24-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #27995384: Time in the top bar different..." into nyc-dev
f6527aebbce5e2b6b771fa42ae499c2e7584bd26 24-May-2016 Wyatt Riley <wyattriley@google.com> Adding SBAS offset to Gps/Gnss SvStatus converter

Opposite sign of Glonass & BDS offsets. Noticed after screenshot search & further testing.

Bug: 28623392
Change-Id: I6a7c98f455ee7df278eed985ba57ec1c12d888e0
3011fd4dbd4585917af71e109353e6e02332ef5b 20-May-2016 Julia Reynolds <juliacr@google.com> Set autobundled summary color.

Change-Id: I8ceb0b045359dc364fcec411fcfc610f7f57d8db
Fixes: 28615262
a2fbfbce9ef09ed7a98222e67709aa086e548c79 24-May-2016 Gustav Sennton <gsennton@google.com> Merge "Load WebView even if WebView relro creation times out." into nyc-dev
e9953b1752a583058e639ef3de456988ab6ef7bf 24-May-2016 Robert Carr <racarr@google.com> Force pending transactions to flush before screenshot.

Following 14e54ba747 (ag/1043009) we need to push an empty
synchronous transaction if we want to ensure all previous
transactions have occured before taking a screenshot. In
light of Bug 7552304 it seems wise to do this before screenshoting

Bug: 27098060
Bug: 7552304
Change-Id: I6d7dfbe634a288c55449d2f1d6fbbfc13bab08ad
eb50a39e98acb78d16465041bb5c172aa1637e97 23-May-2016 Pavlin Radoslavov <pavlin@google.com> Reduced the impact of "synchronized" statements

* Removed "synchronized" statements that are not needed
* Replaced "synchronized" statements with Read/Write lock as
appropriate. The lock protects the access to and the setting of
BluetoothAdapter.mService and BluetoothManagerService.mBluetooth and
associated state.

Bug: 28734075
Bug: 28799467
Change-Id: I8f8281c505f0a1ae0add1e14a3caba1f5b2a98e4
616c7c10b9ca461da44a1eead2a6cb8260c82b22 24-May-2016 Chong Zhang <chz@google.com> Fix wallpaper crop during unlock animation

Do not crop wallpaper if the wallpaper target is animating but stack
clip mode is not STACK_CLIP_AFTER_ANIM. We can't crop wallpaper with
final bounds as the crop needs to apply before the transform.

bug: 28887408
Change-Id: I62b9a5ca818c3ca8d0af26d807318f63747b8ac4
aa9a59d410eea64e3bb86b2f9bf1f03206a3e1f0 24-May-2016 Dianne Hackborn <hackbod@google.com> Work on issue #27995384: Time in the top bar different...

...from time in the clock app

Always reset the kernel's next wake up time when we come
out of it, even if it didn't say an alarm went off.

Also add some more debugging to try to figure out what is
going on.

Change-Id: Ibf36d65b78c841128774d81517a7eb670c396c29
647cb6a6d82e3bb22eca0e5a27810e99084e2d5b 21-May-2016 Christopher Tate <ctate@google.com> DO NOT MERGE : backport of backup transport whitelist

Sysconfig define a whitelist of permitted backup transports

Previously any apk bundled in priv-app could insert a backup transport.
Reduce risk surface by giving the OEM explicit control over who is
allowed to handle backup data.

Bug 28406080

Backport of 494df791728f4d42d67e935c327910975993ad29 from N

Change-Id: I405b49daee8c576584575c3e46877cc97632d8c6
42d4a337a3b1a14f4d9daf6eb8275a01ba20e680 23-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only resuming starting dontWaitForPause activity once" into nyc-dev
c991879f29c399ad7ede2b5c2c82e2e748f5e0df 23-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Recording activity notification: return list of configuration" into nyc-dev
0513125c92789912214235faad26e7a97184a53a 23-May-2016 Sid Soundararajan <ssoundar@google.com> Merge "Add a check to adjust thumbnail scaling for full screen shots on TV" into nyc-dev
18ef5431026365dd3b53a505fc57f538cf8dd48e 23-May-2016 Chong Zhang <chz@google.com> Merge "Don't include removed window when counting interesting windows" into nyc-dev
e292eb3d4d0a2809b760eb849dc77c0f47e9494c 21-May-2016 Chong Zhang <chz@google.com> Don't include removed window when counting interesting windows

Also do not give input focus to window that's already marked for removal.
The input channel is already disposed and input manager will treat these
as null focus.

bug: 28797800

Change-Id: I3cb2d514a7286847f1ad6af3f629d04c303d3cbd
bc0a5cb2f8b5cac550196b535d91e07bb586f647 23-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed flicker when docking task from recents." into nyc-dev
653e7bedb4ea95f69c109d54ddd0b7a49e6530c6 23-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixing isOpRestricted in AppOpsService" into nyc-dev
cac5c322da0b81a1a2106c8e248b0fe476f1ea6b 23-May-2016 Wale Ogunwale <ogunwale@google.com> Only resuming starting dontWaitForPause activity once

For a starting activity that doesn't wait for pause, we can resume it
when ensuring visible activities when pausing back stacks. If this
happens, there is no need to try to resume it again.

Bug: 28853615
Change-Id: Iee40b80eb13ab3fd65fdce0c100c4051e64f229f
4332dda9a76191b0f055dedbea8d509a20d5c455 12-May-2016 Sid Soundararajan <ssoundar@google.com> Add a check to adjust thumbnail scaling for full screen shots on TV

This should let us get away with taking smaller bitmaps for TV.

BUG: 28371792
Change-Id: Ia5d43dd48c57c4dd519b46f0c0d0ec94df5f42a9
fd07efa44e1337f9b573d977cd3e8d701af8fe48 23-May-2016 Gustav Sennton <gsennton@google.com> Load WebView even if WebView relro creation times out.

There are cases in which the WebView Update Service can stop switching
WebView providers (if the update service is notified about relro
creations an incorrect number of times) and in those cases apps will
fail to load WebView.

In this CL we mitigate this problem by allowing apps to load WebView
even if the time-out is reached and we also decrease the time-out so
apps are less likely to ANR when waiting for the time-out.

This CL does not prevent the update service from ending up in a bad
state - so we will still end up crashing apps if the current WebView
implementation is uninstalled after relro creation fails.

Bug: 28860862
Change-Id: Ib6af3722e17a13db77ef34c37581a6a0e1d045bb
f04fab160a044e4e7d936c0457a156d7911f924c 19-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Recording activity notification: return list of configuration

Use a list of configurations instead of an array

Bug 28819230

Change-Id: Ia4a3cdabf8337cfb98abe4d0055d497bcab8a5ee
a4aba6eaf57ab0c41c03368eb7dae1abeba07273 21-May-2016 Felipe Leme <felipeal@google.com> Fixed enforceMeteredApnPolicy when Data Saver is on.

When enforceMeteredApnPolicy() is called when Data Saver mode is on and
the caller's UID is not whitelisted, it should add a
NET_CAPABILITY_NOT_METERED to the capabilities.

Change-Id: Ieed4f4a7634ee023ec58c91859263655e0ba62d4
Fixes: 28608499 (and https://code.google.com/p/android/issues/detail?id=208478)
8c09c7dd7a8838383a94ef85974a8ff0841dd8c5 23-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed flicker when docking task from recents.

Regression introduced by ag/1044640 where we don't want recents to the
visible if it's stack isn't fullscreen or focused. However, it is
possible for switching the home stack to not-fullscreen to prolonged
while transitioning to split-screen mode from recents. We now check
for if the docked stack exists which is a better indicator we are in
split-screen mode regardless of if the stask is fullscreen.

Bug: 28882948
Bug: 28246419
Change-Id: I54c02cc1486e7b5bf6a20dd0706c9bfe3f40a953
4266feeb93fae4603e8a43d065160430a4c784a5 23-May-2016 Ricky Wai <rickywai@google.com> Unlock work profile storage even work mode is off

Bug: 28860823
Change-Id: Ic89027f163e4c4e1ba9e8c24174475b6a4a983a4
d86ac8116bfc64c61d8124ff8d3e92be5e55cd3e 23-May-2016 Victor Chang <vichang@google.com> Merge "New api in LockSettingsService to get StrongAuth synchronously" into nyc-dev
051f3b7aecdde128ec3b812164a39dff81633b84 18-May-2016 Nicolas Prevot <nprevot@google.com> Use correct user id when checking uri grants for notification.

An application is allowed to notify a change to a uri if it
has a grant to this uri. Use the correct user id to check
this grant.

Change-Id: I8bad2e65325fdfef4907d7b71b4f264dff567217
cb988096570de8af4883ae3bdea06c88f8fd235a 23-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Only actually log the DNS events we have." into nyc-dev
c304a15751383e8254b00558a50a33ec04917e07 23-May-2016 Lorenzo Colitti <lorenzo@google.com> Only actually log the DNS events we have.

DnsEventListenerService#logAndClear was always logging 100 DNS
events regardless of how many were actually logged. The rest of
the events were either all zero or previously-recorded events.

Bug: 28204408
Change-Id: I9da3b07a2e7b7512397a3eb6568a877815eb3312
1f170ddef81ee242dcdf8dc6b9aa60876cf3bff8 21-May-2016 Chong Zhang <chz@google.com> Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager's handler" into nyc-dev
9f7fb09fa393eadbb42a4d67343f118975c851b0 21-May-2016 Chong Zhang <chz@google.com> Dispose HideNavInputEventReceiver on PhoneWindowManager's handler

Disposal of input event receiver needs to happen on the handler
specified for receiving the inputs, otherwise nativeFinishInputEvent
could crash due to race with native dispose.

Instead of disposing mInputConsumer in beginLayoutLw(), post to
PhoneWindowManager's handler to dispose, and skip any input events
received after mInputConsumer is set to null by beginLayoutLw().

bug: 26927018
Change-Id: I094eb4472ea68f2c8bd6a428161d7edb11dc8900
ffddadb04a8df12f05f42721cc59e242e78c2a64 21-May-2016 Suprabh Shukla <suprabh@google.com> Fixing isOpRestricted in AppOpsService

AppOpsService was returning false for a restricted operation if the
operation did not allow the system to bypass the restrictions on it.

Bug: 28860721
Change-Id: I487e23f1d3bf6ea602caee439fb500c058e7c8ff
2d1c3b3a6cffd0a573aab5ac19f89a70d334540d 13-May-2016 Brad Ebinger <breadley@google.com> Add check for Vibration RingerMode in VibratorService

Add a check for whether or not the Phone is in the Vibrate RingerMode
when deciding whether or not to vibrate for an incoming call.

Bug: 28569078
Change-Id: Ib2e6243fd0b18c5426b5572c0806d67111a80a57
a78123265658380b3968773a5f575b0ba1b4620e 20-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Put launch adjacent activity in a new task if the activity does exist" into nyc-dev
538c22630b3ffd3c9efd544552d5a7fb3ae876a8 19-May-2016 Winson <winsonc@google.com> Only broadcast screenshot error to the current user.

Bug: 28807226
Change-Id: I428ecc5572d7522580cdf38bded2fff9cf07abc2
585ff8bd126ffac98164a87d24a9add5c23f9597 20-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "rate limit notification enqueues" into nyc-dev
13dbfff19eeee73133c976ef6b23298e271a1985 20-May-2016 Wale Ogunwale <ogunwale@google.com> Put launch adjacent activity in a new task if the activity does exist

For the launch adjacent case we only want to put the activity in
an existing task if the activity already exists in the history.

Bug: 28828326
Change-Id: I1a6fdd6779cb20f8c0d9b7d94635b21718f4ac1b
c8673a88fed53715d2295a535535c7ce7acbe7b6 17-May-2016 Chris Wren <cwren@android.com> rate limit notification enqueues

This is distinct from and in addition to the limit on the number of
distinct notifications. This includes many updates to a single

Bug: 28693065
Change-Id: I5ec0911716cace91d3ad85435a5c6123b290b3a2
628ae0d84180c5f7c52725e02506021e532ed252 20-May-2016 Robin Lee <rgl@google.com> Move VPN restriction check into setup dialog

The purpose of DISALLOW_CONFIG_VPN is to stop users from configuring
VPN, not from using it at all.

The key difference being that if the admin already enforced a VPN then
that setting should be respected (but it still shouldn't be tamperable).

Bug: 28733079
Change-Id: Ib8cab5657a9d5819a019093da3812cd8c2ca4050
430894d1bbac3ceb94dc2f57334858178fa53e97 20-May-2016 Alan Leung <acleung@google.com> Merge "Enable boost-locked-region-priority" into nyc-dev
031384556ede1678e9c7f5bff21a6b9eefb3502f 18-May-2016 Robert Carr <racarr@google.com> Never set resized while not drag resizing for pinned stack.

It's not necessary in the pinned stack and interferes with the
animation. It's not enough to just check getBoundsAnimating, as
we turn that off prior to the final resize so that we unmute
notifications to the client.

Bug: 28559097
Change-Id: Iae180c8a8ca0585184efcf24e7677557a33678eb
9d37bdcb91dffbfeebc45ef5ae7724c556cb6864 19-May-2016 Chris Tate <ctate@android.com> Merge "Incorporate feedback on new wallpaper-related APIs" into nyc-dev
b5b03bc450235ffa85ac636da460b61f1e99bff1 19-May-2016 Wyatt Riley <wyattriley@google.com> Merge "Mapping up/down of legacy Gps vs. Gnss Status" into nyc-dev
090bf551308e68b1b2a996c959b608cabd025c5c 21-Apr-2016 Sanket Agarwal <sanketa@google.com> While turning OFF do not honor ON requests.

Native stack does not handle being put from OFF -> ON state without
doing a complete cleanup. Hence instead of going from start -> ON -> OFF
-> cleanup it goes start -> ON -> OFF ->ON -> ... usually leads to race
conditions down the road in native.

This patch is a workaround so that we can throw away the requests if we
are in currently "turning off" phase. The side-effect would be that user
will need to turn it ON again. The race happens when the turn OFF time
is longer but usually it is found to be close to order of seconds hence
the wait should be bounded.

Bug: b/28318203
Change-Id: I14f6633f31311e5b561e1dcbc8a9d6d2a5dd6fdc
98d609ce3f98585a21f3be31a318bd4e1396a562 19-May-2016 Christopher Tate <ctate@google.com> Incorporate feedback on new wallpaper-related APIs

- Documentation
- Method naming
- Throwing exceptions rather than returning zero/null/false on input failures

Bug 28773334

Change-Id: Ia41c1e31c76b7114f3ffeb16033384cac5a1031d
7fae7be59514ba6a7fdc10bdb47c9a9fe09d2cef 19-May-2016 Andrii Kulian <akulian@google.com> Merge "Clear mResizedWhileNotDragResizing flag after reporting" into nyc-dev
49d9891c573f8c4994841b24f8d90690c342e8ae 18-May-2016 Wyatt Riley <wyattriley@google.com> Mapping up/down of legacy Gps vs. Gnss Status

- Maps incoming (from HAL) GpsSvStatus for Glonass, Beidou, SBAS, and QZSS
from defacto (NMEA-like) numbers to internal platform with detected constellation.
- Maps outgoing (to Java API) GpsStatus getSatellite info back into the de-facto
overloaded (beyond 32) "GPS" ID numbers.
- Simplifies Glonass ID definition for N (comments only.)
- This enables GPS/GNSS Test apps a non-degrading upgrade path.

Bug: 28623392
Change-Id: I9a19db1f11267032c6927daed767df5afa51c770
a1e0cebf3a18ac097d370e21d698e079f974bfff 19-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE Rename PointerIcon and Pointer Capture APIs" into nyc-dev
a0940d33dcbac0245ad5467d9c302f8eaee615dc 16-May-2016 Victor Chang <vichang@google.com> New api in LockSettingsService to get StrongAuth synchronously

Not all client needs to monitor the StrongAuth, e.g. ConfirmDeviceCredentialBaseFragment
Provide a quick method to get StrongAuth

Bug: 28752364
Change-Id: Iecfd217046da38e43297bdd5832cf7d637b979ed
880721b38b861d44af25b3384efffd69bbe47d0c 17-May-2016 Alan Leung <acleung@google.com> Enable boost-locked-region-priority

Enable jack.transformations.boost-locked-region-priority compiler pass
that had shown to increase performance in AmSlam by 10% or so.

bug: 28610549
Change-Id: If1b76787acd272882647ede7e831cb1ba376e578
ea906b37dfd6f84a74ab15f85f5f13d41cda6bb6 18-May-2016 Seigo Nonaka <nona@google.com> Fix system locale propagation during user creation.

Since Android N, the system locale is stored in Settings.System. Because
of this change, we need to propagate the previous user's system locale
to the newly created user.

When the user switch happens, updateUserConfigurationLocked is called
for the next user. Usually, some configuration values (font scale and
system locale) are overwritten by the next user's settings. However,
the first time the next user logs in (and only the first time), the
settings value is empty. So, we need to decide between keeping the
passed configuration's value or resetting to the default. For the
fontScale, it is reset to the default (issue 27187556). For the system
locale, the previous user's locale should be used. This CL addresses

At the same time, the inherited configuration should be stored to the
settings, otherwise the inherited configuration is lost the next time
the second user logs in.

Bug: 27803966
Change-Id: I4632671316d26e00ab6fe80ff3433f097f0e0954
42b3acf9d3eed15324bfa67e92ad751a10e45718 19-May-2016 Andrii Kulian <akulian@google.com> Merge "Rename minWidth/Height attributes" into nyc-dev
a75bd7d4e01985c8ad8aa57960337cc3507f374a 19-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed a bug where autobundling could lead to bugs" into nyc-dev
d171df660e19bdba4d188beeb8b6023874712413 19-May-2016 Robin Lee <rgl@google.com> Merge "Lock down networking when waiting for always-on" into nyc-dev
5b03ce95c77e16b46a177af32e640d71b7ff4e12 19-May-2016 Selim Cinek <cinek@google.com> Fixed a bug where autobundling could lead to bugs

Notifications could appear twice if a notification with an app
group became bundled and one could not be swiped away anymore.
This is because we were unconditionally copying over the override
key even if the notification just became a group.

This also fixes a nullpointer that could happen with a racecondition
when a notification was cancelled and it tried to be used for autobundling.

This also fixes an issue that the autobundling wasn't working correctly
when a notification didn't have a group set but was set to be a
group summary.

Change-Id: Icd971f16ae0804ce162fd3171fcdd99bd04f3885
Fixes: 28706404
Fixes: 28628237
17e6183b85ba3038acb935aaa01415058b2e6ddd 09-May-2016 Robin Lee <rgl@google.com> Lock down networking when waiting for always-on

Fix: 26694104
Fix: 27042309
Fix: 28335277
Change-Id: I47a4c9d2b98235195b1356af3dabf7235870e4fa
56a9395aeb198e0a7db5e9666cc81ba7ce5f8e0d 19-May-2016 Paul Crowley <paulcrowley@google.com> Merge "Two phases to set the password for disk encryption" into nyc-dev
bc9edc7ccb4d876bfc5c706fbb64dab9a2768b52 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixes for ending PiP animation." into nyc-dev
54a3dd53fe6028db1f1c797ed6be12ccb6263ecf 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Correct PiP inset adjustment." into nyc-dev
32b54f2e42c4ff793c418c29c0ce9ef0be2a4a16 18-May-2016 Winson Chung <winsonc@google.com> Merge "Mark occluded home stack as invisible." into nyc-dev
ff8ceadfc8c5f03da57420ad93a698cb0a57fcd9 18-May-2016 Chong Zhang <chz@google.com> Merge "Request a traversal when a saved surface gets redrawn" into nyc-dev
c7294607fc0debc54e92abac18bec2601a21ce27 13-May-2016 Robert Carr <racarr@google.com> Fixes for ending PiP animation.

During the PiP animation, we have two basic requirements:
1. We need to scale windows to the pinned stack bounds.
2. We need to halt resize and movement notifications to the client.
As we end the animation, we need to disable these states at differing
times. First we need to deliver a final resize and movement notification
to the client for it's new position. However, Surfaces may not
immediately resize (in particular in the case of child windows,
it may be some time!), furthermore Surfaces may resize at different
times so we need to persist scaling on a Surface by Surface
basis after reenabling resize notifications.

Bug: 28559097
Change-Id: I6d52a3e213e08a34f4c0eea892b2a84cd4c20e18
bc133764497bcc4d9990ecc07a8d1053b2a1b46d 12-May-2016 Robert Carr <racarr@google.com> Correct PiP inset adjustment.

We want to calculate the scaling factor we need to have
the content area of the surface (not including insets) to reach
our desired size, otherwise we will seem to scale the insets
up or down over time.

Bug: 28559097
Change-Id: I86dbd5fc902b5d380d33dba626c6694b3c57ff25
ab0744344db3e626f1a249f285289b66653cf6bb 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix a deadlock in system server" into nyc-dev
3070e77f91a3c2ccb0be4588cbcff3936829458a 18-May-2016 Jorim Jaggi <jjaggi@google.com> Fix a few issues with ime adjust/minimized dock stack

- Do not override minimized state in SysUI when IME adjust change
comes in.
- Do not animate IME adjust if we are already animating for minimized.
This lead to problems that we animated the minimized state with the IME
adjust values.
- Make sure to update state after checking whether the IME adjust is
animating. This is to fix an issue where sometimes the IME adjust
animation didn't run because the old target was wrong.

Change-Id: Ie35e2f943a4cda99ffdc6f14663d892863759e46
Fixes: 28819201
403970c3ce8fe76b34ff966c43e3e11debeef582 18-May-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Update VrListener location permission." into nyc-dev
6bd012a799f1dfd3d40dc3d581d18fb36618f0b1 18-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Check processName when starting providers." into nyc-dev
3603bc6e3f73421f59a53ff9f5f9d19bc33074f7 18-May-2016 Amith Yamasani <yamasani@google.com> Fix a deadlock in system server

Don't call into DPMS with PackageManager lock held. Doh!

Bug: 28828415
Change-Id: I08437d849236374acc0d804fe31aba703af385ba
ae13e18c5561537e062f46ddda8e5dff30d1fe26 17-May-2016 Tony Mak <tonymak@google.com> Should check isDeviceSecure in shouldConfirmCredentials

The NPE is because createConfirmDeviceCredentialIntent returns a null
intent when it founds that user does not set a secure lock.
So the fix is we should check is the user set a secure lock screen as well.

The reason the crash only happens in multi-window flow because
we have null checking in
the normal flow (i.e. interceptWithConfirmCredentialsIfNeeded).
But I think we better check it explicitly.

Bug: 28716456
Change-Id: Ib204cd02c0007bd1df36908bb3b5254ec4ffb914
e821f3d032b4cd738a9b61549559b8b76b3ae09e 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use batching to set firewall rules." into nyc-dev
6d99f796711882ba60977c211d0f92252fe7ad4a 16-May-2016 Narayan Kamath <narayan@google.com> PackageManager: Fix reference profile canonicalization.

Foreign dex markers are named in the runtime by calling realpath(3) on the input
dexfile path and replacing "/" with "@". On the Java side, we're using
File.getCanonicalPath, which is similar but isn't quite the same. It tries
to call realpath() directly, but if that fails, it resorts to a series of
increasingly desperate measures to calculate a "canonical path". We just
use realpath instead.

Also, don't attempt to delete a profile if canonicalization fails.

bug: 28740848
Change-Id: Ie5d5af590187e793db633342a42b923865e5c005
cbbcc0f79582b0157c03325074166da53e617c73 18-May-2016 Chong Zhang <chz@google.com> Request a traversal when a saved surface gets redrawn

When a saved surface gets redrawn, we need to return true in
finishDrawingLocked, so that a traversal is requested. This is
needed to update allDrawn/allDrawnExcludingSaved. Some delayed
window removal may be waiting for these flags.

bug: 28797800
Change-Id: I0b58b356e9c580422eb3ff81e8afb2a164cf6e43
31884efd13b3ac60078edaa0b7e8a4b75d995538 18-May-2016 Yohei Yukawa <yukawa@google.com> Merge "Move LocaleList to avoid layering violation." into nyc-dev
529c8e4cf24375ca21b5d61fb6b34e7010d6edad 17-May-2016 Winson <winsonc@google.com> Mark occluded home stack as invisible.

- The home stack is still visible when a translucent activity (like
dialer) is on top, which caused us to use the logic path that just
tries to launch the next task. However, that path does not reload
the stack state (since the activity stack generally doesn’t change
while Recents is visible) so it was always launching the already top
activity. The new check ensures that we start the activity anew
as if it was coming from an occluding app.

Bug: 28767764
Change-Id: Iec0fdc0957e5070cec532c5de5cba3454c906a3b
0fda52b92ecc8e9eb508c6ce249705be53761277 18-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28817455: [NYC] [BullHead] Fatal Exception in CNEService" into nyc-dev
cbc73decf11344ebcf7a35c31585b66e021e38a1 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make Recents activity invisible when it is behind a translucent activity" into nyc-dev
23cbe85610f780134cc77dd4a54732a22ed6e86e 18-May-2016 Yohei Yukawa <yukawa@google.com> Move LocaleList to avoid layering violation.

Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
daa0d214dd07caa8dc99abe635211ed94200bc2e 18-May-2016 Chong Zhang <chz@google.com> Merge "Fix wallpaper cropped too soon when unminimizing dock" into nyc-dev
8ecf66fc83e76165bea3cd408c687bd0b79c0552 18-May-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Dismiss immersive mode overlay while in VR mode." into nyc-dev
65ee55457dc39c3e30c677d9126565799b50a8dc 18-May-2016 Chong Zhang <chz@google.com> Merge "Use focused app's stack for IME adjustment" into nyc-dev
e1f6975ebc1499ddcb493666f884ef0d8e042255 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adjust wifi idle times to fit in system time period" into nyc-dev
cc70155f3bf18341296aaa2163bd2e7df6997b11 17-May-2016 Paul Crowley <paulcrowley@google.com> Two phases to set the password for disk encryption

Revert "Revert "Two phases to set the password for disk encryption""

This reverts commit a1eb750e75ff7c7ef7698deed4442449c33334c8.

Bug: 28154455
Bug: 28694324
Change-Id: I8106bfba28da401b9fd38349c6a9fa9a24f54712
c30c8fd29cf91799eed241281826a658985a12b3 17-May-2016 Ruben Brunk <rubenbrunk@google.com> Dismiss immersive mode overlay while in VR mode.

Bug: 28052143
Change-Id: I750753c72cb8d41bf91c108e8fc645750fbf9c45
b8da4a7fa86155022f5a8d177c288d0817ce8c3e 18-May-2016 Chong Zhang <chz@google.com> Use focused app's stack for IME adjustment

Don't use mInputMethodTarget as it could be set to some system alert
and it's not actually taking inputs.

bug: 28328085
Change-Id: I38263f64fec13a5e10357499ebc97671389ba69a
77ad5f1657a8bef6b28f69f9bd8a2d1978c88a57 17-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #28689719: Runtime restart" into nyc-dev
684591116fa6a8a2bf7a72dea19b496272f80af3 16-May-2016 Roshan Pius <rpius@google.com> Adjust wifi idle times to fit in system time period

The battery stats time period calculation is done using a
different clock source compared to the wifi chip's on time calculation. So,
account for skews between the two by adjusting the idle time reported by
wifi chip to fit into the system time calculation.

BUG: 28628799
Change-Id: I3110c53317f3246e26fdc3731f7be0a3d9c8e229
TEST: Compiles & manual verification
4cb96ca45f3334f49ebe23359001b7a636a1973b 17-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28817455: [NYC] [BullHead] Fatal Exception in CNEService

Deadlock between DeviceIdleController and NetworkPolicyManagerService
because DeviceIdleController was calling out to ConnectivityService
with its lock held.

Change-Id: I21195c2dfd5f50d0264e5e32819f8fc1f35a23a9
2675616719734ce069db47bd8b563f775351dd38 17-May-2016 Dianne Hackborn <hackbod@google.com> Work on issue #28689719: Runtime restart

There are few paths I can see to get a null intent down into
the framework at this point. Add in some checks and reports
at those places to mitigate and report such problems.

Change-Id: If235bf342558321d3fabe9363fcebb2bcea18df1
f66a83db41711ebd1187bf9e99d0b21e428075f5 17-May-2016 Andrii Kulian <akulian@google.com> Rename minWidth/Height attributes

Rename WindowLayout#minimalWidth and #minimalHeight to #minWidth
and #minHeight to be consistent with other APIs.

Bug: 28775586
Change-Id: Ib7dc26318c4391693ef23f908b4d6090138dd0d7
7996b96311eec2343c16d3677fb834d2ec7cf082 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "TIF: Throw a more appropriate runtime exception when building TvInputInfo" into nyc-dev
f0b76b071c8434fbf4a76798e9cdd56ab67e523d 14-May-2016 Chong Zhang <chz@google.com> Fix wallpaper cropped too soon when unminimizing dock

Set adjusted bounds on the stack that's side-by-side to the docked
stack, so that TaskStack.getDimBounds returns the adjusted bounds
during unminimizing dock animation. This way wallpaper is not cropped
too soon to the final stack bounds.

The adjusted bounds won't be used for alignment for minimizing.

bug: 28763785
Change-Id: Ifea4366dd4b1bd35f2ed720dd1819a10bdfd86fa
2c6a450fa23b97e6082e2daa1aa9c7f07a4def8f 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added a onRestrictBackgroundBlacklistChanged() callback." into nyc-dev
8f359afdc3ce3f243d508e81831ed5f274b65534 17-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28641630: Service client dumps are timing out for no reason" into nyc-dev
607844efa59f79bd9fab55eb75f217d21cd15f5f 17-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #27532364: Security Vulnerability in IIntentSender.send" into nyc-dev
777a06d3c932277649ebeb6ccb3f20e80aa867b3 17-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28641630: Service client dumps are timing out for no reason

Actually, no reason. The reason is that to do the dump we are doing
synchronous calls out to each service, but that is with the activity
manager lock held, so they can get blocked if their main thread does
any call back in to the activity manager.

To fix this, re-organize the dumping code so that the "with client"
path is separate, and doesn't require holding a lock the entire

Change-Id: Ia96861c10da81048b3d2ac93a25760b68623cf34
4570df8fd52b4ca8fab00794297a4f3d3923bbfb 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Correct activity lifecycle when forcedResize activity is finished" into nyc-dev
65ca16ebab701c82895a0f1bf5ba0344aff44e50 17-May-2016 Amit Mahajan <amitmahajan@google.com> Merge "OMADM intent sent by both system and apps." into nyc-dev
e76407c7f3403530b4cb96de324f6194b2011010 17-May-2016 Wale Ogunwale <ogunwale@google.com> Make Recents activity invisible when it is behind a translucent activity

We don't want the recents activity to be visible behind a translucent
fullscreen activity. Instead we want to show the home activity behind
the translucent activity.

Bug: 28246419
Change-Id: I0364a592d7d84c88b39b359431492d0395b0f051
4920698e17dc8aacd1b0743d313383a8ee1a3400 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make some of the UID-based VPN code reusable" into nyc-dev
2d4d408a5be45b027e43fee99cc3a44b6a556c66 17-May-2016 Chong Zhang <chz@google.com> Merge "Apply final crop during surface preservation" into nyc-dev
18c0cfb0750668daf8b5c099122ea4fb214a1449 17-May-2016 Jae Seo <jaeseo@google.com> TIF: Throw a more appropriate runtime exception when building TvInputInfo

Bug: 28775591
Change-Id: I934c8d7fed3dda356cdc3bafe51a79f585918ed0
778e3b91acad6da04341d439f0c66a4fd09def4f 16-May-2016 Michael Wright <michaelwr@google.com> DO NOT MERGE Remove Pointer Capture API

The underlying implementation needs to be completely rethought. If a
process crashed while you were in pointer capture mode, you were
pretty much stuck in it. If the mouse happened to move outside of
your bounds right before you called the API, you'd never actually get
an event (whatever it was hovering over would). There's no easy way
for the system to tell you when you enter or exit this mode because
it doesn't actually track who the current request is from.

These are all solvable, but not in the N time frame. Maybe next time.

Bug: 26830970
Change-Id: I03efd63c499b86dc278491ca3284566c1965581f
f9d9ce7705475874c82af04eb9b208a7fb556792 13-May-2016 Michael Wright <michaelwr@google.com> DO NOT MERGE Rename PointerIcon and Pointer Capture APIs

This is a response to API council feedback.

Bug: 26830970
Change-Id: Ia2d284b5c1ab8365bedfdc37d129be4b8146036b
6874114a957051cc9f469363e7583994c2966758 17-May-2016 Wale Ogunwale <ogunwale@google.com> Correct activity lifecycle when forcedResize activity is finished

- Regerssion introduced ag/1039265. We still need to resume the
starting activity in a task with an overlay activity is the starting
activity is the overlay activity. Otherwise the activity below it
might not be moved to the paused state.
- Also, we don't want to clear starting window for activities that
aren't behind fullscreen activities as we need to display their
starting window until they are done initializing.

Bug: 28808506
Bug: 28751186
Change-Id: I9a1a5feecea2ed3592a4064fca80e240a3bce387
a701cad320a0a2715cac1c31b269ced2ccbc8ac2 12-May-2016 Felipe Leme <felipeal@google.com> Use batching to set firewall rules.

Netd now provides an option to flush all uids for a given firewall
chain. Using this option is particularly useful when setting the
fw_standby chain, since over time the device will have dozens of idle

For example, in a Nexus 5X with 45 idle apps, setFirewallUidRules() at
boot was taking 1044ms, and after this change it dropped to just 32ms.

BUG: 26675191
Change-Id: I7016ba646b872f80d0b27a56b867c0b6080d2516
690c2ea117f90b7759ac280a1c84f5966b1e7938 17-May-2016 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Introduce system API to get source of user restriction" into nyc-dev
dbf0210f6f79a459ed6070c8b1859584a7ccfb12 17-May-2016 Robin Lee <rgl@google.com> Return legacy VPN info regardless of lockdown mode

This stops Settings from telling the user detailed information, and
doesn't really protect anything secret -- privileged apps can already
tell that there's an active VPN by looking at network info.

Change-Id: I9c2a3cab6dff1b62e94a9e0735dccde226fd26a3
Fix: 28624328
a8b4f7597842b17b44e1ea859f218d610789e277 17-May-2016 Narayan Kamath <narayan@google.com> Merge "PackageManager: Clear foreign-dex markers when the app is uninstalled." into nyc-dev
96b20bb585012d7e0a3bf21a979a2d1685e0d08f 14-May-2016 Ruben Brunk <rubenbrunk@google.com> Update VrListener location permission.

- Grant coarse location permission to preinstalled system
application that implements a VrListenerService when the
VrListenerService has been enabled in Settings by a user.

Bug: 28768855
Change-Id: I7cb7f7b980a714f100f50e23dd9f503b9a3fa201
cc3eccf57830ba1996266cb0fd0b01b9a07c65c3 17-May-2016 Chong Zhang <chz@google.com> Apply final crop during surface preservation

Apply stack crop to the preserved surface so that it doesn't stick over
the dock divider.

bug: 28567495
Change-Id: Ib7a9d8ec82a7752ecbef60a86f441e35e16ac877
b406dd20eee28eedb8e9f330a0459d630c026515 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed bugs with starting windows when displayng forcedResized activity" into nyc-dev
fc932b9d699e5797fbbfac3ec09a789419ade269 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update configuration of all visible activities in a stack when resizing" into nyc-dev
19b34eccfee9d14e6888c4813cc369bd4b3a7e81 17-May-2016 Amith Yamasani <yamasani@google.com> Merge "Allow Shell to change component enabled state" into nyc-dev
eb1d322d1cfc8c7547967bc7e20b1fe3499ec90d 17-May-2016 Andrii Kulian <akulian@google.com> Clear mResizedWhileNotDragResizing flag after reporting

Currently mResizedWhileNotDragResizing flag is not cleared after
reporting resize to client, which causes sending lots of resize
messages and relayouts on app side.
This CL introduces another flag to track reporting to app.

Bug: 28696195
Change-Id: Ib5b6ea3e5f499c96057182f4b20583734dea56c4
3b23239d6ec9ded858d75f272ca1a677c5c431f9 14-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed bugs with starting windows when displayng forcedResized activity

- Added ActivityOption to mark a starting activity as a taskOverlay
activity. That is the activity will always be the top activity of the
task and doesn't cause the task to be moved to the front when it is added.
- Only set the starting window state of the ActivityRecord to shown if
window manager actually showed the starting window for the activity.
Avoids incorrectly trying to remove starting window for an activity that
didn't show any.
- When starting additional activity in a task, transfer the starting
window from the top most activity with a starting window. It is possible
the top most window does have a starting window like in the case of the
forcedResized activity.
- Only ensure visiblity of an activity we are starting in a task whose top
activity is a task overlay. They need to start in the visible-paused state
and not the resumed state which just causes extra churn in the system.
- Always add additional starting activities in a task with an overlay
activity below the overlay activity.

Bug: 28751186
Change-Id: I3624a4313ae9c406d42c67a3537f67ad685791af
23bf5462f05b33ce4390d8370520e43b74dbec09 14-May-2016 Jorim Jaggi <jjaggi@google.com> Handle multi-window for inset hint

We need to incorporate task bounds when calculating the inset hint
so we don't specify something wrong to the client which we correct
immediately after.

Bug: 28697105
Change-Id: I23cec7d6cc62a4d982e0796a867e803d4cce0803
db0fa12b736a6901075ae30c2c423a036d6b8139 17-May-2016 Wale Ogunwale <ogunwale@google.com> Update configuration of all visible activities in a stack when resizing

Previously we were only updating configuration for the top activity in
the stack during resizing. This caused an activity behind the top
translucent activity to continue to display in the old configuration
and also get relaunched without window preservation when the top
translucent activity is finished.
We now make sure all activities at all below a translucent activity
have their configuration updated during resizing.

Bug: 28762547
Change-Id: I0926ac6db088cdf3f6a225c552dbfbe944830f68
29af3cab293dc7a19ca3b387c5507e521f66d0b7 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make persistent apps become top correctly." into nyc-dev
008d73bd5b3ca4b1b7a8af61957759d65dd67e3b 17-May-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Ensure app op restrictions reset when the app that set them dies." into nyc-dev
a8bbd76d9b5249c64ef31aa162e9a84abaad39ba 14-May-2016 Svetoslav Ganov <svetoslavganov@google.com> Ensure app op restrictions reset when the app that set them dies.

We were not keeping track when an app that set an app op restriction
dies to clean up after that. As a result we may end up with stale
restrictions that will be there until the device reoots - not cool.
This change adds remote binder death tracking and simplifies the
code as adding the formed would have made more complex.


Change-Id: I7dcaafba2354843a0cdf0206ab1f96625edc5120
8e30eb3a7f81729065bad6d971bf414f995410df 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix transition delay tracking when starting activity from recents" into nyc-dev
0cb1cc74b851f995110b8231f754c9f84122c816 17-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28794831: meminfo considers cached processes to be services" into nyc-dev
bf12565276484a9ba003f760e8a61bbecc6815f7 13-May-2016 Amith Yamasani <yamasani@google.com> Allow Shell to change component enabled state

But make sure that we don't allow Shell or other apps
to disable an active profile or device owner.

Also limit exactly what states Shell can switch apps
between, similar to Settings UI.

This is required for some CTS tests

Bug: 27924655
Change-Id: I958f0d1de7f0bc1f5a0cbf853d57dfdeb2f9ad59
6eb923cb64f38dcb23fd3ca15793a13a900b1630 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Delay grantDefaultPermissions until user's first start" into nyc-dev
666212b75c3acf41fffaad7c7199eda469a6edcf 16-May-2016 Tim Murray <timmurray@google.com> Make persistent apps become top correctly.

Sometimes, a persistent app should be the top app (recents). Make sure
such an app can use the top-app cpuset.

bug 28317812
bug 28794389

Change-Id: I756cec3fbab8cc552a6d90c007aa2e07f6b78dbc
1e630c08296ec6cc311cc4e1c397f7ca50a1a735 16-May-2016 Jorim Jaggi <jjaggi@google.com> Fix transition delay tracking when starting activity from recents

- Move logic to determine app switch etc. into ActivityMetricsLogger.
- Make sure the notify the tracker in startActivityFromRecentsInner

Bug: 27295491
Change-Id: Ic68058c88917e3f37183dded2f13cb35055323ee
2ebd57ff9495aa9a341ec257fd018cbe703691de 16-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28794831: meminfo considers cached processes to be services

Uh how did this ever actually work??

Change-Id: I9823f88847ccda6984bc95227fac90b994c22462
99d5d3d7759883119665d928d110edb14df44ecc 16-May-2016 Felipe Leme <felipeal@google.com> Added a onRestrictBackgroundBlacklistChanged() callback.

When an UID is added / removed to the Data Saver blacklist, it's
necessary to notify internal components such as the Settings UI (which
was erroneously listening to UID rules changes instead).

BUG: 28743623
BUG: 28791717

Change-Id: I11c85e141dfe074ad390fd324309d2412bfbbd45
b45d9833aa3e8bbfdb819c7bcd104c95c8424f05 16-May-2016 Fyodor Kupolov <fkupolov@google.com> Delay grantDefaultPermissions until user's first start

Bug: 28765487
Change-Id: I6a7b0a9fc85964def1e991aafe967977080dfdab
a7b826b08aa1b185b0e46b648e5c2ed7f818ae09 16-May-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Added scheduleWritePackageListLocked" into nyc-dev
252a6b125bdaced7d928167e0fbc4dd2ba95e8a1 16-May-2016 Julia Reynolds <juliacr@google.com> Merge "Throw exception on rule creation failure." into nyc-dev
b0cdf3845fd33cc40a929a2b9b882bf0a3a994d3 16-May-2016 Ricky Wai <rickywai@google.com> Do not tie managed profile synchronously in onUnlockUser()

Bug: 28736098
Change-Id: I2c687c11b9991d0771cfe721e80ac1541c477f2e
b0d38b6d47a9f7e94135fc64449e81f9dc47f3eb 16-May-2016 Shubang Lu <shubang@google.com> Merge "TIF: Update TvInputInfo when the input is reinstalled." into nyc-dev
cef3337cb5e27d4f571fb350be055c26d339833d 16-May-2016 Yohei Yukawa <yukawa@google.com> Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev
87c42773602f64d2ebae2631cffed7b88232dfbe 16-May-2016 Julia Reynolds <juliacr@google.com> Throw exception on rule creation failure.

Bug: 28775583
Change-Id: I98cf90afd86e307846970f1ede7f072eb8b70c7f
1475701100d07af2fad563891082d7712e385950 12-May-2016 Narayan Kamath <narayan@google.com> PackageManager: Clear foreign-dex markers when the app is uninstalled.

- Adds a missing call to clearProfiles to a callSite that was clearing other app data .
- Fixes a bug where the wrong package was being passed to clearAppProfilesLIF. We should
use the "old" (pre-upgrade) package and not the "new" (post-upgrade) package.

bug: 28510916
Change-Id: Ia926acda2c72d39bad51143e3f923643d9c3a0af
4853d65a604c253d3f2b9b5041c8cd2087e2237c 16-May-2016 Donghyun Cho <donghyun@google.com> Merge "CEC: Defer CEC actions until logical address is available" into nyc-dev
833bdcedceee60a873694a77587393abfc830eb5 16-May-2016 Yohei Yukawa <yukawa@google.com> Make IMS#clearInsetOfPreviousIme() reliable.

This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
- PhoneWindowManager#mLastInputMethodWindow
- PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME. As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window. All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

[1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
[2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change. Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
15e66cd5af7a08dc603de11cba40eac36d1ed580 14-May-2016 Jeff Sharkey <jsharkey@android.com> Check processName when starting providers.

Bug: 28708253
Change-Id: I346441021295273c356619c60caa6086ef165363
2512ec9e376b0fce213f6d635dfb991c79041031 14-May-2016 Ruchi Kandoi <kandoiruchi@google.com> Merge "network: Adds the functionality to parse uid in netlink messages." into nyc-dev
d375a04d2ec4edacb323ec86a2f310153fa4547c 14-May-2016 Amit Mahajan <amitmahajan@google.com> OMADM intent sent by both system and apps.

Adding an exception for "com.android.omadm.service.CONFIGURATION_UPDATE"
as it is sent by both system and OEM apps.

Bug: 28757729
Change-Id: Ic89d38bbd78e436ca3c259f1aa61be450033a232
0c4e6a8da3405f742e5cef8afdf579d58b6f1246 14-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #27532364: Security Vulnerability in IIntentSender.send

We need to make IIntentSender oneway... but when the system is
calling that for itself, it needs to be able to return a result code.

Solution: instead of directly calling the interface, we have a new
IPC through the activity manager. If the thing being used is the
activity manager impl, it can do the synchronous send and return
the result directly in place. If not, you only get asynchronous
sending and thus never a failure result back (too bad for you!).

Change-Id: I4096e5b00063e8dba66230585a2dfe67e35e8092
2263fb0b1a58282fb5a0aecb4c6b4e77296506b7 14-May-2016 Shubang <shubang@google.com> TIF: Update TvInputInfo when the input is reinstalled.

Bug: 28678019
Change-Id: Ibd290245a64cdb4950bda4c054e713b38a546f5f
7dedfd0c0486bb7d8b12b767e026bfdb2267f8e7 14-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28728838 java.lang.ClassCastException: android.os.BinderProxy..." into nyc-dev
9386a40edf153f31e96283bf61a5b2feac96ec8f 14-May-2016 Chong Zhang <chz@google.com> Merge "Set final crop on wallpaper instead of intersect clip with stack bounds" into nyc-dev
26c8c42bbb2b998e609983886fad5968f033268d 10-May-2016 Jorim Jaggi <jjaggi@google.com> Also freeze configuration when freezing bounds

We also need to freeze the override configuration so we don't report
the new configuration too early, which leads to bugs.

Bug: 27915587
Change-Id: Idffadbb02ab0311796caa760ae1f467fd2d17768
dcf0183cea1f93f20073cb04fa64f111ea880005 14-May-2016 Chong Zhang <chz@google.com> Set final crop on wallpaper instead of intersect clip with stack bounds

Wallpaper's clip rect is offset by its window offsets, it can't be
intersect directly with stack bounds.

bug: 28763785
Change-Id: Id87d668c9e59832498c9c62730617d0a5a9207c2
fa97fcf7b9b9999102bc0c6b298114375b27a1c3 14-May-2016 Ruchi Kandoi <kandoiruchi@google.com> network: Adds the functionality to parse uid in netlink messages.

Netlink notifications about the state of the modem contains uid too.
This patch adds the functionality to add that. It also fixes the bug to
parse the timestamp in the message even in cases where the length is
greater than expected.

Bug: 28527904
Change-Id: I4643bff3eb5b1ffa2dc0b78f1c6947d60487e0d8
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
4502ce2d498e6173f69b5af88cb2b81b76de990f 13-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28728838 java.lang.ClassCastException: android.os.BinderProxy...

...cannot be cast to LocalBinder after a crash

Turns out, if you called removeProcessLocked() with an old ProcessRecord,
we could get in to a bad state -- if we had a new process with that same
name already running, we would kind-of blow it away as a process name,
but not as much else. So the next time we wanted to run a new thing
in the process, we would start a new second process and the two could
get mixed together.

Change-Id: I05e0463bd55f57f5e07f0b804ed9fd8c4f98a5a5
0f6a6c4bc15fee726ef9aeb0d99b1204767f431d 12-May-2016 Jorim Jaggi <jjaggi@google.com> Don't allow any app to specify rotation unless in home task

The previous logic was racy/buggy in a sense so that the non-home app
could still force the orientation when the divider was still minimized.
The logic is cleaned up so only the home task can force the orientation
in multi-window.

Change-Id: I9eccf86d9fa442375d6eca400cb6ac0815c9fa10
Fixes: 28675152
918084e9ae9620c745e4d6212f6648771051e706 13-May-2016 Chong Zhang <chz@google.com> Merge "Update stack bounds for fullscreen if rotated after updateDisplayInfo" into nyc-dev
e208bd4cbea7468c989d25ef582e5a9ed7ecabf1 13-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed some issues with fullscreen dimming" into nyc-dev
ccc335cfc799163424d6c3cc457213cbcb4d49ee 13-May-2016 Chong Zhang <chz@google.com> Update stack bounds for fullscreen if rotated after updateDisplayInfo

Rotation could change again after updateDisplayInfo is called. We
need to set stack bounds even for fullscreen stacks in this case.
Otherwise the bounds will be incorrect until it's rotated again.

bug: 28611814
Change-Id: I31289524a9ceacaaaa66924e9bf6cbe88fd83f99
25018d41f482fe21a45eb2e739f22dc7cc937428 13-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed connectivity state in some power saving scenarios." into nyc-dev
e89dc40706f325e039de7dd6714223908dfb9b17 13-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Show package icon/label for resolved package-targeted implicit intents" into nyc-dev
b7bd2e645db390373d4f0847c7637d06faa1d4da 13-May-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Call isUserUnlockingOrUnlocked with cleared identity" into nyc-dev
3264b60738b0c8c611334d448aca4480eaffc1cc 13-May-2016 Andreas Gampe <agampe@google.com> Merge "System server: Add Bluetooth to native processes" into nyc-dev
4d03abcd49af490dba3850d341b955dd72f24959 09-May-2016 Robin Lee <rgl@google.com> Make some of the UID-based VPN code reusable

By changing some member refs into arguments and having one of the
functions create the UID range instead of adding to mVpnUsers.

This will be useful for other layers of UID filtering like having
UIDs explicitly blocked from the VPN.

Deleted one broken line of code that cleared the status intent when
a restricted profile is removed. Other than that, this commit shouldn't
change any behaviour. If it does, that's a bug.

Bug: 26694104
Change-Id: Ieb656835d3282a8ba63cc3f12a80bfae166bcf44
86100d18ad0bd5ae3267a0e0944d15f4fe94078a 13-May-2016 Adam Powell <adamp@google.com> Show package icon/label for resolved package-targeted implicit intents

If we're going to show metadata about a resolved implicit intent that
is targeted to a single package with multiple potential targets,
populate the ResolveInfo with the label and icon of the target
package's ApplicationInfo and set resolvePackageName. This helps use
cases such as EXTRA_INITIAL_INTENTS in ChooserActivity, where
sometimes apps set target packages but not components.

Bug 28739056

Change-Id: I8070d341fccc139463c5ac8d66db45fce02252e5
fc462b962cde0a96193fc780d6466cf8b0774112 13-May-2016 Donghyun Cho <donghyun@google.com> CEC: Defer CEC actions until logical address is available

If logical address of device is not set, CEC actions will not work
correctly because outgoing CEC message's source address will be
wrong. In this case, CEC actions should be deferred until address
allocation finishes.

Bug: 28709242
Change-Id: I09e199c6144a5b341e3a6113022d0243fcfc3cf5
a285fdeb160e822a2e1fe2fb6bd80ce91afcf181 13-May-2016 Chong Zhang <chz@google.com> Merge "Fix a flicker when window is removed during entering animation" into nyc-dev
36d1296cf4f074599015b424161402f9b07da8ab 13-May-2016 Keisuke Kuroyanagi <ksk@google.com> Merge "Adjust divider when IME height is changed." into nyc-dev
c30808b413deff60fafa047d9cc15c275feb3c63 13-May-2016 Fyodor Kupolov <fkupolov@google.com> Added scheduleWritePackageListLocked

Call scheduleWritePackageRestrictionsLocked and
scheduleWritePackageListLocked when a new user is created.

Bug: 28750034
Change-Id: I442551855e2eece7a1610750c6802a785bfb2fb5
29bfbb878d54db14204e9b02dc17bfc6e127b6b2 13-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed some issues with fullscreen dimming

- Always dim home stack and task fullscreen. The home stack could be
in split-screen mode, but we still want to dim dialogs that are
associated with the stack or task in fullscreen. The dialogs are not
really activities, but they are associated with the home stack for
things like dimming. Don't ask me why...
- Update the fullscreen dim layer bounds anytime the dim layer is
adjusted so we always have up-to-date bounds after rotation.

Bug: 28575624
Change-Id: I805c771153a2d25fb199bd9987bbf78a5967f6b9
8e4bda9e0f7411a3bfad0c625177f67248ff8a12 05-May-2016 Chong Zhang <chz@google.com> Fix a flicker when window is removed during entering animation

When animation is started with saved surfaces, app may decide to
remove one of the child windows during early animation and replace
it with a new window. This causes the app below (usually Recents)
to show through for one or more frames.

If we started animation early with a window, delay removal of
that window until the app is allDrawn in the "traditional sense"
(i.e. allDrawn without using any saved surfaces).

bug: 28742353
Change-Id: I4ef663a947b737aae96c3ccfe13a9f4c1d0567f0
19d9a8f47625319406f593d4ec71de0c8df1fcfe 13-May-2016 Keisuke Kuroyanagi <ksk@google.com> Adjust divider when IME height is changed.

Previously, divider was adjusted for IME when IME window visibility is
changed. However, IME size can be changed without changing IME window
visibility. For example, when hardware keyboard key is pressed to show
emoji layout.
This CL checks if IME height has been changed and adjust divider position

Bug: 28389933
Change-Id: I9a561bd4796a0513c8b5c493884946883f160907
a63e1325b595d84dea7d33cb2e2c149acb326204 13-May-2016 Chong Zhang <chz@google.com> Merge "Fix replacing window timeouts" into nyc-dev
32de365bd82a748cc366aee50d281faca9d44815 13-May-2016 Chong Zhang <chz@google.com> Fix replacing window timeouts

Do not post app token with the timeout message, instead put the token
in a list and post empty message only.

bug: 28744782
Change-Id: If809d8ee16bcc31067f25ae5696b62d09ea4b864
cf9e79b90192d1a1ece3264b021d3256a2fffefe 12-May-2016 Andreas Gampe <agampe@google.com> System server: Add Bluetooth to native processes

Add Bluetooth service to the interesting native processes to dump
during watchdog abort and ANRs. This may help if the process gets
wedged and cannot react normally to Java-side ANR dump requests.

Bug: 28658141
Change-Id: I788b7c299cc95748fdcddaa2be1d0e2d78f25ef1
b41088b4dfa8b077541cd3be69c51bd4bba4e938 12-May-2016 Philip Cuadra <philipcuadra@google.com> Merge "Pinner service for pinning files into memory" into nyc-dev
2e35847a8f9557b59198fc053524eee0b965aab8 12-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "fix filter for listeners that are not the rocket" into nyc-dev
7bd0fdd639640f9ddffbffa6a117644134d8be30 29-Apr-2016 Philip Cuadra <philipcuadra@google.com> Pinner service for pinning files into memory

Pin key files into memory to prevent having to fetch from flash
after boot. Improves system performance by preventing page cache
thrash. Retrieves files from a device-specific overlay to allow

bug 28251566

Change-Id: I8532f52bd70271794dd7576976d13a524849ce7b
562ea5ceb5e10a3ea4dfd3825b2d639fbc6506b0 12-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't notify windows of resize during PIP animation." into nyc-dev
781ba14af2a8c8e85f684208055dba0ebfd5db30 10-May-2016 Felipe Leme <felipeal@google.com> Fixed connectivity state in some power saving scenarios.

NetworkPolicyManagerService (NPMS) manages 4 type of network restriction
when apps are running on background:

- Data Saver Mode (data usage restriction on metered-networks)
- Battery Saver Mode (power restriction on all networks)
- Doze Mode (power restriction on all networks)
- App Idle (power restriction on all networks)

These restrictions affects 2 parts of the system:

- Internal framework state on NPMS which is propagated to other internal
- External firewall rules (managed by netd).

Although each of the power-related restrictions have their own external firewall
rules, internally apps are whitelisted to them through the same
whitelist, and the current code is only updating the internal state (and
notifying the internal listeners) when Battery Saver Mode is on.

As a consequence of this problem, there are scenarios where an app
correctly does not have internet access (because the firewall rules are
properly set), but the NetworkInfo state returns the wrong state (like

This CL fixes this problem by splitting the power-related logic from
updateRulesForRestrictBackgroundLocked() into its own
method (updateRulesForPowerRestrictionsLocked()), and making sure such
method is called whenever the firewall rules are updated.

Externally to this change, the CTS tests were also improved to verify
the apps get the proper connection state; it can be verified by running:

cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests \
-t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

BUG: 28521946
Change-Id: Id5187eb7a59c549ef30e2b17627ae2d734afa789
663330a325c4b324eb19cdb4f83189f342e01060 12-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix surfaceInset adjustment." into nyc-dev
0c4eeb498571708b2cca261b8f8519efae5a49c6 12-May-2016 Chris Wren <cwren@android.com> fix filter for listeners that are not the rocket

Bug: 28664037
Change-Id: Id1e4b243ed7423dbd2d4a8ead829cba9b20f30cd
e4874a1a4d51e9ecd3c8dfca1321ef4f8fab9e7e 11-May-2016 Robert Carr <racarr@google.com> Don't notify windows of resize during PIP animation.

We are notifying windows of resize as the frame moves (even though the
size does not change) during the pinned animation, confusing and
upsetting the client. We do want to notify it of the one resize
at the beginning or end of the animation, so we can't just block
reportResized on bounds animating. Luckily the other area that adds
windows to reportResized (Task) is smart enough to only do so if the
size has actually changed and not just movement, so we let those reports
go through and block ones initiating from here (which doesn't perform
a check that the size has actually changed).

Bug: 28559097
Change-Id: If1f983e7cc875175ce1d098c385478a9922dea67
26edcba2c950701ff2dd8794687552bc37e4dfc8 12-May-2016 Makoto Onuki <omakoto@google.com> Merge "Remove ShortcutManager" into nyc-dev
e4a3e5e8f13c4290e3e4c5667bedcd66ce699e63 12-May-2016 Richard Uhler <ruhler@google.com> Merge "Fix --reset argument to 'cmd package compile'." into nyc-dev
927b6be3d960a42bbc75aacc8dcde792a1d564b4 12-May-2016 Jaewan Kim <jaewan@google.com> Merge "Fix continous crash in WindowManager in boot" into nyc-dev
3328433f13c6f357cfca98553ff90fabe1da9c1e 12-May-2016 Jaewan Kim <jaewan@google.com> Fix continous crash in WindowManager in boot

Bug: 28728894
Change-Id: I660e2709a674eb4089dbb38173375491a87828db
4ee1c943ab5f7f69355d1413bca981812a804a67 12-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not clear profiles after OTAs" into nyc-dev
3cba6797783288f5eedf7836b815dbcc49a555b5 12-May-2016 Donghyun Cho <donghyun@google.com> Merge "CEC: Update system audio mode based on the current status of AVR" into nyc-dev
63c09fd6cd5db31180c3db119d097fb3c5a0e505 12-May-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix smallest width configuration calculation" into nyc-dev
8563943bd39107b5a7ff9ea475592d0040423ba1 07-May-2016 Jorim Jaggi <jjaggi@google.com> Fix smallest width configuration calculation

For calculating the smallest width, we need to iterate through all possible
orientations, snap the task bounds to a valid snap target and then use the
smallest width across all orientations.

In addition to that, when flinging the divider handle to the bottom of the
screen, we need to pass in fullscreen task bounds to avoid that this new
logic applies so the maximizing app only receives one configuration change.

Change-Id: I37aa9a40938517dfaf26770eb41327d76aec7c62
Fixes: 28469673
3723194dc831f4734d465602b2e21449d9357c2e 12-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev
254d9e4f410f63ed1ba3f917e207731c5d9d6538 12-May-2016 Jim Miller <jaggies@google.com> Merge "Fix KeyguardManager.isSecure() to observe work profile" into nyc-dev
9c2bb6da700bc2fd64ccf3be04e4130550b95e92 12-May-2016 Chris Tate <ctate@android.com> Merge "Fix iterator double-advance in ContentObserverController" into nyc-dev
79c8a1fdf73212d4f22a33f2e09455d7bb484c34 12-May-2016 Chris Tate <ctate@android.com> Merge "Use Q=100 JPEG instead of PNG for wallpaper display" into nyc-dev
e9f5d365bb740edade62290d1d835902a58cfdf2 11-May-2016 Chong Zhang <chz@google.com> Merge "Deliver new activity options after the activity is made visible" into nyc-dev
371c44222f4f3268778efaf20368c92beaa2640c 11-May-2016 Chong Zhang <chz@google.com> Deliver new activity options after the activity is made visible

The return options need to be sent in makeVisibleIfNeeded() (where app
is made visible from invisible), in addition to handleAlreadyVisible().
We can't rely on getting a second ensureActivitiesVisibleLocked to
send the activity options.

bug: 28610520
Change-Id: I38a4fd4624daecddfe9ea49c87753b04b154bb82
2c4b8f9f11cce04ac246f2335d39243641c26b83 11-May-2016 Christopher Tate <ctate@google.com> Fix iterator double-advance in ContentObserverController

Bug 28725391

Change-Id: I1994e46645dbf716f3ef5d12f7d4833264e6937a
ce4db0a17f7063771f413fd606bb05a3ca54cbca 11-May-2016 Fyodor Kupolov <fkupolov@google.com> Call isUserUnlockingOrUnlocked with cleared identity

Bug: 28709934
Change-Id: I61fc31e906c8498f19d6d76cd0dc5f2de9738708
c484f5497c7263ab7012bad600caea9e493f465c 11-May-2016 Christopher Tate <ctate@google.com> Use Q=100 JPEG instead of PNG for wallpaper display

The quality difference is minimal, but the time to process the
wallpaper is an order of magnitude lower for JPEG. The source
imagery is still being preserved in its original format and
resolution; this affects only the scaled/cropped version used

Bug 28672266

Change-Id: I193854348ffb7eeb9e45dc08b8ef7173ea75c240
538c440c33fc2b9e0bf0c680ddbb14f9a079ff6a 11-May-2016 Makoto Onuki <omakoto@google.com> Remove ShortcutManager

Bug 28704708

Change-Id: If7b739adeec38d81d554fc1cf34c81194f5d67b9
bc5446cba502eeda3b4e0e81f512e673b6b55caa 11-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Crop wallpaper windows to their current target stack bounds" into nyc-dev
36ecd08dc1627a7ed9c0ef498b41c40a66d646b0 11-May-2016 Todd Kennedy <toddke@google.com> Remove STOPSHIP

Instead of tracking a one-off variable, use the version code to
properly determine a pre-N OTA.

Bug: 27872764
Change-Id: Ib80b96ebddfa8bec398e02137ec26ce006164921
5f201e682545c93ee93c9f17215b986f55bce348 11-May-2016 Richard Uhler <ruhler@google.com> Fix --reset argument to 'cmd package compile'.

Bug: 28562124
Change-Id: If5c2161e79ee1666943b591ac652ae9075e84390
ca34ab06eca921f8c193dfa7d0b500b6892890e6 11-May-2016 Ricky Wai <rickywai@google.com> Merge "Use userHandle not credentialOwnerUserId to check if it needs to show lock" into nyc-dev
68a32b5aad77d0e85a877bf0b10caaf3e419d5b2 11-May-2016 Julia Reynolds <juliacr@google.com> Merge "Do not bundle cross user." into nyc-dev
9cc7ad65a13b5d40566ea18be41a3c5a3610d4ab 11-May-2016 Ricky Wai <rickywai@google.com> Use userHandle not credentialOwnerUserId to check if it needs to show lock

It is possible that unified keys stored in keystore is not migrated,
while work mode is off and upgrade happens.
At this moment, user not able to turn on work mode as work is not unlocked,
and user cannot unlock work as parent's has a challenge.
mLockPatternUtils.isSecure(userHandle) should be the same as
mLockPatternUtils.isSecure(credentialOwnerUserId), except it is a unified
lock and work profile does not setup a lock/key in keystore yet(migration).

Bug: 28689675
Change-Id: Ia0755caa10ff94a25cf26c3e5907ecd33abd866e
4b4e81453372a9b60acdc181f3bc39c49c97f999 11-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Force status bar window to be visible when expanded" into nyc-dev
319380226ad4de0cffdb4f4da6abf5869702c49f 11-May-2016 Amith Yamasani <yamasani@google.com> Merge "Reduce wtf spam when a service onDestroy races with proc death" into nyc-dev
db1bc6bcc39c8c4deb1a86f889981e734a54fd72 15-Apr-2016 Adrian Roos <roosa@google.com> Force status bar window to be visible when expanded

Also don't collapse status bar if low profile gets set.
Status bar should almost never be collapsed without explicit
user action, and this only leads to issues.

Fixes: 27629489
Change-Id: Ibe5c64df578438c7224985b173a9cd967bf363bf
eae43fbd1712a009c4a59760bf9588b3092e1e37 09-May-2016 Julia Reynolds <juliacr@google.com> Do not bundle cross user.

Bug: 28665081
Change-Id: I026b8a3a731183f96b45c19b95b4a0d109677a4c
f09f0699369c02a6a46fbff68c02b00a7c703697 11-May-2016 Todd Kennedy <toddke@google.com> Merge "Fix secondary ABI instrumetion" into nyc-dev
c21f63aa9514fb5f34e195fade88f8545d935992 10-May-2016 Donghyun Cho <donghyun@google.com> CEC: Update system audio mode based on the current status of AVR

When AVR is newly discovered, make TV get the current status of AVR
first. Based on the response, TV will update and initiate system audio
mode if necessary.

Bug: 27858658, Bug: 27168826
Change-Id: I3084471db970d271693f10dae802d8abaccddf39
b3e435439cad94e5f20c7c9e0c4a5fa321c68443 11-May-2016 Narayan Kamath <narayan@google.com> Log optimizing apps dialog time in seconds (and not decis).

bug: 28528058
bug: 28544474
Change-Id: Ib95d5625640c3c8d27d1844c49188570d7196ee2
6694dbef38c3fe2c5ceef19d0ddd57b6d5b0b587 10-May-2016 Calin Juravle <calin@google.com> Do not clear profiles after OTAs

Bug: 28689868
Change-Id: I21b75eb6918915b16b0d1a06e753a56822834a2d
455f09d818d23d918d0146c91f977774cbfb0657 10-May-2016 Donghyun Cho <donghyun@google.com> CEC: Handle <Active Source> from AVR properly

To avoid timing issues, handling of <Active Source> was delayed until
corresponding tv input becomes ready. However, AVR is not considered as
a tv input, so delayed <Active Source> will not be processed. This
change makes <Active Source> from AVR handled immediately rather than

Bug: 25630805
Change-Id: Iae8e86a84b5a9e5a2e62e457aaf93da67f145fac
e6cb450b0db119d71601a8329bed380bb2b4e275 11-May-2016 Wale Ogunwale <ogunwale@google.com> Crop wallpaper windows to their current target stack bounds

Crop wallpaper windows to the stack bounds of their current target to avoid
them showing behind transparent windows in other stacks in split-screen mode.

Bug: 27989717
Change-Id: Iff7cec201dd8061026e32af0f44380862fc37705
e4044bb617ea849939058d953e250fcd540c75cc 11-May-2016 Jim Miller <jaggies@google.com> Fix KeyguardManager.isSecure() to observe work profile

The fix passes the calling userId instead of the current userId to
allow apps running as managed profiles to work.

Fixes bug 28666104

Change-Id: I9f8676ab11bd581d9e67b2b9f385036d4d3576ee
fdc675968c818a1913b870dd16077f6fe785ee3f 11-May-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Push unlocking/unlocked state to UserManager" into nyc-dev
d041822fe7ca70cdf1582d71cfb6ff9ab09b7c29 11-May-2016 Amith Yamasani <yamasani@google.com> Reduce wtf spam when a service onDestroy races with proc death

Only log a message if the ServiceRecord still has a non-null app

Bug: 28527548
Change-Id: I737679a6a0cd28d265919090c6a9e955ee454379
967a9a12a73b7c4b00badfecf4721dfa75e0abcf 10-May-2016 Jim Miller <jaggies@google.com> Always update cached copy of authenticatorId.

This fixes a bug where the cached copy of authenticatorId
was incorrect immediately after enrolling a new fingerprint.
During enroll, the authenticatorId is changed and needs to be updated.
The fix is to always get the new authenticatorId when we
call setActiveGroup(), which happens during every new

Fixes bug 28606914

Change-Id: I8b2d3afe67b3677b6e4516a550d874d9c2e426cd
a66d395490fc0797fb7b24ad8148c510a6e2cff3 11-May-2016 Amith Yamasani <yamasani@google.com> Merge "Fix multi-window assiststructure trashing" into nyc-dev
e713efcac103f3d8083ec9d5b00c528af7266b21 10-May-2016 Todd Kennedy <toddke@google.com> Fix secondary ABI instrumetion

When installing an APK that supports multiple ABIs, the ABI installed
can be forced to the secondary ABI [i.e. On devices that support both
32 and 64 bit variants, the 32-bit version can be forced when it's
the secondary ABI.] In this case, instrumenting the class always tried
to use the primary ABI. Instead of blindly using the primary ABI and
dropping the secondary ABI, we propagate both ABIs and make a
decision on which one should be chosen.

Bug: 28406240
Change-Id: I7ebb2fd264d2281912afd30f6d73ccb460f9cf85
44aabe4b7240a9a03678b4a66bdd5f46a9dfb29a 10-May-2016 Chong Zhang <chz@google.com> Disable keep_screen_on traces

bug: 28692100
bug: 27522448

Change-Id: Ic077e8985f1f21bc111287813fb2992ed01df909
7e7449f18af5485fd49d9401fb887435224ebde2 10-May-2016 Chong Zhang <chz@google.com> Merge "Fixes for restoring more than one child surfaces" into nyc-dev
f829c1463b4805545d15924ad6243b9405eb83d6 10-May-2016 Paul Crowley <paulcrowley@google.com> Merge "Revert "Two phases to set the password for disk encryption"" into nyc-dev
991357fe25b3addabf85b871df3f4098fc4b833b 10-May-2016 Adam Lesinski <adamlesinski@google.com> BluetoothManager: Make requestControllerActivityInfo one call

Instead of making multiple calls into the Bluetooth service,
make one call that can timeout. This helps prevent cases
when the Bluetooth process hangs and the system_server is calling into
it and causes a WATCHDOG restart.

Change-Id: I37778b7b6e508be420a21bdf23593ae89b38f5b8
dc5f558640da8785fabc274167ec37a0fda30cd6 10-May-2016 Antonio Cansado <acansado@google.com> Merge "Addressing API council comments on NetworkStatsManager." into nyc-dev
a1eb750e75ff7c7ef7698deed4442449c33334c8 10-May-2016 Paul Crowley <paulcrowley@google.com> Revert "Two phases to set the password for disk encryption"

This reverts commit 17e5dce5112fece2d2b9cd070c2f96bf65108e40.

Bug: 28694324
Change-Id: I6d89bc26cb429b195c9bcf640666c495617257b7
0df1ca8ab34e543b74ed8170bf12c2d5b6eda3a6 10-May-2016 Amith Yamasani <yamasani@google.com> Merge "Fix the issue that App crash on startForeground" into nyc-dev
6965c1869aa8499706522d057b5143bbc240178b 30-Mar-2016 Antonio Cansado <acansado@google.com> Addressing API council comments on NetworkStatsManager.

- DataUsageCallback renamed to UsageCallback
- DataUsagePolicy removed; passing in params directly to register method
- making it an abstract class
- passing in (networkType, subscriberId) that reached its threshold
- renaming onLimitReached to onThresholdReached to match existing naming
- only monitor single network,subscriberId
- no monitoring of specific uids; using device or user wide instead

- only owner uid can read its tags
- exposing only TAG_NONE to match service side

BUG: 27530098

Change-Id: I2b2664da71806868a1e937d2bf4d1f234637509b
fcc38e6c35be0dd68d722b7398cf2fb66c1c0d92 10-May-2016 Paul Crowley <paulcrowley@google.com> Merge "Hide notification before tie managed profile lock" into nyc-dev
9214704eac0af4b0d138a195bcea6fecef523ea5 09-May-2016 Chong Zhang <chz@google.com> Fixes for restoring more than one child surfaces

App may have more than one windows and subwindows. Remember which ones
are visible at the last setAppVisibility time, and restore only those
that was visible then. If the app itself requested to hide a window
before that, we don't want to use the window for early animation.

Also move mAnimatingWithSavedSurface into WindowState as it needs to
be tracked per window.

bug: 27455025
bug: 28296945

Change-Id: I3ed1879634fa7709de699d4518d8fcfc91a85554
4b8ab89ecad86353259454f92fd8f2bf1913b21b 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't even try adjusting when dock is minimized" into nyc-dev
4f128e4d968b376bb7c3fa209d27b0a30202e604 10-May-2016 Amith Yamasani <yamasani@google.com> Fix multi-window assiststructure trashing

When multiple activities within the same process
try to handle requests for AssistStructure, the
singleton mLastAssistStructure tends to trash
the old structure when a second window's request
comes in.

This change passes in a sessionId so that the
cache is only cleared if the session id changes.

Bug: 28348867
Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
84812583030b3799e8a1203b480b78d3825b7adb 10-May-2016 Ricky Wai <rickywai@google.com> Hide notification before tie managed profile lock

We should hide the notification asap before setting
managed profile lock, to reduce the time that user is unlocked
while the notification is still showing.

Bug: 28689675
Change-Id: I289302302e3079726998adefebe2e8b113b2e52a
01da140aced14162d6d1bf4a0b2bf33e23b9c2c4 10-May-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Don't throw runtime exceptions for permission flags" into nyc-dev
1ae68bfd59c811aca4be28be4c56c3ecf1d53b34 10-May-2016 Jorim Jaggi <jjaggi@google.com> Don't even try adjusting when dock is minimized

Bug: 28652219
Change-Id: I61fa515ec945e1da6b9e7a53766abea2fb1e606e
6c915ead38db0a2a6393c40d4fbac959399439c5 10-May-2016 Fyodor Kupolov <fkupolov@google.com> Push unlocking/unlocked state to UserManager

Push unlocking/unlocked state to UserManagerInternal when it's changed in
UserController. Use UserManagerInternal.isUserUnlockingOrUnlocked when
updating flags for filtering in PackageManager.

Bug: 28629076
Change-Id: I8440af090f533f93870d0cff0e3871e114c37efa
6795f0ba198170c5cc044e04be65dd1171d5f7a5 10-May-2016 Narayan Kamath <narayan@google.com> Merge "Use MetricsLogger.histogram for optimizing app statistics." into nyc-dev
0a872f0b126e233a194dce9359032667f7d34694 10-May-2016 Chong Zhang <chz@google.com> Merge "Make sure preserved surface is removed when it's no longer needed" into nyc-dev
8eb290150c1e1d1c432643555342815f554bd32c 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed logic error when calculating window touch exclude region." into nyc-dev
e4dd96453179d9f5449fe33c6aa4b909ba440f5b 10-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed logic error when calculating window touch exclude region.

Problem was introduced in ag/960365. We need to properly set the
temp variable to the current task bounds before trying to use it.

Bug: 26962445
Change-Id: I3cded03582e1379e16fa48f69da6ceadb92d8d4b
7e01af424355b5bbac64126fef4e3d37c9c41dd7 10-May-2016 Svetoslav Ganov <svetoslavganov@google.com> Don't throw runtime exceptions for permission flags

We were thrwing undocumented runtime exception when
one gets the permission flags - now we just return
default result of the package is gone.


Change-Id: I42554a86b9304ff83fe9385f3eea930b8ebf0c63
aaabcce6d4373cbbc8b08b0ceb26cf0b8259437d 10-May-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Set notification listener defaults for system VrListeners." into nyc-dev
966210b7218a99f57d7e9b40f7d2c0ff69151776 10-May-2016 Narayan Kamath <narayan@google.com> Use MetricsLogger.histogram for optimizing app statistics.

bug: 28528058
bug: 28544474
Change-Id: Icbe26e9699eade08725e38914f07d7584e77b608
3496fdbd2f84de3c8e8070be7d669b94ea1ca769 10-May-2016 Narayan Kamath <narayan@google.com> Patrially revert 4ec026930bfbbb5d8923f359c8.

In preparation for using MetricsLogger.histogram / count. The main
purpose of this change is to remove the (now bogus) action IDs
associated with this logging.

bug: 28528058
bug: 28544474

Change-Id: Id79de2d34c3f937a327ac21d44e55c18047bce85
9b40edab61ca9bf3b9f5931bbfc266eb6c6216e6 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Enable profile merging for post-OTA package verification"" into nyc-dev
88eea9e580a6b2ee804a092f851b5325355fcdce 02-May-2016 Narayan Kamath <narayan@google.com> Add a command to print package dexopt status.

Can be invoked like so :

$adb shell dumpsys package dexopt
$adb shell dumpsys package dexopt <packageName>

bug: 27494108
Change-Id: Ie91f744aeac772e0e22abc9c805df9290a4e2418
c26aabadc3a88af6cdfe50fa163eb48c0330c90e 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove replaced window if we aren't animating its exit." into nyc-dev
eb66557eeb923cf33a4c2e133776ab8cbc9aa571 10-May-2016 Chong Zhang <chz@google.com> Make sure preserved surface is removed when it's no longer needed

Preserved surface might be used for format change as well as surface
size change outside a drag resizing. We currently remove the preserved
surface in prepareSurfaceLocked() after the window is shown, but
sometimes app gets stopped before any animation pass is run.

bug: 28546172
Change-Id: I7f883f4b5c6da4dce70f94173b368a912056d062
21bbc5a775ea65318d1250b0406c2573128d285e 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed bug with pop-up window placement at the bottom in split-screen" into nyc-dev
c118e62076c6defc39001c1618d566e20dda2574 10-May-2016 Carlos Valdivia <carlosvaldivia@google.com> Merge "[Security] Prevent malicious notifications from AMS." into nyc-dev
b3b7763d5d35f4e85f3c5245abb9ab526b0e4c23 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix package cleanup when parsed APK missing." into nyc-dev
8820f943e0254e188861ef4bc73a95cefc648942 09-May-2016 Ruben Brunk <rubenbrunk@google.com> Set notification listener defaults for system VrListeners.

- For a package that has been enabled as a VrListenerService
and been preinstalled on the device's system image, enable
NotificationListenerServices by default for that package as
- Use appops function instead of packagemanager for runtime

Bug: 28614768
Change-Id: If88d47b666656a6e9567118626c1d9fa00280ec4
aab8cbfa234e1c53f909ac4bebeccbe2ddbeda05 10-May-2016 Jeff Sharkey <jsharkey@android.com> Fix package cleanup when parsed APK missing.

Recently the uninstall logic was changed to require a parsed APK to
succeed, but we need uninstall to succeed when the APK lives on an
ejected storage device.

To fix that case, create a fake parsed package with just enough
information for the delete to proceed.

Fix package movement bug that sent an invalid user ID to installd;
we need to explicitly ask for each user.

Bug: 28658206
Change-Id: Icf417661f07688c7523f0d082528adec2ac70cc6
e981777f0e92f7e35d283a41c98f4d99e561c679 09-May-2016 Winson Chung <winsonc@google.com> Merge "Fixing regression in call to showRecents()." into nyc-dev
9aa6bb5a4a8bd00a175e8a9c338b52bc24a162b4 09-May-2016 Paul Crowley <paulcrowley@google.com> Merge "Two phases to set the password for disk encryption" into nyc-dev
a806e8ab1213ef420c9c0d541dbbe96a7d9f1472 09-May-2016 Chong Zhang <chz@google.com> Merge "Fix a flicker when opening app again quickly while it's exiting" into nyc-dev
14db362511e52b4d5104115cf68e49c63763908a 09-May-2016 Winson <winsonc@google.com> Fixing regression in call to showRecents().

- Previously, the call was made to showRecents() which took a single
boolean to determine alt-tab state, and after the refactoring, it
no longer made the same call.

Bug: 28663474
Change-Id: I75fb793e56c9a094a4372d7157dbd0dd7ecdbda7
ac29617c6e11085c9648d150a50c5daa15d65645 09-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I04301fbd,If6577602 into nyc-dev

* changes:
Flesh out the docs for the android.os.health package.
Properly blame the correct uid for wakeup alarms that don't have a WorkSource.
e22006d936e0928b4a335646f19a8ca18a7fb1e2 09-May-2016 Chong Zhang <chz@google.com> Fix a flicker when opening app again quickly while it's exiting

If the app is waiting for an opening animation with a dummy placeholder,
we need to skip the surface placement (in addition to the animateLocked).

Also, when animating is changing from exiting to entering, the mAnimating
flag needs to be cleared until the new animation starts. This prevents the
surface placement to place it wrong before the new animaition starts.

bug: 28599295
bug: 27742244
Change-Id: I26f0ead80ee9993a6c766ae8686ab11d1729519c
de5a7afc7989ecef051635fdc9ae52a69870c026 09-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't include IME in app screenshot while in multi-window mode" into nyc-dev
d0a166a37d384f21ea595b187041e9e0894e4e7c 09-May-2016 Wale Ogunwale <ogunwale@google.com> Remove replaced window if we aren't animating its exit.

Allow removal of replaced window if it isn't running an exit animation
and wasn't set to run an exit animation.

Bug: 28411852
Change-Id: I916d7c9461691bc58367d012113fefe9c6485127
78bcdf91edb18c8775d736f8819085d9febc01b2 09-May-2016 Joe Onorato <joeo@google.com> Properly blame the correct uid for wakeup alarms that don't have a WorkSource.

It was setting the uid to -1, but BatteryStats should be tracking the actual uid.

Bug: 28637246
Change-Id: If6577602e3fe59a95b5cece4fc99e704ba43c03e
8412cf4daaa437003f4a79a82aa35465c4f0d418 09-May-2016 Calin Juravle <calin@google.com> Revert "Enable profile merging for post-OTA package verification"

This reverts commit 5da9dad2dd04586dbd665e6a73bfee1d0ed92a89.

Bug: 28612421

Change-Id: Idbbb24241362a70b697ae2d648ea47996f5239c6
12f2984dbf10e89124afd7bf8242f564e5a176aa 09-May-2016 Richard Uhler <ruhler@google.com> Merge "Remove inconsistent 'cmd package compile' documentation." into nyc-dev
d521a6d1467a41ba20744f63dd70a40be0f35be0 09-May-2016 Bo Hu <bohu@google.com> Merge "Ensure Netd Service is alive" into nyc-dev
07cc3bb04081b8ad836f16abb7644a626fc47bae 04-May-2016 bohu <bohu@google.com> Ensure Netd Service is alive

At least on android TV emulator system image, the Netd
service could be null when the setDnsConfigurationForNetwork
is invoked.

bug: 28553503
Change-Id: If059495c8573ede287c4e9d8f343318d519fca7f
06329e5fb214ce6c2179b7fc7740c0fba41f084a 08-May-2016 Carlos Valdivia <carlosvaldivia@google.com> [Security] Prevent malicious notifications from AMS.

There was a hole in the getAuthToken logic that allowed notifications
resulting from getAuthToken requests using notifyOnAuthFailure=true to
launch arbitrary activites on the device. This is because the
getAuthToken session overrode onResult (unlike addAccount, updateCreds,
or confirmCreds).

Bug: 13787929
Change-Id: Ife1d48835f48416c2f0690f1413a076b69215190
a5434dd987ca976d677e5e247e35ccca529338d2 08-May-2016 Wale Ogunwale <ogunwale@google.com> Don't include IME in app screenshot while in multi-window mode

We don't screenshot the IME in multi-window mode because the frame
of the IME might not overlap with that of the app. E.g. IME target
app at the top in split-screen mode and the IME at the bottom
overlapping with the bottom app.

Bug: 28446505
Change-Id: Iae4f7eafa582779a4cf2aba3d83c4d9f76a4ccca
7cd4b01af3ae88f9db036510f4769c27f45bb4b2 07-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed bug with pop-up window placement at the bottom in split-screen

WindowState.mInsetFrame is used to represent a temp. offset of a task
due to something like docked stack resizing or IME currently on screen.
In the case of pop-up windows (or any child window that wants to layout
in the parent frame) we were incorrectly setting the containing frame
because we were checking to see if the mInsetFrame wasn't empty. This
check isn't needed for child windows that want to layout in parent frame
because the parent frame will already have the mInsetFrame applied to
its frame which will automatically trickle down to the display and content
frame it forwards to its child windows to use.

Bug: 28389714
Change-Id: If89d40845a5a14aa60abcdedef2385b1fe7bfee3
dce92891df42d5ad8cdcb6ecade5b2801a14f090 07-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix minimized state messup" into nyc-dev
52b952a296b84283db9041de96e2ff408b221572 07-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reset transparent region when saving a surface" into nyc-dev
638a6e8140a22a0ddb5d5dacb02173795073bd1a 07-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed connectivity state in some restricted network scenarios." into nyc-dev
817a52441ffcc47e4a85755127bff58f2d4ba0f7 07-May-2016 Jorim Jaggi <jjaggi@google.com> Fix minimized state messup

We didn't dispatch the change, but still set the field. This lead to
issues where SysUI disagreed on the minimized state. To fix this, we
only check for state changes if the docked stack is visible, but then
dispatch the change always.

Bug: 28445644
Change-Id: Ie460135049c78e11c97f3160994ca4069bf82e6c
a5aa3ecbe3426b44b6d550624e7b30f4b84c1025 07-May-2016 Andrii Kulian <akulian@google.com> Merge "Fix onStop not called when activity is under translucent" into nyc-dev
3131bdec7049f54b58a808328286b759cd9bb43c 06-May-2016 Chris Craik <ccraik@google.com> Reset transparent region when saving a surface

Fixes: 28432088

Ensure a transparent region on a saved surface is reset for future use,
since the surface should be like-new if used again.

This prevents an issue where the region - used to signal a portion of
content doesn't need to be composited - is persisted when a saved
surface is reused. The client assumes it's new and in default
state (composite everything), but the window is clipped when composited.

Change-Id: Icf2ec94c735679d715aded58de7eab12e9c43367
d31a97fd83468d27d0f4c6e1455c2f6f59d5a7c9 06-May-2016 Felipe Leme <felipeal@google.com> Fixed connectivity state in some restricted network scenarios.

NetworkPolicyManagerService (NMPS) keeps an internal list of uid
rules (mUidRules) for network restrictions, and when these rules
changes it needs to notify external listeners (such as
ConnectivityService / CS).

Prior to Android N, both Data Saver mode (the feature previously known
as "Restrict Baground Data") and Battery Save mode used the same set of
firewall rules to implement their restrictions: when Battery Saver mode
NPMS would mark all networks as metered and set the proper firewall
rules externally.

Recently, these 2 modes were split in 2 distinct firewall rules and
NMPS.updateRuleForRestrictBackgroundLocked() was changed to update
the mUidRules logic based on the Data Saver firewall (since the Battery
Saver firewall changes are handled externally, on
updateRuleForRestrictPowerLocked()). As such, CS was not notified when
the power-related changes were made, which would cause apps to get a
state of CONNECTED / CONNECTED when querying its active connection.

Another scenario that is not properly handled is when a UID whitelisted
for Data Saver is brought back to foreground: although the proper
firewall rules are set, CS is not notified, and the apps state would be

This CL introduces many changes that fix this issue:

- Fixed updateRuleForRestrictBackgroundLocked() to invoke
onUidRulesChanged() when the Battery Saver status changed.
- Fixed updateRuleForRestrictBackgroundLocked() to invoke
onUidRulesChanged() when an app whitelisted for Data Saver is brought
back to the foreground.
- Added a new API (onRestrictPowerChanged() and getRestrictPower())
to notify external services about Battery Saver mode changes.
- Fixed CS logic to properly handle the Battery Saver changes.

Externally to this change, the CTS tests were also improved to verify
the apps get the proper connection state; they can be verified running:

cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests \
-t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

BUG: 28521946

Change-Id: I8eaccd39968eb4b8c6b34f462fbc541e5daf55f1
de66540fd3f73937c3cfbe1d50e575aa69acc474 06-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactored NetworkPolicyManagerService mUidRules." into nyc-dev
058895407140de0e513b82150c3acb6131e971a2 06-May-2016 Chris Tate <ctate@android.com> Merge "Move the 'pretend idle jobs can run now' broadcast into AMS" into nyc-dev
f9949d55c3e23ddbe41012696213e3d38f1d6b32 06-May-2016 Andrii Kulian <akulian@google.com> Fix onStop not called when activity is under translucent

Activity was not stopped when device went to sleep if it was covered by
another translucent activity. The issue appeared after ag/864253 which
disabled stopping for visible activities.

Bug: 28191555
Change-Id: I39f0c5579ee3e5a16db888c72ace5dc43aa307bd
6976f7bae901d81a354287088ae232ba7236f30e 03-May-2016 Winson <winsonc@google.com> Disabling movement of entire affiliated task set.

- This CL removes the dependency on the last-active-time of the task
record, since that is dependent on the current system time (which can
be changed by the user). Instead of working around the previous
behavior in ActivityManager which moves all affiliated tasks to the
top when one task is launched, we change the behavior in the AM
directly, and prevent re-sorting the list of recent tasks improperly
(aside from the stable sort which puts the freeform tasks first).

Bug: 27398177

Change-Id: I9fa9b3497d08082fe00aa724538255de87e746d6
5d6a218d9e0d21367f6365d4de51532ca7e14dc9 06-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dismiss docked stack if an activity is shown on top of the lock screen" into nyc-dev
27d92e4e397728d56f4f951dd4ce99668c7c447b 06-May-2016 Christopher Tate <ctate@google.com> Move the 'pretend idle jobs can run now' broadcast into AMS

It's a protected broadcast, so sending it directly from 'am' is
no longer an option. This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
17e5dce5112fece2d2b9cd070c2f96bf65108e40 22-Apr-2016 Paul Crowley <paulcrowley@google.com> Two phases to set the password for disk encryption

In one phase, we make the new password work, and in the second we make
it the only one which works ("fixation"). This means that we can set
the password in Gatekeeper between these two phases, and a crash
doesn't break things. Unlocking a user automatically fixates the
presented credential.

Bug: 28154455
Change-Id: I18812f9ce753486ce4e33b4fe2cca392b006b39c
46c4fc357ce8e686b6e7c2adda573e9870a8221f 04-May-2016 Felipe Leme <felipeal@google.com> Refactored NetworkPolicyManagerService mUidRules.

NetworkPolicyManagerService (NMPS) keeps an internal list of uid
rules (mUidRules) for network restrictions, and when these rules
changes it needs to notify external listeners (such as
ConnectivityService / CS).

Prior to Android N, both Data Saver mode (the feature previously known
as "Restrict Baground Data") and Battery Save mode used the same set of
firewall rules to implement their restrictions: when Battery Saver mode
NPMS would mark all networks as metered and set the proper firewall
rules externally.

Recently, these 2 modes were split in 2 distinct firewall rules and
NMPS.updateRuleForRestrictBackgroundLocked() was changed to update
the mUidRules logic based on the Data Saver firewall (since the Battery
Saver firewall changes are handled externally, on
updateRuleForRestrictPowerLocked()). As such, CS was not notified when
the power-related changes were made, which would cause apps to get a
state of CONNECTED / CONNECTED when querying its active connection.

This change refactores the mUidRules to use bitmasks, in preparation for
another change that will fix the issue.

It also fixes a minor bug that was preventing removed packages to be
removed from the whitelist.

BUG: 28521946
Change-Id: I9f0e1509a6192cad403f740c1cd76a6b7dab7d26
f970410afef518003c84eef022194848b2a4f606 06-May-2016 Jorim Jaggi <jjaggi@google.com> Don't crash the system when detecting a transient wrong state

Bug: 28616824
Change-Id: I124f7196d709c33fe70137541b650788af83b3b3
99732940809058fae558618399323c36b8a0e856 06-May-2016 Wale Ogunwale <ogunwale@google.com> Dismiss docked stack if an activity is shown on top of the lock screen

It is risky/complicated to try to put the activity showing on-top of
the lock screen in the right fullscreen configuration with the current
architecture. So, we just dismiss for now.

Bug: 28195260
Change-Id: I29a0350993ce8fe548d4a465b06d877cde151c78
ed811d731d211636b8617fb934e02d730a0039f8 06-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed bad focus stack state when focused docked stack is removed

ag/990438 allowed for stack focus not to be adjusted when the currently
focused stack is removed since the caller will be moving the focus to
the right stack next. This was incorrectly enabled for the positionTask
call were the stack will not be moved to the front since the functionality
is used to move task within stacks we don't want to gain focus.

Bug: 28616824
Change-Id: Ia6aea17c0335d036a17b83fed28799428ca58eda
ee057752cce759520e3ba7a022f8616504c12fa0 27-Apr-2016 David Brazdil <dbrazdil@google.com> Hide 'Optimizing apps' dialog if not M->N upgrade

Recent changes reduced the amount of time spent optimizing apps at
post-OTA boot. Instead of briefly showing the 'Optimizing apps'
dialog, we hide it completely.

The dialog is still shown for OTAs from a pre-N version of Android
since they can take a non-negligible amount of time (still much less
than in M).

Bug: 27350503
Change-Id: I5f6dae0c69799e1fc522f36453d2671b333bef0e
3a94ec56173170306b2304c858dbbeb99c3c93cc 06-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed deadlock between AM and WM when animating pinned stack." into nyc-dev
2ba712905fe70d70024912fc27f99dfe0dc4bf94 05-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed deadlock between AM and WM when animating pinned stack.

In Ie18cc04ceeabd94093017f79676253e1189f5249 we delay ending the
pinned stack animation until app transition is done. However, the
signal that app transition is done comes in with the window manager
lock held and the we call into AM to do some additional work which
requires AM lock to be aquired. Since AM depends on WM we shouldn't
be holding the WM lock while calling into AM since AM can call into
WM with its lock held. We now post a runnable to finish the pinned
stack animation without the WM lock held.

Bug: 28564514
Change-Id: I8450123e992e569a74609883de810cdc611ced81
47384f90b4adb6dc4a005a7870e0ec6841042151 06-May-2016 Joe Onorato <joeo@google.com> Merge "Add the individual wakeup alarm counts to the batterystats checkin." into nyc-dev
7be089b74e4c8be473caa6fc2c2b0268c5e9d83c 05-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix a regression in registering for package_removed" into nyc-dev
1476d32b87d85885838fb066bcca48f1df9750b6 05-May-2016 Joe Onorato <joeo@google.com> Add the individual wakeup alarm counts to the batterystats checkin.

Bug: 28601365
Change-Id: I94ad69eeb575f75d62bd45076184f521bd11052d
d90be6cccca683e34566f5550ebb34f1c8e75b69 05-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28602068: Add count to job scheduler stats" into nyc-dev
ac59f75e80ee06a302d268620d634de014ee0e38 05-May-2016 Amith Yamasani <yamasani@google.com> Fix a regression in registering for package_removed

Change-Id: I5d8bcc682f482d965cc9b76b5598a6521539272f
Fixes: 28616418 App is not removed from power whitelist when uninstalled
ea162c3c7992b01d8d56766a94e56a0cee3fe3b2 05-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Prepare to replace windows across recreate()." into nyc-dev
e2c1f9b78b0df6d1ce945c7b5083aad190a61585 04-May-2016 Wang Le <wangle@xiaomi.com> Fix the issue that App crash on startForeground

Install single APP in any user space except Owner user, the APP
got crash when call startForeground in Service Component with
Notification which without SmallIcon.

External bug:https://code.google.com/p/android/issues/detail?id=209043
Internal bug: 28602381

Change-Id: I88a3b8afc213cafe0f280f9b44d6acd2ea0df207
Signed-off-by: Wang Le <wangle@xiaomi.com>
2bea394d14e6e7ae6a183d302d21ce1deacf4774 05-May-2016 Shubang Lu <shubang@google.com> Merge "TIF: Keep recording sessions while changing user" into nyc-dev
8318223a6e2a8d5d8b39e0a81ce6fe09150ae100 05-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix reboot loop when "password to boot" is enabled on ..." into nyc-dev
00f8ee28512aa1fd5afb67a61cb258c01e1bb802 05-May-2016 Youngsang Cho <youngsang@google.com> Merge "TIF: build TvInput list at onUnlockUser" into nyc-dev
90f4ca78ee714733dd90427085b496c906e83789 05-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Track current user without calling into AMS." into nyc-dev
ab15c391ebc1a333d026692af32544a34102d2eb 05-May-2016 Jeff Sharkey <jsharkey@android.com> Track current user without calling into AMS.

From a layering point-of-view, StorageManager is below ActivityManager
and it shouldn't be calling upwards, since that risks locking
inversions. Instead, track the current user through the existing
SystemService callbacks.

Bug: 28598527
Change-Id: I02d3277eb26288d3b4e1897f4c9318a6288c9551
568a969f605043a044d08f3a58e7c1176a8d5572 04-May-2016 Richard Uhler <ruhler@google.com> Remove inconsistent 'cmd package compile' documentation.

Bug: 28562124
Change-Id: I89e6cd0d7ebb717bf1b143b615f717a1f6573549
8ac7f2134cc34e8be20049aad50761aef41039d0 05-May-2016 Makoto Onuki <omakoto@google.com> Fix reboot loop when "password to boot" is enabled on ...

a non english locale.

Bug 28607673

Change-Id: I316f348305238616e8254bb878b66099015a3793
8049f20df8c10397aac8d31bcb455913ad02bb67 25-Apr-2016 shubang <shubang@google.com> TIF: Keep recording sessions while changing user

Bug: 28302189
Change-Id: I3de400798b9ded5f9f67931fbe7033755d76902f
19c47d79951eb420e6926d188c7d39f5563c5b5f 05-May-2016 Youngsang Cho <youngsang@google.com> TIF: build TvInput list at onUnlockUser

From N, apps cannot be accesible until onUnlockUser is called.
So the TvInput's list needs to be built at onUnlockUser.

Bug: 28586844
Change-Id: I84c896fa243c05c7e1f794863d8a83288549e6ff
a75d4877af7fa045cc91b2d60d3801aa098608de 05-May-2016 Adam Powell <adamp@google.com> Merge "Have the Resolver/Chooser activities handle resize config changes" into nyc-dev
957df516f006129198847ff9448004c097e1be98 05-May-2016 Adrian Roos <roosa@google.com> Merge "Fix Trust Agent discovery for FBE" into nyc-dev
e783460274047ab38e3b9c4294339ff130fe566c 08-Apr-2016 Zoltan Szatmary-Ban <szatmz@google.com> Introduce system API to get source of user restriction

Clients can query who has set a particular user restriction on a user.
Currently the result can be a combination of none, system/user, or admin.

Bug: 27830375
Change-Id: I50ea9db0a59ffe3abbdcbb1a436d9ace7a35a851
4ec026930bfbbb5d8923f359c80b465d4b0ccda2 03-May-2016 Narayan Kamath <narayan@google.com> PackageManager : Log stats about the optimizing apps dialog.

Logs the following parameters :
- Total time spent optimizing apps.
- Total number of apps that were dexopted.

TESTED: with adb logcat -b events:
05-04 15:24:16.303 2065 2065 I sysui_action: [402,3]
05-04 15:24:16.303 2065 2065 I sysui_action: [403,34]
05-04 15:24:16.303 2065 2065 I sysui_action: [404,0]
05-04 15:24:16.304 2065 2065 I sysui_action: [405,163]
05-04 15:24:16.304 2065 2065 I sysui_action: [406,12168]

This shows that:
- 3 apps were optimized
- 34 apps were skipped
- 0 apps failed to optimize
- dialog showed a total of 37 (3 + 34 + 0) apps
- system has 163 optimizable packages
- a total of 12.2 seconds was spent in the optimizing apps dialog

bug: 28528058
bug: 28544474
Change-Id: I9eb5229a1589ca0df57d3fc03102992fa90a877f
5a969aa1391203e09dee3146fc31b395de36344e 05-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28602068: Add count to job scheduler stats

Also increase the event buffer size to 100, and implement
it as a real ring buffer. And put that implementation in
a generic class for use in other places.

Change-Id: I06936984e2c253fb5f0eb5d15faf0019ec73d4e2
f28b23416eb607734d255b0c5595674ee3b7b949 05-May-2016 Jorim Jaggi <jjaggi@google.com> Merge "Add dump information for divider" into nyc-dev
46768683136242de4240958708587dded637ef64 05-May-2016 Jim Miller <jaggies@google.com> Merge "Send FINGERPRINT_ERROR_LOCKOUT on some devices" into nyc-dev
46ef0579dddd6480306fa58553a6e3180aedf9c7 05-May-2016 Adam Powell <adamp@google.com> Have the Resolver/Chooser activities handle resize config changes

Both of these activities do additional work and look janky when
rebuilding for a config change, especially in the presence of
multiwindow. As neither of them use layouts or other resources that
vary based on configuration, mark them as handling the relevant config

Bug 27171954

Change-Id: I38df1d875bcb063d72316b586c4d3f8074c4fad9
31f71705df97767b4b4ac7026228664995478fe0 05-May-2016 Jorim Jaggi <jjaggi@google.com> Add dump information for divider

Bug: 28575870
Bug: 28445644
Change-Id: Ib2137c49f1672ed2a9e7e31a5b68c22e0bb166b1
35a8c2f00e1c3bb2e2cf24260682400d025a49f0 05-May-2016 Selim Cinek <cinek@google.com> Merge "Fixed an issue where children would animate strangely when removed" into nyc-dev
735fa43314b3779df4af15cc679d00aa9de9c14c 05-May-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Call unlockUserKey in a synchronized section" into nyc-dev
6afe594461930e83cbf5ecf181bf43fcba0060dd 05-May-2016 Chong Zhang <chz@google.com> Merge "Debug traces to facilitate screen timeout debugging" into nyc-dev
fc0810b4d47b3cd679c5c761eb225be3d1351060 05-May-2016 Paul Lawrence <paullawrence@google.com> Merge "Revert "Don't enforce this API - it's not sensitive"" into nyc-dev
ecf4622618bb963d913a3e217c92da61f305d79e 05-May-2016 Robin Lee <rgl@google.com> Merge "Disallow suspending the default dialer" into nyc-dev
ccca9fe2fe589c8ccde65aa8f86bdeb24561fd32 05-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't keep dead window with borrowed app token visible" into nyc-dev
4ffc3180121b36eec2577b3c311ad4da44c3af56 05-May-2016 Chong Zhang <chz@google.com> Debug traces to facilitate screen timeout debugging

bug: 27522448
Change-Id: I4d51be316e4aedecffb7001126849d7c6136d517
cca1c654f8d0d2ec4671e3b1342a2db5a5256eab 04-May-2016 Fyodor Kupolov <fkupolov@google.com> Call unlockUserKey in a synchronized section

This will make callers of isUserRunning to wait for the unlock to finish.

Bug: 28530527
Change-Id: I272e2166cdc3df8e34c3436c9c18ba6765da0625
51d1d9165aeef4315207900fe1ea36b3ae55ab29 04-May-2016 Wale Ogunwale <ogunwale@google.com> Don't keep dead window with borrowed app token visible

If the window was add by a client using another client's app token,
we don't want to keep the dead window around for this case since
this funcationality is meant for 'real' apps.

Bug: 28467642
Change-Id: Ie4fdd9f90b122439a2fbcc60085ebfdb562d5c6d
77bdfb512f963701082c5c78e9a9db00b167fcb6 03-May-2016 Robert Carr <racarr@google.com> Prepare to replace windows across recreate().

When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
7ec93a1ee2d381fdcd3be271712e4179ddbf9829 04-May-2016 Robin Lee <rgl@google.com> Merge "Add lockdownEnabled parameter to always-on VPN API" into nyc-dev
a5e6553917359bb662c8f2788feb3d617803d406 04-May-2016 Robin Lee <rgl@google.com> Merge changes I31d5260d,Ied92f558 into nyc-dev

* changes:
Start VPN as early as possible during startup
Split network agent created state from connected state
9de713d42269a5888d31423b74d4203dce382853 03-May-2016 Paul Lawrence <paullawrence@google.com> Revert "Don't enforce this API - it's not sensitive"

This reverts commit 895504e55788c5c7fd90830dcf01c41a79ca7fe4.
Also adds a change to device manager to prevent failure there
as in the bug below.

Bug: 28512889

Change-Id: I4a445ec365133e9e2764e2d625d61fc6ee2008ec
b69b5b4a6ddf14ad41de93a46095466858fbdec2 04-May-2016 Dongwon Kang <dwkang@google.com> Merge "Revert "TIF: add signal detection feature for HW inputs"" into nyc-dev
be3e539ff7b26d497f930fb2faf761e94fa99297 04-May-2016 Pavel Zhamaitsiak <pavelz@google.com> Merge "Fix race condition in MetricsLoggerService" into nyc-dev
0dc591b48d96c7b5ac809197c2fb758dccec15a2 04-May-2016 Robin Lee <rgl@google.com> Disallow suspending the default dialer

This is the only case that still had to be protected by priv-app, so
that check is removed at the same time.

Bug: 27635033
Change-Id: Ifd5e59ab56eb45f0651cb25882ead920c758ae51
323f29df583e9338e3b2bf90fc8c0785a934a61b 04-May-2016 Robin Lee <rgl@google.com> Start VPN as early as possible during startup

- Switch from USER_STARTING to USER_STARTED which is the foreground
version of the broadcast

- Set the new VPN network as CONNECTING initially to avoid spamming
apps with useless notifications ahead of the network being fully

Bug: 26694104
Fix: 28335277
Change-Id: I31d5260dda62ff440c31c44eb0aa5c891e2717e5
585e24889455d1d70d14a9c89a8acef922994898 02-May-2016 Robin Lee <rgl@google.com> Split network agent created state from connected state

Network creation setup sometimes involves extra steps after actually
calling into netd to create the underlying network, rules & routes &
to begin allowing sockets bound to it.

For example, VPN networks can set a UID whitelist or blacklist. This
should happen:

- AFTER there is a netID & network created in netd as
network-specific rules will need to be tied to / point at it. Those
rules are tied to the lifecycle of netd's network which is tracked
by `NetworkAgentInfo.created` on the frameworks side.

- BEFORE the CONNECTED broadcast and network callbacks have been sent
out so that we don't create a race condition between clients that
want to use the network and the server actually having the network

The race condition existed prior to this change and required any client
making use of network callbacks to sleep for a short amount of time after
receiving to actually be able to use the network.

Among other things, that race condition is now fixed.

Bug: 26694104
Change-Id: Ied92f5588a98c3e97f456bc98b676bf201ab5472
3423a513e7c0c0a0a7ae0fada1fc684c990c0aa2 04-May-2016 Ricky Wai <rickywai@google.com> Merge "Do not show exception stack trace when no child profile key" into nyc-dev
de3a068af63abc0f4173d4c4b2d8530bae6dd203 03-May-2016 Ricky Wai <rickywai@google.com> Do not show exception stack trace when no child profile key

Bug: 28396912
Change-Id: I48e3f3223d04a0ba3dd2d975901b0504ce0dd25f
564915c58e30a1849386f1a77559a461b9f681f4 04-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check permission for FLAG_WILL_BE_FOREGROUND." into nyc-dev
c8cc38c8c56770dd3ff2a7e2fbb3267c6a9a14d0 04-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Avoid restart when inserting/ejecting adopted." into nyc-dev
d197486f26c223566c75fb2df93c152b1fc3172b 04-May-2016 Jim Miller <jaggies@google.com> Send FINGERPRINT_ERROR_LOCKOUT on some devices

For devices that don't support hardware lockout, send
FINGERPRINT_ERROR_LOCKOUT after the last unsuccessful
authentication attempt.

Fixes bug 28346640

Change-Id: Iae3eb8e422f09100a0229c350df9983af5fd8762
976b9b04e4b38c3be2f91d6955e53874ad52cb10 04-May-2016 Daniel Estrada Alva <destradaa@google.com> Merge "Update verbosity of hardware providers." into nyc-dev
4fec5fe6efcf6c3a932b1fe7f2f68264e9d7b604 04-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix wrong import" into nyc-dev
4a3a601082b88ee057aa71421e45cb00041ecfff 04-May-2016 Dongwon Kang <dwkang@google.com> Revert "TIF: add signal detection feature for HW inputs"

This reverts commit 102d0b7b6970523ca7040e30d4e4fd1a349a01cc.

Change-Id: I50a66d7bd1baaea134ddd6638c3cfe65860e681d
4f10040f6b37f4d3c11487d452d3eb86c858a756 04-May-2016 Jeff Sharkey <jsharkey@android.com> Check permission for FLAG_WILL_BE_FOREGROUND.

This flag is only designed to be used by platform internals, such as
DownloadManager, so require that callers hold a nice strong

Bug: 26571724
Change-Id: Ie5ec55399e2e3a64b2837ef2c0a7a8a79bd1e49f
e76ffd19a4fec84c11bf91dfc131098d57243303 04-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #28200735: AcitvityManagerService lock held for..." into nyc-dev
379d52be47be88b86f0d446c27d47e80bb81cfd1 04-May-2016 Jeff Sharkey <jsharkey@android.com> Avoid restart when inserting/ejecting adopted.

When rapidly inserting/ejecting an adopted storage device, we might
still be trying to prepare the storage device. Catch the exception
to avoid a runtime restart, and keep rolling forward, since we'll
probably be handling the ejected event in a few moments to clean up
any packages.

Bug: 28467146
Change-Id: Ib923663ae6d63259c1b5792b68dfe760612ab838
66a440a320ece64452ff42dc5721f124fa7b969f 04-May-2016 Chong Zhang <chz@google.com> Merge "Fix a transparent flicker due to wrong crop" into nyc-dev
27c279d5c8f0c237c4b95bffebbfe2ca4b5b8d75 04-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28477006: Add small event log to job scheduler" into nyc-dev
6b4893a2d169649a2e2a2efa5343f696712cc5df 04-May-2016 destradaa <destradaa@google.com> Update verbosity of hardware providers.

Uses a debug log for logging of messages related to hardware providers
that are not mandatory in the device.

Bug: 28530304
Change-Id: Ief1f193f934e7ebe7077366aafaa913b216e3481
68771eb837b0a7b94c120a450624d392496413ce 03-May-2016 Adrian Roos <roosa@google.com> Fix Trust Agent discovery for FBE

Trust agent discovery happens earlier than unlocking the user's
key for file based encryption (FBE), so we need to explicitly
also ask for non-direct-boot-aware packages.

Additionally, never run trust agents for a user that hasn't been
unlocked yet.

Change-Id: Ice8a6510f163508abecfd83d627658f7aaa5107f
Fixes: 28537596
7095d92afc099773df9257a68d12064afc209cf3 04-May-2016 Chong Zhang <chz@google.com> Merge "Apply IME adjust to newly added window" into nyc-dev
8e0626572d44413e77ab73bd859b9d76c16c0d6b 30-Apr-2016 Chong Zhang <chz@google.com> Fix a transparent flicker due to wrong crop

When transfering an animation, copy over app animator transformation
in addition to the animation object itself.

bug: 28399102

Change-Id: I8694a76993476b19ec61d74680d6fc51326a18bf
d75962eb8377e0d5e500e4cf36f2abce9bbadfcc 04-May-2016 Jorim Jaggi <jjaggi@google.com> Fix wrong import

Bug: 28557404
Change-Id: I785bf29d094b26037e5ca0798af5df8a663b85cf
3f19f60d654421eee5b35a92129081f08c977629 03-May-2016 Selim Cinek <cinek@google.com> Fixed an issue where children would animate strangely when removed

Previously we tried to fix a notification flicker when the summary
of a group was removed. This lead to a few issues that group children
would now also generate an animation and the whole notification would
just look weird.
We are now cancelling notification children as soon as their parent
is cancelled already in systemUI to ensure that the animations are
properly rendered.

Change-Id: Ie639b4ad28bdb55d922308e04c14a4e5b32b90bb
Fixes: 28190616
5117e273eca0b15ef057d0c2440546799c17edf4 03-May-2016 Chong Zhang <chz@google.com> Apply IME adjust to newly added window

bug: 28390108
Change-Id: I72132d68cb41056fb69f2fe38fa13f2b3c9ce3d6
aa262c866f27515134b73910d6babc753daa611c 03-May-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Update dumpsys logging for VrManagerService." into nyc-dev
facdf193139ab32582cf642a6648261bd873268a 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "copy auto-group decisions to updates" into nyc-dev
00194e0f2468d3848aee7e65e542bb5224cfd44a 03-May-2016 Adam Lesinski <adamlesinski@google.com> Merge "BatteryStats: Fix units on battery charge counter" into nyc-dev
49bdf11cd5e388c0c91cfa095f3b6314902f9994 03-May-2016 Badhri Jagan Sridharan <badhri@google.com> Merge "Change low power stats format to make it easier for parsing" into nyc-dev
ef3aa6ee53c5e4f1c50dd5a9b5821c54e449d4b3 30-Apr-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28477006: Add small event log to job scheduler

Added. Also fixed dumpsys output when filtering, to apply the
filter to (almost) all of the output.

Change-Id: Iafb446599ad8fddbe8a766784deff618a6cfdbb7
15c4e31b0f7226987267656926c98d2c5d53585a 03-May-2016 Badhri Jagan Sridharan <Badhri@google.com> Change low power stats format to make it easier for parsing

New format: PlatformIdleStat state_1 name=XO_shutdown time=0 count=0
voter_1 name=APSS time=48264099 count=484 voter_2 name=MPSS
time=48573849 count=39857 voter_3 name=LPASS time=49584723 count=2082
state_2 name=VMIN time=47171000 count=38222

Old format: PlatformIdleStat XO_shutdown_time=0 XO_shutdown_count=0
APSS_time=9467486 APSS_count=583 MPSS_time=10835070 MPSS_count=9131
LPASS_time=10624719 LPASS_count=595 VMIN_time=9231000 VMIN_count=7878

In the old format it was hard to differentiate between the various
low power states and the voters for each state.


Change-Id: I3930aaf1c8c6e17066ef043552096ba61373f9f4
65e22a20acd50876602f25b9b607aeea57682971 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ActivityManager: Make bootcomplete marker failure a warning" into nyc-dev
28309fec2f104e181c22ab03ba3cec7f8756e4b7 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added option to reset network policies for a given user." into nyc-dev
a8018ac47a0c0725882a041a1c42e67f52129f02 03-May-2016 Adam Lesinski <adamlesinski@google.com> BatteryStats: Fix units on battery charge counter

The unit for the battery charge counter is in micro-Ampere-hours, not coulombs.
We store the value as uAh but display it in dumpsys as mAh.

Change-Id: Ib5cc1ee1c5c191336a3e1f18dbb12c38e833f8d0
c70e264de102a1e1a4b77018bcc4eded08d4b254 03-May-2016 Chong Zhang <chz@google.com> Merge "Fix bad animation when pressing Home with translucent activity" into nyc-dev
0e11a4cd9ddfb53ff2f246c4674188e80dd3fa04 03-May-2016 Andreas Gampe <agampe@google.com> ActivityManager: Make bootcomplete marker failure a warning

This isn't terminal, and currently even expected in some cases.
Make it a warning instead of an error.

Bug: 26978865
Change-Id: Ieb7f29e340f5b08f69887b9f094554858fb72786
7d164d35a41d2aa351f0a27faf05fc67ba262c07 03-May-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManager: finishing touches" into nyc-dev
e8fc84b449d0b0850b1ffacdc43b103521bd2ebd 03-May-2016 Pavel Zhamaitsiak <pavelz@google.com> Fix race condition in MetricsLoggerService

Bug: 28204408
Change-Id: I7e0577d2161f6083ae84ab29db24f23415d145be
d17fda40cdcf875002086fbe98bf34ba7cbdb03c 29-Apr-2016 Felipe Leme <felipeal@google.com> Added option to reset network policies for a given user.

BUG: 28429571
Change-Id: I675e4ee5484a865f6819d7a0eef34133be11306f
dc67971a996c447c71ceb9ad983c79c96f598bcc 03-May-2016 Robin Lee <rgl@google.com> Add lockdownEnabled parameter to always-on VPN API

Allows callers to opt-out of blockading network traffic during boot and
on VPN app failure.

Bug: 26694104
Change-Id: Ibfbd43ad09a25f2e38053fcd6306df3711f8bde2
87a18d9e2bff2562ca11d6cfcaa5693be4027ba3 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't remove all app token windows when window client dies" into nyc-dev
d4d1512b64df37157f3fa9c205f1dd3738b47e21 03-May-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Disable unused features" into nyc-dev
a7532cfa46bc0c0a795aaaafe89d0727927b3cd7 02-May-2016 Svet Ganov <svetoslavganov@google.com> Disable unused features

The multi-package APKs feature was not validated and is now disabled.
Also the ephemeral work was postponed which requires disabling of the
ephemeral cookie APIs.


Change-Id: Iab7f11c503a76bcc414408dfebdf200843db814e
37634aefb6e32af696355bad859335fa00f14261 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed some issues with resuming already resumed activity" into nyc-dev
e877d2d791dfdbc4a78b6fd50efa2cfce7bce2ea 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Multi-user Data Saver fixes:" into nyc-dev
e42d0e102dbdf5287703389183a69019b64fc35e 03-May-2016 Wale Ogunwale <ogunwale@google.com> Don't remove all app token windows when window client dies

AppWindowToken can contain windows from multiple clients (Processes)
If one of the client dies we shouldn't remove all windows in the app
token. We should only remove dea windows.

Bug: 28467642
Change-Id: I8be6a98e0acc79719158567114f4902066069c1b
d127c6d46179ac74afe20ccfd99f0d4ed2da0eb0 03-May-2016 Chong Zhang <chz@google.com> Fix bad animation when pressing Home with translucent activity

Force a setAppVisibility if the previous app was translucent, so that
the resumed app is added to the opening app list. Otherwise opening
app list is empty and the transition can't be set up correctly.

bug: 28463843
Change-Id: I7f8e28d0f804c799a429743df6fc501c06d62f21
599de361cb7832fec18a51a62cbf44af4df27020 03-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Apply non-FBE migration early during boot." into nyc-dev
f10640adef2ca62204d802029e65f12d61908e7b 03-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "When fork() fails, clean up data structures." into nyc-dev
dba83f128999708d15a3172cdfaf0b596e4e7048 03-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Yell when no home app was found." into nyc-dev
a110eec77f226965cf14d2a2385dae6b22565ec4 29-Apr-2016 Felipe Leme <felipeal@google.com> Multi-user Data Saver fixes:

- When adding a new user, adds its default whitelist apps.
- When removing an user, clears its revoked default whitelist apps.

BUG: 28451218

Change-Id: Ic30a3d6d30c7575620edd3ad32c3221203626f8d
f0143cc1c6f9d81e70246f7254f52f23d65ac72c 02-May-2016 Jeff Sharkey <jsharkey@android.com> Apply non-FBE migration early during boot.

On non-FBE devices, we offer to migrate CE/DE storage of certain
system apps during boot. However, if this migration happens after
app code has started to run, we end up clobbering open files such
as databases.

The right way to solve this is to apply all migration early during
boot (in the PMS constructor) before any app code can start.

Bug: 28512897, 28525109
Change-Id: I17eb9a09e5862d873b86c05ce35874a34386e433
b42061269617b3ad84882749031413c223d6cb8c 02-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use existing bounds when pinning an activity if there is already pinned stack" into nyc-dev
65e654a1a18ae547e1728a355f25d99c796f0abd 02-May-2016 Paul Lawrence <paullawrence@google.com> Merge "Don't enforce this API - it's not sensitive" into nyc-dev
06579d63a865ac87641c7fec56efde39bc2b8f59 01-May-2016 Wale Ogunwale <ogunwale@google.com> Fixed some issues with resuming already resumed activity

- Don’t adjust focus stack when a stack is left empty because we moved
the last task in it to the stack that will be the new top (focused).
Focus can be temporarily adjusted to another stack which we don’t want.
- Protect against trying to resume an already resumed activity in
ASS.resumeFocusedStackTopActivityLocked. This will just cause a crash
on the client side.
- In ASS.moveTasksToFullscreenStackLocked defer resume activity call
until we are done moving all the tasks to the new stack.
- In ASS.moveTaskToStackUncheckedLocked check top running activity
instead of just the top activity when we are trying to determine if
the task as focus and resumed. It is possible the resumed activity
in the task isn’t the top most because the top most is still
initializing or going away.

Bug: 28219871
Change-Id: I8c1113503f6f83d39983375a4f92155ddc04f20f
895504e55788c5c7fd90830dcf01c41a79ca7fe4 02-May-2016 Paul Lawrence <paullawrence@google.com> Don't enforce this API - it's not sensitive

Also it breaks device manager


Change-Id: I0006461c6a76bc1b7d19f9b07bec35b6807a4f96
65790f215eacc5893cbcc7159bc18756b4184561 02-May-2016 Jeff Sharkey <jsharkey@android.com> Yell when no home app was found.

If we didn't find a home app, the boot just appears to be wedged
and it's hard to investigate what the root-cause is. Let's log to
make it more obvious.

Bug: 28465914
Change-Id: I9697af83eb27efb54f1f703506d4f148c96425b0
424d35c0483d43cad46a37ad64790914d75045a8 02-May-2016 Andrii Kulian <akulian@google.com> Merge "Fix minimized dock stack for translucent activity over home task" into nyc-dev
8a1638f66a79dbf471e7e53294ba853b862434e6 02-May-2016 Chris Wren <cwren@android.com> copy auto-group decisions to updates

The rocket runs too late to affect auto-grouping for updates before
the UI reacts to the group change, so make sure it stays the same
until the rocket has an opportunity to reconsider.

Bug: 28517296
Change-Id: I16a0509cac06912c8b3139f06474f312207f9f8c
64ca2706000264b4f49f1e9f9566b69f0ce8b5a0 02-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow pinned activities to finish immediately" into nyc-dev
f2812853b820ad994be2b9c42e7905f61e4a0106 02-May-2016 Sudheer Shanka <sudheersai@google.com> Merge "Allow any app to silently uninstall the orphan packages." into nyc-dev
53482cb6c0a4d51de8aab15f22c9490c9169b05c 02-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don’t relaunch activity in fullscreen stack when entering split screen mode" into nyc-dev
4d36b3a8c5ba1289d851ef337e46709bba333100 27-Apr-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: finishing touches

- Change back the throttling quota to 10 calls / day
- Foreground apps are no longer throttled, and when an app comes to
foreground the call counter will be reset.
- When the system locale changes, reset throttling for all packages
for all users.
See LocalService.onSystemLocaleChangedNoLock() for how it's performed.
Because the reset must happen before any other apps have a chance to
publish shortcuts, the logic is not straightforward.

- Added an internal API to reset the throttling upon inline-reply
from a notification.

- Stop supporting icons from "content:" URIs
- Improved javadoc on several APIs.

Also internal refactor needed to this:
- ShortcutUser.getAllPackages()/getAllLaunchers() are no longer
accessible to outer code to prevent accidentally adding/removing the
content. Outer code should use forAllPackages() / forAllLaunchers().

Bug 27923857

Change-Id: I002511193d1d33718163bb1dabe77610bde58198
132daa9679a58102c3906e33caa74265b2d67c92 02-May-2016 Wale Ogunwale <ogunwale@google.com> Use existing bounds when pinning an activity if there is already pinned stack

Using null will take the pinned stack to fullscreen. We need to use
the existing bounds when pinning an activity if pinned stack already exist.

Bug: 28517964
Change-Id: I9a15a2e4477a2ee0e2f09cf052627034f9ff6023
9540ca4fc47ac5448826c43912aa573caecc746c 02-May-2016 Jeff Sharkey <jsharkey@android.com> When fork() fails, clean up data structures.

There are a number of different conditions that could cause
ActivityManager to fail to fork() a process. One of the most common
ones is a package being "frozen" during a PackageManager operation.

When this happens, use the common forceStopPackageLocked() method
to cleanup any internal bookkeeping structures. (It's slightly
misnamed, since it doesn't actually "force stop" the app.) It's
also the same method that we called moments earlier when the package
was first frozen through KILL_APPLICATION_MSG.

Bug: 28395549
Change-Id: I7b1623c5f66fc1de24cad5360c977ea764d09244
d3ec507160eec964f687d3b03b0f126b3394e95f 29-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix minimized dock stack for translucent activity over home task

Previously, we only looked at whether home task is going away or
getting visible. This doesn't work anymore, as we also need to
un-minimize docked stack if another task is visible with translucency
over the home task.

Change-Id: I993f58a25d99d2ef9f562f7d1587c2dec0d05142
Fixes: 28434466
Fixes: 27906038
ae30f308eed52305d64658bb54bbcdfef66f7783 02-May-2016 Wale Ogunwale <ogunwale@google.com> Allow pinned activities to finish immediately

Pinned activities are normally in the paused state so when finishing
they can finish immediately as there might not be additional transition
in the system to finish them.

Bug: 28434641
Bug: 28350881
Change-Id: I5f1eaf0969a7eb08292cb9cc123bf8c0fddc9ea8
8347b631883d073a2919517179c1e1378a8671e6 30-Apr-2016 Christopher Tate <ctate@google.com> Preserve shared {system+lock} wallpaper when setting system only

We migrate the existing (shared) system wallpaper to be the lock-only
wallpaper when setting a new system-only wallpaper. The end result
is that if you say "set the system wallpaper only" the lock wallpaper
won't change.

(The migration is via a rename of the underlying imagery files, not
via copying, because copying all that data would be silly.)

Bug 27599080

Change-Id: I03ecf23c943fe88af58d5ac26f05587a15e2d0a9
5b7a097b22cae234a7b0e575bda063525989a985 02-May-2016 Chong Zhang <chz@google.com> Merge "Do not update surface for dummy animation as long as transition is set" into nyc-dev
aabed1c5f8d2bdbcf4c854fadf9c50a8fd1bc0a6 02-May-2016 Pavel Zhamaitsiak <pavelz@google.com> Merge "Connectivity Metrics service: dump throttling states to dumpsys" into nyc-dev
b7d513cb47ba872bc3e3d4689a67bd05720f8569 02-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Launch home activity in home stack if coming from ResolverActivity" into nyc-dev
1affbbc5932231d5a1fa4563ef0623b4eaaa9cdd 01-May-2016 Wale Ogunwale <ogunwale@google.com> Launch home activity in home stack if coming from ResolverActivity

ResolverActivity launches activities it resolves as the initial caller.
In the case of the home intent it can be sys-ui, but only the system
server is currently allow to launch things into the home stack, so the
resolved home activity is placed in non-home stack. This wasn’t a
visible problem in fullscreen mode as the user would notice since
everything is fullscreen, however it is very visible in multi-window mode.
We now allow home activities to be places in the home stack if it is coming
from the ResolverActivity.

Bug: 28487506
Change-Id: I68f81da68a207efab9ce911fa6661bd573f1e949
a092aa436eb1eaa0c9606a0a395f3b52ad9cccef 02-May-2016 Wale Ogunwale <ogunwale@google.com> Merge "Don't move stack to front when creating a task for activity to be started" into nyc-dev
4e4fca43b0fb1320ce0265640d33b700cd886da8 02-May-2016 Todd Kennedy <toddke@google.com> Merge "Restrict updates of system packages" into nyc-dev
4a992cbde834fdf3770e34b21361b47f4786f65f 02-May-2016 Lorenzo Colitti <lorenzo@google.com> Merge changes I86257bc8,I5c2221c5 into nyc-dev

* changes:
Use Netd's binder interface to set resolver configuration.
Add Gservices settings for resolver configuration.
bd8759bdd102c1991f899bff4a4dd093345c6b52 28-Apr-2016 Pierre Imai <imaipi@google.com> Use Netd's binder interface to set resolver configuration.

BUG: 25731675
Change-Id: I86257bc84371832466161e5357ae173c305a7d18
8e48e67827dd2da40e0b28977a9afca0f43de73d 21-Apr-2016 Pierre Imai <imaipi@google.com> Add Gservices settings for resolver configuration.

BUG: 25731675

Change-Id: I5c2221c5a2478fe2fa0fdf9ceeb13a932d758d33
a4d92a01521e560d00616b483143f2d07ebd755b 02-May-2016 Wale Ogunwale <ogunwale@google.com> Don’t relaunch activity in fullscreen stack when entering split screen mode

When entering split-screen mode by long pressing the recents button, the
top task in the fullscreen stack is moved to the docked stack and the new
top task is the fullscreen stack is considered visible for a short amount
of time until sys-ui launches the recents activity. This causes the new
top activity in the fullscreen stack to be relaunched due to configuration
To fix this sys-ui now sends an hint to activity manager to move the home
stack forward so that it can be on-top of the fullscreen stack and makes
it invisible before recent is launched and animated in.

Bug: 28470261
Change-Id: Icfd85e932fe913dfb498752b5878cc7c690fd559
efef374ccf917d079907dd734aee5590809254f9 01-May-2016 Wale Ogunwale <ogunwale@google.com> Don't move stack to front when creating a task for activity to be started

This causes foucs to move to the current activity in the stack which isn't
needed. Focus will be moved when the new activity is started in the stack.

Bug: 26381750
Change-Id: Ia76962dc5ba3ce336d2a4e074d14db06eebbe78c
6d1a776c26206ea44339f19e13b413aa7d25bd6d 30-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Address review comments on ag/962875." into nyc-dev
3cb7f6bdcda2697eff10853360396d8635d66120 30-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "BatteryStats: Keep track of coulomb counter" into nyc-dev
926969b411ca52eeefd6b01c0c7970d8a65ee526 29-Apr-2016 Adam Lesinski <adamlesinski@google.com> BatteryStats: Keep track of coulomb counter

Change-Id: Ica66817faa20b9788536f28f0e593483f033904b
93873e4985c2e36772a5ffcdaed6351249e7a6eb 30-Apr-2016 Chong Zhang <chz@google.com> Do not update surface for dummy animation as long as transition is set

Transition is not set to ready until it's executed, which could happen
a bit later after the setAppVisibility where we set up the dummy.
It is rare, but an animation pass could still slip in between, and
since the transition is not ready, it modifies the scale and show a
bad wrong frame.

bug: 27742244
Change-Id: I97fb1955e810c7c4f01dc55a28d2e4ce4f47d5eb
0d3c578a80a72d902963408908eda6fdeb7d6c8c 30-Apr-2016 Dianne Hackborn <hackbod@google.com> Work on issue #28200735: AcitvityManagerService lock held for...

...300mS in bindService

Make the "slow proc start" debugging more aggressive, so it will
catch cases where it is taking more than 50ms to start.

Change-Id: I6f6eb749cf205f9890946b3ec562b7653674c3d9
4ba55dc462b4e43086bef24b064d069df27e7670 30-Apr-2016 Carlos Valdivia <carlosvaldivia@google.com> Merge "Insulate the account.db from updates." into nyc-dev
9a977b7d45df0d3d59c5eec7f9534c3bd5fcd91d 30-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev
4b4c31de80aa3c518669db4b2cad43b5677a9bdb 29-Apr-2016 Pavel Zhamaitsiak <pavelz@google.com> Connectivity Metrics service: dump throttling states to dumpsys

Print throttling counters per each component and time remaining before
counters will be reset.

Also adjust estimate of space needed for events serialization.

Bug: 28204408
Change-Id: Ib57a24db554645e9f933126da00ef74c23097d1c
0e9e5ea58600a7b6aed1b307affdc400bfa9b33b 29-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Only platform defined permissions need a review." into nyc-dev
fdd241a1e026afeeb68d30cb3d999ee9506769ce 28-Apr-2016 Todd Kennedy <toddke@google.com> Restrict updates of system packages

By declaring a <restrict-update> tag in its manifest, a system package
can restrict its update to be the singular package that has the same
given hash. An update's hash is the SHA-512 across all its APKs [i.e.
for splits, the SHA-512 is calculated over the concatenation of the
base plus all splits].

The restriction only applies to system packages.

Bug: 28398205
Change-Id: Iec493fc8ef27edee53f1d437cb0caaa78782f329
cd2b4303ceedfc4afa7c0d5d1349b22fc9927173 29-Apr-2016 Chong Zhang <chz@google.com> Merge "Do not change surface properties when waiting for transition to ready" into nyc-dev
3d92f4ea37e6785605a8d62f1971f2dfe4569638 29-Apr-2016 Svet Ganov <svetoslavganov@google.com> Only platform defined permissions need a review.

The only permissions a user can control for a legacy app in
runtime style without crashing the app are the ones defined
by the platform because we have app ops only for these and
also we contorl the access to data guarded by them.


Change-Id: Ifd1350d056b4fe29739ab8fdc5cbea89fa2e4037
1b6519bd87a59a10e9928e5772a17976692611da 28-Apr-2016 Jeff Sharkey <jsharkey@android.com> Flag to mark foreground jobs, fix data saver.

When a job will eventually run in the foreground, the internal
scheduling needs to ignore any background network restrictions when
satisfying constraints. This also means the job should ignore the
current device doze state, since the requesting app could get the
same behavior by starting their own foreground service.

Always dispatch network policy changes to ConnectivityService first
to ensure that it has up-to-date information. Fix bugs around data
saver that were causing networks to not be marked as BLOCKED for
background apps; before this fix apps would have been spinning in
internal connectivity loops, thinking that the network was actually
connected when the kernel was actually blocking their traffic.

Offer new ConnectivityService method overloads to ignore the blocked
state for a specific UID.

Print unsatisfied job constraints to aid debugging.

Bug: 26571724
Change-Id: Iaaa17933e6dc1bf6d3dff26d0bfc12222e51e241
099347936b81ac553691a6e29e3a1d1dab903297 29-Apr-2016 Andrii Kulian <akulian@google.com> Merge "Fix crash loop when activity controller was set" into nyc-dev
a46b112d04fdb0c73a529591b9e1a3a12244e7d9 27-Apr-2016 Carlos Valdivia <carlosvaldivia@google.com> Insulate the account.db from updates.

I think we were getting accounts uninstalled on android devices when
SyncManagers called validateAccounts() while GmsCore was updating.

I try to prevent this by not removing accounts unless the data directory
has actually been removed (which shouldn't happen during updates).

Bug: 25611016
Change-Id: Ib526b3000ad741815d48fd020af2cc19d6205166
0bbd108aa1fee8c69bbaf41990d3f3d8a99d54cb 27-Apr-2016 Paul Lawrence <paullawrence@google.com> Check permission on clearPassword and other CryptKeeper APIs

Note - this should only ever be called from LockScreen after getting
the password to avoid the double prompt

Bug: 28376346
Change-Id: Ic44df4fdcc23408c56b1b9375deed1c6ad2af544
3fef7230d2d4c9e8bd49e52e7f319303f2867177 29-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Address review comments on ag/962875.

Bug: 27824851
Change-Id: I7dd553a926b10faf6e0c2b0e3ed9d8e91b3cccf0
7021174287eeb9447cb5a2bf7b17c5588db76133 29-Apr-2016 Chong Zhang <chz@google.com> Do not change surface properties when waiting for transition to ready

Window could become drawn before transition is ready, when transition
is waiting for the animation spec. If we show the surface too early,
one or more frame will be shown with wrong scale.

bug: 28296945
bug: 27742244
Change-Id: I34e84ed8a37ecdb71eb975351f1ee39d14dfba25
71619aa437f40e5b4e760111852883cdca055d0b 29-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Another intent sent by both system and apps." into nyc-dev
ec6faca0078263dfbf2b41d11cdb14586e40fd75 29-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Stop user faster and clear stale broadcasts" into nyc-dev
4d33455c4f8a411472a92f18664917f2e4da0e06 29-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed wrong loop variable (AKA: I, Y U NO J?)" into nyc-dev
8d38894d1f6cb7a3f57aeff9fa396b20340f9079 29-Apr-2016 Jim Miller <jaggies@google.com> Merge "Clean up fingerprint enrollment API" into nyc-dev
c56ca11611376a86e0d5791523e7e0ed04f990b6 29-Apr-2016 Chong Zhang <chz@google.com> Merge "Fix restoring surface for child windows" into nyc-dev
b7b4a56a6e49e1bb9bac4294d10b4e3d341cfb2b 29-Apr-2016 Chong Zhang <chz@google.com> Fix restoring surface for child windows

Use allAppWindows instead of windows, as windows doesn't contain
any child windows, it causes the child windows to be not restored
until the child window does relayout.

bug: 28296945

Change-Id: I7d272e660752002c08349128c3958aa041979c34
61731854329a6331ae055bb20d98caf6a71ea5b6 29-Apr-2016 Felipe Leme <felipeal@google.com> Fixed wrong loop variable (AKA: I, Y U NO J?)

BUG: 27366993
BUG: 28451218
Change-Id: I8455ada4194e7fc44ae7448e5cd763d22065fd2e
c12eca8b5964dfc37836e1c0f2dad8c88c76d90f 29-Apr-2016 Jim Miller <jaggies@google.com> Clean up fingerprint enrollment API

The enrollment API was using userId and groupId interchangeably.
This cleanes up the interface to consistently use userId.

Partial fix for bug 28268635

Change-Id: I678e4b17a25f82c5cf17db49cd23f862be11667b
fa3991aae02676d5c619c86adf514def09802d78 28-Apr-2016 Andrii Kulian <akulian@google.com> Fix crash loop when activity controller was set

If activity controller was set and application crashed - process was killed,
but records in task history were not erased and AM restarted crashed activity.
This caused crash loop if activity was crashing on every launch.

This CL handles app crash correctly in this case + lets AM handle
instrumentation test crash in ActivityManagerService#handleAppDiedLocked to
remove code duplication.

Bug: 28374171
Change-Id: Idf50d1e2cc784c0ae970aa290b82fe1eedd6d1fd
f76b15057eb5b96f74fe90fed58525b4b5a0ec20 28-Apr-2016 Adrian Roos <roosa@google.com> Merge "Show lockscreen wallpaper on SIM screens" into nyc-dev
b72b265c85b2315c306de78d00365087c24375ce 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix issues with docked stack not un-minimizing" into nyc-dev
d1c30db548da90d5bc092821c6fee4b4ef060bbb 28-Apr-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManager: When app's data is cleared, remove all shortcuts," into nyc-dev
2ff9c01975622ce7b0e1f7679f1337004dca7be9 28-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Update dumpsys logging for VrManagerService.

Bug: 27720082

Change-Id: I347e585fe09f082c0a7bd12fbf68000e48461846
8c2fb9edae4413074186e3d84ccff0eba41b2cae 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Introduce "unlocking" vs "unlocked" nuance." into nyc-dev
08c4dfba82fff75a2530bf8c694a40b306f8396e 28-Apr-2016 Rob Carr <racarr@google.com> Merge "Delay pinned animation finish during app transition." into nyc-dev
9ac59d0438833eee817e4b4e5c03ce5ec8fcf4dc 26-Apr-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: When app's data is cleared, remove all shortcuts,

as if it's uninstalled.

Fixes 28196831

Change-Id: I1a410372f9e344a10567b00057fa0770eac9fd76
ad2e4bf9f36cf612db6c397feca8effb125ee541 26-Apr-2016 Amith Yamasani <yamasani@google.com> Stop user faster and clear stale broadcasts

Moved several USER_STOPPING registered receivers to listen
to USER_STOPPED, since they don't need to be blocking the
shutdown of the user.

Clear all stale broadcasts when stopping a user, so that we
don't unnecessarily start up processes and deliver stale
broadcasts. This was causing code to run when the user was
already stopped and resulted in crashes when other providers
and services couldn't be started anymore. Hopefully this fixes
many of those races.

Bug: 28371487
Change-Id: Ic35a7a23fa8fe009a53f8bf7545d4dad5fa34134
ce18c8167766f92856f94a8e88e19de4698960e6 28-Apr-2016 Jeff Sharkey <jsharkey@android.com> Introduce "unlocking" vs "unlocked" nuance.

There is a narrow window of time during user unlock where we're
reconciling user storage and dispatching the "unlock" status to
various internal system services. While in this "unlocking" state,
apps need to be told that the user still isn't actually "unlocked"
so they don't try making calls to AccountManager, etc.

The majority of internal services are interested in merging together
both the "unlocking" and "unlocked" state, so update them.

Clarify naming in AccountManagerService to make it clear that a local
list is being used, which mirrors the naming in MountService.

To match UX/PM requested behavior, move PRE_BOOT_COMPLETED dispatch
after the user is unlocked, but block BOOT_COMPLETED dispatch until
after all PRE_BOOT receivers are finished to avoid ANRs.

Bug: 28040947, 28164677
Change-Id: I57af2351633d9159f4483f19657ce0b62118d1ce
4b74f4de64806f1d98d9fca172b63fb1daab3b14 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix IME adjustment for voice interaction windows

Bug: 28344950
Change-Id: I42fa7abe28a693bc22c878c75839af4ef03e5e8a
363ab98fced07bf7647355367be9e6ef76751450 27-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix regression with docking from recents transition

Because we move the task to the front in startRecentsActivity, we
always overrode the app transition type. Instead, we should remove
this logic and keep a flag whether the animation was prolonging was
finished already. If it was finished already, don't start the
prolonging when starting the transition.

Bug: 27154882
Change-Id: I1cd9e323867726ebd4b131ed5c13c3834d0f1107
a57286307b3a5a81f78b47d2a0ac6ae2458f66f9 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Clean up updating bounds after config/display info change" into nyc-dev
af558e1419aba5b89b9ee8c2fdafa508e6de8d84 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix issues with docked stack not un-minimizing

- Add minimize state to dump
- If the docked app goes through a configuration change while the
docked stack is minimizing, the window list becomes temporarily empty,
and thus Task.isVisibleForCurrentUserLocked == false. Since we already
check at the beginning of the animation, we need to finish the minimize
animation on the docked stack no matter what happens.
- Adjust the condition when to notify divider controller about app
visibility. It turns out that under some conditions an animation is set,
but the app is not an element of mClosingApps nor mOpeningApps, so we
missed the visibility change of the home task
- Use getTopAppToken instead of getTopVisibleAppToken. When the token is
about to hide, it's already hiddenRequested, so we skipped changing the
minimize adjustment.

Change-Id: Ib9e2e3f6a5da7b7854b49857299a236e47baa6fc
Fixes: 28184044
1d3c59457c9bcf30e6ecb898e64d9d9725e7803e 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make isCaptivePortal perform both HTTP and HTTPS probes." into nyc-dev
831ecc81f982282bdcc2121c2fa3ece22ac997e0 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Idb555b01,If8acf31b into nyc-dev

* changes:
Show forced resizable based on top activity
Don't move forced resizable info activity to the front
eb1cb927adf4b10296dfd9cdb975514d85a1116a 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Clean up updating bounds after config/display info change

We always update the display info before handling the configuration
change. Thus, we remove this weird interleaving asynchronous beast
of code and handle rotation and density in updateBoundsAfterConfigChange
and everything else in updateDisplayInfo.

Sending an asynchronous message to resize the stack only causes race
condition and issues.

Change-Id: Ifa86f62e816917822a8c1d42d13d4bf1ad9bc5bf
Fixes: 28316517
Bug: 28184044
103fdec4151684686f900bd0a3af0a7fa82bf159 28-Apr-2016 Chong Zhang <chz@google.com> Merge "Don't wait for visible if there is no running activity left." into nyc-dev
697a3334854da5c2c3830f0489a0e7e4c646a7fb 28-Apr-2016 Chong Zhang <chz@google.com> Merge "Do not add duplicates to mWaitingVisibleActivities" into nyc-dev
cd13d33ee53371f306a1e5c0caa2b292906e4e17 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Show forced resizable based on top activity

Also don't show it for noDisplay activities.

Bug: 28223489
Change-Id: Idb555b019b5cebdcf16a0cfaa19d64263874735f
c5be12e7ac43cbe8c68219fa702c6fb7f06183c3 19-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Make isCaptivePortal perform both HTTP and HTTPS probes.

Also a couple of minor cleanups and logging tweaks.

Bug: 26075613
Change-Id: I67b09e96d72764179339b616072bb2ce06aabf33
c875ae74ba4cfe255551d1b011866fcca3bbec88 27-Apr-2016 Jorim Jaggi <jjaggi@google.com> Don't move forced resizable info activity to the front

If we start the forced resizable activity with an existing task,
avoid moving that task to the front. This can cause that a previous
task that was moved to the back gets moved to the front again just
because we started that activity. That's not good.

Bug: 28223489
Change-Id: If8acf31b8be98b82665de1015d5621331c37fb64
9f013fe71ecf03c9c9696599ba82715d84e45365 28-Apr-2016 Jeff Hao <jeffhao@google.com> Merge "Some cleanup for <uses-library> change." into nyc-dev
824b6dcb55f6bc436d5aa8f461d5b269a4f5180b 27-Apr-2016 Chong Zhang <chz@google.com> Don't wait for visible if there is no running activity left.

We could run into this situation on some devices (eg. clockworks),
the next activity doesn't get launched until we destroy this one.

allResumedActivitiesVisible() will return false if there is no other
activity running at all. Check top running activity and it's visibility

bug: 28400334
Change-Id: Ib8957e499580a10206fdd4e27da19fbc2bdb5843
1a2f993ba5a81899500b989683364708025e13a5 28-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28431297: Crash in system process" into nyc-dev
07318065b22ba13ae003d7803a3e48e441f9f6e5 28-Apr-2016 Chris Tate <ctate@android.com> Merge "Make sure FIRST_LAUNCH is after PACKAGE_ADDED" into nyc-dev
b8bd069eacc2a888a1ff6e923094e4178ad531a3 28-Apr-2016 Chong Zhang <chz@google.com> Do not add duplicates to mWaitingVisibleActivities

processStoppingActivitiesLocked() only removes one record each time, so
instead of stopping on the next window visible (or next idle), it now
requires two such calls to move the app to destroyed, if there's only
one report, the app never gets removed.

bug: 28417200

Change-Id: I7c5eac240074ed0434a72643a8d52f1726ab906c
cc3cb5a009bd0fb7c56ce3731a5ba8b3c95db772 28-Apr-2016 Jaewan Kim <jaewan@google.com> Merge "Fix NPE when WindowManagerDebugConfig.DEBUG_SCREENSHOT is true" into nyc-dev
e761777323444e900ab683137a1e4d6abecdc728 28-Apr-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28431297: Crash in system process

Don't allow null URIs to get put into the notification path.

Change-Id: I4f68f438960c8a90c7b417feaa2e19968a3a200a
9710859b5102f36499a628f2931bafd0a6803437 28-Apr-2016 Hugo Benichi <hugobenichi@google.com> Merge "Fixes 2 race conditions in MetricsLoggerService" into nyc-dev
5149abe73eb52e5b0df16572397a58c295e23da3 28-Apr-2016 Badhri Jagan Sridharan <badhri@google.com> Merge "Add low power stats to batteryhistory" into nyc-dev
3279050c259279954ca61462689020b0b75feb3b 28-Apr-2016 Keun-young Park <keunyoung@google.com> Merge "fix recursion for config change" into nyc-dev
a3760a4713de573c88fc9f14e9a25b358ef4eea2 26-Apr-2016 Adrian Roos <roosa@google.com> Show lockscreen wallpaper on SIM screens

Also fixes a bug where the lockscreen wallpaper was
showing in occluded mode and where the regular wallpaper
was flashing when going back from occluded mode.

Change-Id: Ibe6404acc4ed5db8807b3ef223b149e841730c8f
Fixes: 28271756
ccb83c0aa5f41be1bd3d15174488a4fdc2d1cfbe 28-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Broadcast USER_INITIALIZE after user is unlocked" into nyc-dev
1f70f0b7d60ad0b98fe6597162769bce8b85e3ed 28-Apr-2016 Phil Weaver <pweaver@google.com> Merge "Fix several accessibility magnification issues." into nyc-dev
bd784e961c560a2069e2df75fb17282013c198d2 28-Apr-2016 Jeff Hao <jeffhao@google.com> Some cleanup for <uses-library> change.

Addresses comments made in:

Bug: 26880306
Change-Id: I382fb39f3bb5de5a03506f5526d909cf55530542
e3dd9f8c71b8420d449bf45a93be140be9ecd471 28-Apr-2016 Keun-young Park <keunyoung@google.com> fix recursion for config change

- update mTempConfig from mCurConfig first to decide if
config is changed or not. This fixes recursion of putting
new config again from reconfigureDisplay
- ignore setNewConfiguration if there is no change in configuration
This fixes another recursion due to config change -> app restart

bug: 28381048

Change-Id: I4c2e6072b269baf9fa11d4b8073f0800c0e0d28d
0db93cea0fef6aa73caa0ef422b8e0a4e45a24e5 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Tethering and Data Saver: There Can Be Only One!" into nyc-dev
5cf5578a457e448dda9fd47943e91f0f3b67690f 26-Apr-2016 Christopher Tate <ctate@google.com> Make sure FIRST_LAUNCH is after PACKAGE_ADDED

If an app undergoes restore during install, it is considered 'started'
and the FIRST_LAUNCH broadcast needs to go out. However, this must not
take place until after the restore operation has fully completed, in
order to avoid publishing the app's existence while it may still be in
an incoherent state. We now make this broadcast part of POST_INSTALL
in the restore case.

Bundled apps are in the 'started' state regardless, so no FIRST_LAUNCH
broadcast is ever sent for them -- this CL does not change that
existing behavior even in the case of setup-time data restore of
factory-installed packages.

Bug 28173625

Change-Id: Ibcc3758576662dc447b75476173a0d008a9fe4da
8c57aeaa8f27423b843fa043fb86b0b57c906ead 21-Apr-2016 Sudheer Shanka <sudheersai@google.com> Allow any app to silently uninstall the orphan packages.

Bug: 28302564
Change-Id: If6f2111e35ec94c7eb5b80a08bbf63fd58698c27
70439244ba1abc4f32357d2ee8ff38f73158fe37 11-Mar-2016 Phil Weaver <pweaver@google.com> Fix several accessibility magnification issues.

Clarifying region used for magnification as "magnificationRegion",
both in the public API and in the code. There's been significant
confusion about what "magnfifiedRegion" means. Removing
"availableRegion" from everywhere except where it's required, as
that region was identical to magnified/magnification region.

Trying to shut down magnification was a complex situation where
animations in progress and new magnification requests were tricky to
handle correctly. It was not possible to guarantee that the
magnification callbacks were unregistered consistently. There were
at least two situations that led to phone restarts:
1. If a triple tap was detected between unregistering the callbacks
and shutting down the input filter. In this case the magnification
request would go through.
2. If an animation had just started when magnification was turned
off, so the current magnification was 1.0 but the animator was
about to change it. In this case the callbacks would be unregistered,
and then the animator would start changing the magnification.

This change makes registering and unregistering magnification atomic.
It also makes MagnificationController stick around indefinitely once it
is created, registering and unregistering as needed to support
magnification gestures and services that control magnification. Services
that merely query the status of magnification no longer register for

One part of shutting down is turning off the animation and guaranteeing
that it won't try to make further changes. Adding a flag to
SpecAnimationBridge and a lock in that class so we can guarantee that
nothing happens when we aren't registered for magnification callbacks.

Also reconfiguring all accessibility options when a service stops to
make sure that only the features required by the current configuration
are enabled.

Bug: 27497138
Bug: 27821103
Change-Id: If697cbd34b117d82c8eee1ba7d0254089ee4241d
62e7d26a0c267ac76f641a17e66e4f9c11b887c9 27-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28403313: Improve package manager query commands" into nyc-dev
68cdf1997f7b007e4c81089bc402a0356292f4c2 04-Apr-2016 Badhri Jagan Sridharan <Badhri@google.com> Add low power stats to batteryhistory

Exports SOC specific low power state info to batterystats service.
BatteryStats service queries the powerHAL module whenever and
updates the HistoryStepDetails whenever setBatteryState is called by the
BatteryService. The stats get appended to the battery history whenever
there is a change in the battery level.

Bug: 26564574
Change-Id: I02b4db00aec0c69d1558492224f3a4dc1c386fa6
864bc48e0104451e20281258429677a9ebbab9ac 27-Apr-2016 Jeff Hao <jeffhao@google.com> Merge "Support to pass <uses-library> option through to dex2oat." into nyc-dev
25459e135d17a15e295ae0a827a0b4d4a88ebd67 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dismiss docked stack on user switch" into nyc-dev
f9aa2a966eefb464775287aa4966c82641fac5f1 26-Apr-2016 Robert Carr <racarr@google.com> Delay pinned animation finish during app transition.

Sometimes in the case of pinned animation, we end
up with multiple animations on screen. For example when
transitioning pip->fullscreen, we are typically closing recents,
and replacing it with a task behind. We need to delay swapping ourselves
to the fullscreen stack until this app transition has finished,
otherwise we will be in the fullscreen stack with the transitioning app,
but not transitioning ourselves and thus assigned a lower Z-order.

Bug: 28333917
Bug: 27793381
Bug: 28332969
Change-Id: Ie18cc04ceeabd94093017f79676253e1189f5249
fa255f6ead7097acba8400998c47685cc3defc67 27-Apr-2016 Rob Carr <racarr@google.com> Merge "Revert "Prevent recents from closing while moving PiP to fullscreen."" into nyc-dev
c7b9482b0c4bb2d378e63541b96be45c50094e05 16-Mar-2016 Jeff Hao <jeffhao@google.com> Support to pass <uses-library> option through to dex2oat.

This change takes an app's shared libraries specified by <uses-library>
and passes it through to dex2oat to be used during compilation.

Part of a multi-project change.

Bug: 26880306

(cherry-picked from 7b331b6a8ae8d9f10482b292439457de98abd32a)

Change-Id: I523b1b74775e7ed27072498509e743f1f10b1164
9a98c526dd532ee3be29f6ba6640829c75f9cf1e 27-Apr-2016 Wale Ogunwale <ogunwale@google.com> Dismiss docked stack on user switch

Having the docked stack across user switches currently leads
to issues like wrong configuration state for apps. Dismissing
docked stack for now until we find a better way to handle this.

Bug: 28195260
bug: 28221061
Change-Id: I568a2c69783b1f0d7016fe1a21df959f7c2c9145
39bb2c29b427b0cf2396a8691176584094ae805c 27-Apr-2016 Hangyu Kuang <hkuang@google.com> Merge changes from topic 'atv-hdr' into nyc-dev

* changes:
Unhide getHdrCapabilities and HdrCapabilities.
Plumb HDR capabilities to Display
Revert "Revert "Hook up HDR capabilities from native SurfaceControl""
c94c2493717264641bdfd205fd1f023193caa535 21-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Broadcast USER_INITIALIZE after user is unlocked

Previously USER_INITIALIZE was sent before USER_UNLOCKED. This was leaving
BOOT_COMPLETED as the only option for non-directBootAware apps to do one time

Now USER_INITIALIZE is sent immediately after the user is unlocked.

Bug: 28278011
Change-Id: Id82eae91af80a66454d4027050120ae841decfeb
9fa8b54589b68dc6da3a7201cad1fc43e01e59e3 27-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "More bugreport logging for scheduleconditionprovider." into nyc-dev
14e7acd58c8b4f9f2fd517cded5c4e3099fd5989 27-Apr-2016 David Brazdil <dbrazdil@google.com> Fix infinite loop during package-usage.list file upgrade

When upgrading from version 0 to version 1 of the file
'/data/system/package-usage.list', the PackageManagerService can get
stuck in an infinite loop if one of the listed packages does not
exist, e.g. because it had been uninstalled. Fix the issue by
refactoring the loop.

Bug: 28409278
Change-Id: Ia312bd0d04f696240445b710dd6a68b93c5d5946
9b907e440cdff222481abf16def6e03870678c20 27-Apr-2016 Hugo Benichi <hugobenichi@google.com> Fixes 2 race conditions in MetricsLoggerService

- in dump, the array of pending intent was iterated without locking
against logEvent. This can throw a ConcurrentModificationException
if at the same time logEvent sends intents and remove them from the
- in getEvents, the returned reference was reading the reference of the
last event after releasing the lock on mEvents, which can cause
callers to miss events if at the same time logEvent is called and
mLastEventReference is incremented.

Bug: 28204408
Change-Id: I7ff21d4d2c0b02d8e0b47310430dff7d8a87f0bf
c6c5d8dc5bb3802591670d000432531cbd60018e 21-Apr-2016 Jaewan Kim <jaewan@google.com> Fix NPE when WindowManagerDebugConfig.DEBUG_SCREENSHOT is true

Bug: 28410270
Change-Id: I547556bec20a756735edad1692c64d6bd5a13773
ed69570795b25835687986cd5c48df4baedd8723 27-Apr-2016 Sungsoo Lim <sungsoo@google.com> Another intent sent by both system and apps.

Bug: 28375541
Change-Id: Ia0302af28647c3d76020a22c8218963c0beb1600
9848c84d026186aa9a186d4587b615aae06a2ef6 27-Apr-2016 Robert Carr <racarr@google.com> Fix surfaceInset adjustment.

surfaceInsets are relative and have the same
sign direction for left/top/right/bottom. This means
we want to subtract the left/top insets and add the
right/bottom in order to expand the surface. The current code
is adding the left/right insets before adding them to the right,
while still subtracting from the left. This ends up expanding the
surface by 3*inset pixels instead of 2*inset pixels.

Bug: 28368990
Change-Id: I6495e39283c7d2494c962f89e95672c5f1f6e1cd
a249166839dca19f8f01154d3a4f58c54413a441 27-Apr-2016 Rob Carr <racarr@google.com> Merge "Clear opaque flag when surface insets change." into nyc-dev
1415d267864cb7f6017abfb9359d8ea9302bcb64 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't hold lock when calling externally" into nyc-dev
08eb8a1aa2384883fd1bb0b60d3b49c4c72c3143 27-Apr-2016 Chong Zhang <chz@google.com> Merge "Finish immediately if the resumed activity is already visible" into nyc-dev
97ef0e77afa3be6255b70c8567843ac298386251 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't override pre-release target sdk" into nyc-dev
b80d781f1dbe7b47af3be9d269542241d52e8a53 27-Apr-2016 Robert Carr <racarr@google.com> Clear opaque flag when surface insets change.

In addition to the pixel format there is an extra
force opaque flag. We only update this on creation,
but we need to respond to changing SurfaceInsets forcing
an otherwise opaque surface to become translucent.

Bug: 27364161
Change-Id: I13c69d1271412a0bc71e936867c58d5c413ab56b
fc5f6e6c80954c837a98d963789f6a30f3b87ad1 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix two multi-user bugs in package upgrade." into nyc-dev
e542e0cb9b2fbde1cfa7ff36af9cd370af459a49 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Set installed flag of all users if system app is installed later" into nyc-dev
4f40766360fd9f2459e9fc4d30119bec95c2cf48 27-Apr-2016 Rob Carr <racarr@google.com> Merge "Touch region fixes for dialogs and overlapping tasks." into nyc-dev
d5e295f9192522176796271cb29558a53d37c875 27-Apr-2016 Todd Kennedy <toddke@google.com> Don't hold lock when calling externally

Wound up in a deadlock. We held mPackages lock and called the mount
service. This called into the AppOps service which tried to obtain
its lock. On another thread, we held the AppOps service lock which
called into PackageManager service and tried to take mPackages.

Ideally, we'd never hold an internal lock when calling externally.
In practice, that's not always fixable [for example, code change
would be too great to not hold the AppOps lock when calling into
the PackageManager service].

Bug: 28169075
Change-Id: If0a7f1361c7be9385b1f629f68ebc0556b08ab06
b60a830f8b192eadb6c94bdef99967cc2cddafff 27-Apr-2016 Chong Zhang <chz@google.com> Merge "Request a wallpaper update pass when wallpaper target is set to visible" into nyc-dev
83c4135a3a50c50890c52d9f2d98c7d2c8661fef 27-Apr-2016 Chong Zhang <chz@google.com> Merge "Do not set waitForDebugger if the process to be debugged already started" into nyc-dev
b1072718130b998e6d25bc3358eefa62b4fa5a2d 27-Apr-2016 Todd Kennedy <toddke@google.com> Don't override pre-release target sdk

If a package targets a pre-release SDK [eg a letter version] it should not
be allowed to be upgraded by a release SDK [eg a number version]. If one
absolutely must upgrade to a release SDK, use the "--force-sdk" option
during install.

Bug: 28345311
Change-Id: Ic9fb209968e7c5da2c80c5ca4c0f44f5125f610a
efd9a5ba01be857e837e01fc9a5df24ada19a17b 27-Apr-2016 Chong Zhang <chz@google.com> Finish immediately if the resumed activity is already visible

When in FINISH_AFTER_VISIBLE mode, we need to check visibility of
both the current activity, and the activity to be resumed. If the
resumed activity is already visible, we should finish immediately.
We can't put it into stopping state and wait because there won't be
a window visible callback from the next activity.

bug: 28378359

Change-Id: Ib1fb44acfec33616da76f48102cc00b453e41914
9ff94c0251722c44eece7c3561b4ed36b286d4a8 31-Mar-2016 Michael Wright <michaelwr@google.com> Plumb HDR capabilities to Display

Bug: 25684127
Change-Id: I0a4fcdc59aa1a7b295c8df03699466685300e735
e75c0b9873d56e2569d0c5dff78f8872b8c8e97f 27-Apr-2016 Jeff Sharkey <jsharkey@android.com> Fix two multi-user bugs in package upgrade.

When upgrading a package, we need to fill in the "origUsers" field
so that we can clone the installed state correctly. This was done
for child package, but never set for the parent package.

Also fix a bug where a secondary user requested a package to be
moved. Because that move was pushed onto a Handler, the calling
userId appeared to be the device owner instead of the user that
actually requested the move. (Later in the upgrade flow there is
code that force-installs the package for the requesting user.)

Bug: 26729822
Change-Id: I2d2a007c73558f29a3f8c1408ec373fce6e87761
8fcf6a692262dc182c844b35337b67aeb320021d 27-Apr-2016 Shreyas Basarge <snb@google.com> Merge "Account info on job wakelocks" into nyc-dev
f84b3e0e2fe11c8ee1d86ad44236ba4129fc3ae1 27-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Add manifest attribute for VR activities." into nyc-dev
d6e4aa499a6cda1538afcdde780c7ecb47bd12ae 26-Apr-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28403313: Improve package manager query commands

Change-Id: I69122cb2ba04e7d8e5e2ff1aaeb840a28dfc3e14
55c9d73918240c9a56b1a5a0bfccea6b184abbd2 26-Apr-2016 Chong Zhang <chz@google.com> Do not set waitForDebugger if the process to be debugged already started

For non-persistent debug settings, mDebugApp and mWaitForDebugger flags
will only be restored when we get attachApplication. If the process is
already running, we can't wait for debugger and there will be no
attachApplication calls coming.

We should leave the settings unmodified, otherwise after two such calls,
both mDebugApp and mOrigDebugApp will point to the same app, and the
debug settings can never be restored.

bug: 27931552
Change-Id: Id53e21bbe154f45bf2ca12bb5d7fd56279bae653
f71d7feef22db9e0cab2f32edc7440aedb86fdfe 26-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Ensure local settings caches are not stale" into nyc-dev
53a441ca8eda5a3e6209a952b1bbd32a39e19a1c 20-Apr-2016 Svet Ganov <svetoslavganov@google.com> Ensure local settings caches are not stale

We used the system proterties as a shared memory mechanism
to propagate information to local settings caches when the
content has changed and the cache should be cleared. The
system properties are unfortunately updated asynchronously
leading to cases where clients may read stale data.

This change adds a simple int array data structure backed
by shared memory which guarantees individual values are
atomically read and updated without memory tear. Multi-
index opearations are not synchronized between each other.

The settings provider is using the new data structure to
propagate the settings generation which drives when caches
are purged.

We have a single memory array keeping the generation for
different settings tables per user. Since memory array is
not a compact data structure and the user space exceeds
the memory array size we use an in-memory map from keys
to indices in the memory array where the generation id of
a key is stored. A key is derived by the setting type in
the 4 most significant bits and the user id in the 28 least
significant bits.

The mapping from a key to an index is cleared if the user is
removed and the corresponding index in the memory arry is
reset to make it available for other users. The size of the
memory array is derived from the max user count that can be
created at the same time.


Change-Id: I64009cc5105309ef9aa83aba90b82afc8ad8c659
e9bfc4e20b1a0269c8b7fc7f52eb15ebaacdefec 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "SchedulingPolicyService: Fix UID for cameraserver" into nyc-dev
7f73308f50791740beb380fecc17903301054ad3 26-Apr-2016 Julia Reynolds <juliacr@google.com> More bugreport logging for scheduleconditionprovider.

Bug: 28261291
Change-Id: I70d1b466a9d4e18e5f4d9b1209711c442434ecab
ea3064a586decfe308d8252f1c2f3545c0fa9829 19-Feb-2015 Kenji Sugimoto <kenji.xb.sugimoto@sonymobile.com> Set installed flag of all users if system app is installed later

If an application(in /data) that other user installed it initially
is appended as system app later, owner user can not use the system app.

The reason this issue occurs is that the owner user's installed flag
is set false when the application was installed by other user
and the installed flag is not updated when the application is appended
as system app later.

So, we fix like as setting the installed flag to true
when the application is appended as system app.

Bug: 28183865
Change-Id: I0b4da5e0bb77fb3baf86d0453e6637a230b104ba
4d7369adb3cf0e713d25abaefa74d6627ecb086e 26-Apr-2016 Chong Zhang <chz@google.com> Request a wallpaper update pass when wallpaper target is set to visible

Usually wallpaper target gets updated when some wallpaper target window
finishes drawing. However in some cases, Recents app could be set to
visible again before its stopped. (Which could happen when we started
opening transition into some app with a saved surface, but the app draws
so slow so that when user pressed Recents button again, the app still
hasn't delivered first frame.) In this case, the surface is already
drawn and we won't get a finish drawing again. We need to make sure the
wallpaper target is updated.

bug: 27742244
Change-Id: I8ff53f15f95bae8a99a5a0fd11e24e0186dc3345
39fb5670a8d863ec1ee9b3ece0d477a8b9dd44c2 09-Mar-2016 Liejun Tao <baibai@motorola.com> Bluetooth: Fine tune audio gain for Absolute Volume case

Fine tune the audio gain for Bluetooth Absolute Volume.
Use 50%, 70% and 85% for lowest volume steps 1, 2 and 3.
Thus the volume change sounds smoother, more linear.
When remote end tune volume out of mute, we should also
tune the audio gain for the lowest volume steps.

Bug: 26694114
Change-Id: I298a334a4b40ddb87495fda1935349bfce8b0537
6392db9df7ca1a809ff882e0792bf7fbc105ce96 26-Apr-2016 Chris Wren <cwren@android.com> Merge "cancel group children before summaries" into nyc-dev
3eaf72dc67ef0911bee0cc0d1db088cb70b044ca 26-Apr-2016 David Brazdil <dbrazdil@google.com> Merge "Change app selection policy for post-OTA verification" into nyc-dev
90e269917e1d8f9fadb12c3528b8c360b2271e82 18-Apr-2016 David Brazdil <dbrazdil@google.com> Change app selection policy for post-OTA verification

Changes the policy for selecting packages which will be pre-verified
during post-OTA boot animation.

For Nx to Ny, an app is pre-verified if used in the foreground in the
last 7 days, or if its APK was loaded by other apps.

For M to N (or early N builds without detailed stats), an app is
pre-verified if it has any recorded use in the last 7 days.

Bug: 27902702
Bug: 27350503
Change-Id: I2b38daf017ecd0e5aa5ed596ed9351cffa03dbcb
5bc7f5f01bb1dc25e0f1b965afb88d34f0e69890 26-Apr-2016 David Brazdil <dbrazdil@google.com> Merge "Enable profile merging for post-OTA package verification" into nyc-dev
5da9dad2dd04586dbd665e6a73bfee1d0ed92a89 26-Apr-2016 David Brazdil <dbrazdil@google.com> Enable profile merging for post-OTA package verification

Currently post-OTA verification will attempt to compile with
'verify-profile' but does not merge the profiles prior to calling
dex2oat. As a result, we may miss some or all classes that need

Bug: 27688727
Change-Id: I1aa93cad2686513594cb37f6d3d181ae5c718d1d
e12d62bd79d27f1719ac6db01b1dd53289fe03d4 26-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WebView downgrade prevention logic" into nyc-dev
eda34e4d9687d1205d9491a33fdb62dbb7f27d07 26-Apr-2016 Shreyas Basarge <snb@google.com> Account info on job wakelocks

Adds account information to wakelock
names for JobScheduler jobs.

Bug: 28321515
Change-Id: Ifaf289c2a9a11843769a3b40eea57d93dbd7d075
a16a3362b535fcb970756a39fd4657bd15922592 26-Apr-2016 Shreyas Basarge <snb@google.com> Merge "Wait for JobService to start before scheduling syncs" into nyc-dev
b414eb8de66153d835090a1518017bc11489bce4 26-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Close open sockets when enabling firewall rules." into nyc-dev
bdc4700155f5ff89e213cb0e9efe49897b888f7d 26-Apr-2016 Jaewan Kim <jaewan@google.com> Merge "PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist" into nyc-dev
4cb4240b4d404f8b2d444a725abd53d43ad06bc7 23-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Close open sockets when enabling firewall rules.

When enabling a firewall rule that will deny networking to apps,
first close any sockets opened by those apps. Just dropping an
app's packets without closing its connections has the following

1. The app has no way to know this has happened until a network
timeout occurs.
2. The app's connections stay open, so the other end of the
connection (e.g., a server) might continue to retransmit
packets. These packets will wake up the kernel and cause
battery drain, but we cannot respond to them because packets
on those connections are dropped by the kernel (since the app
is blackholed). So the other end might keep retransmitting.
3. Even though we think the connections are still open, the
other end of the connection, or any intermediate NATs or
firewalls, might time out and close the connection (e.g., by
sending a RST). Because the app is blackholed, we have no way
of knowing that this has happened, so when the app is granted
network access again, these connections might just get stuck.

Bug: 27824851
Bug: 27867653
Change-Id: Iaaad1b26954fc5f1ba5c9ed8bdee039282f5e249
f0fd218382b96f052d22a2e8ee00510cc23a6d1e 20-Apr-2016 Jaewan Kim <jaewan@google.com> PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist

Bug: 27954955
Change-Id: I517e378d5c1672ac0eb87bdf4375b7d733276e58
c5804afa73edbf229e789570d288e66f70b54fa2 26-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix a few issues with occluded Keyguard

- When we get a collapse before the layout happened in SystemUI,
don't expand the panel after the layout.
- Don't reset waitingToShow when coming out of sleep. This will cause
win.isVisibleOrBehindKeyguardLw to return false and then occluded
state will change rapidly from true -> false -> true, leading to
flickering in SysUI.

Bug: 23898941
Change-Id: I2b941188de777086bb2b477f5bfc00cc0cd6abe0
72c216f25072123f498105bc7ad98a65a7a3cdaf 26-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't hide app windows due to not showing when locked when keyguard is hidden" into nyc-dev
23fd1db68d1c28c8edc4ece1a0a1aa36c278e980 26-Apr-2016 Wale Ogunwale <ogunwale@google.com> Don't hide app windows due to not showing when locked when keyguard is hidden

This worked in pre-N because the only visible app was the app that can be
shown when the keyguard is hidden. That isn't the case in multi-window mode
where one of the apps can be shown when locked and the other doesn't have
the show when locked flag. Only hide the other app if the keyguard is shown.

Bug: 28368875
Change-Id: I5039098db74492fadf667fed24fc58448436681a
711ffe620ed06c8517cad8d4d0a8f4fca588f921 26-Apr-2016 Makoto Onuki <omakoto@google.com> Merge "When app is updated, save the new version code, and update shortcuts with resource based icons." into nyc-dev
1f677fdeae491849bfa2b0245b9bce858d12be18 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> SchedulingPolicyService: Fix UID for cameraserver

Cameraserver has been split from mediaserver, so need to use
its UID for determining whether to grant scheduling priority
change requests.

Bug: 28246165
Change-Id: I87b96e9fe0c0c38ec994d3d2aa131668d3d66986
a4ac5ab8502944f246aa4bf5b16444eafba1084f 21-Apr-2016 Shreyas Basarge <snb@google.com> Wait for JobService to start before scheduling syncs

Add code to wait for SycJobService to pass back an
instance of itself after boot before allowing syncs
to be scheduled.

Also removes unused constant MESSAGE_SYNC_EXPIRED.

Bug: 28380795
Change-Id: I616ba5c74578a81ff1e37ba4bd1fd937ce5c006d
70c8b9b66027409f9dec91872cbe8ae8756d5ea4 25-Apr-2016 Felipe Leme <felipeal@google.com> Tethering and Data Saver: There Can Be Only One!

If tethering is on when Data Saver mode is turned on, tethering should
be disabled, and vice-versa.

BUG: 28313291
Change-Id: I7f3dadbd97ea1492ab76b41043dea7487c1db02d
b59beffa89b6bc4f0c2d9469443c5730787ed362 26-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed issue with wrong stack fullscreen state on configuration change" into nyc-dev
436308f88b8f165f834a6b37f7638d6d4b7a6ca7 25-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Destroy both CE and DE data when corrupted." into nyc-dev
1d66995f47d548efe7863e88a8cc7bd2c66661a0 25-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Fix deadlock between VrManager, ActivityManager and WindowManager" into nyc-dev
98afb342df74a657e69a478b5ace19450b579660 25-Apr-2016 Chong Zhang <chz@google.com> Merge "Wait for next app to be visible if current activity is marked visible" into nyc-dev
5952f9aea4d0f5242d9678eb491ea7aa54734e66 25-Apr-2016 Wale Ogunwale <ogunwale@google.com> Fixed issue with wrong stack fullscreen state on configuration change

- No need to run TaskStack#updateBoundsAfterConfigChange if the stack
is fullscreen as the bounds will already be updated to when the display
content changed due to rotation.
- Correctly set mTmpRect2 that we are using to calculate the rotated
bounds to the current mBounds.

Bug: 28319277
Bug: 27870534
Change-Id: Ic3d9407b735210351c28297de79bf035909afcfe
076bddde4bfd02613b0bd6efd3a7610898917c5e 25-Apr-2016 Chris Wren <cwren@android.com> cancel group children before summaries

Change-Id: I1b716417119cfa3f4ffdd159ab5197cbfa714a8d
f56c9f432bafda9765f5ffcb25be5259645e121d 23-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Add manifest attribute for VR activities.

- Allow jank-free VR->VR activity transitions, even during
long activity transitions.

Bug: 28115931
Change-Id: I1e3fd1a5245bac3433ea6282cb1c7a71f0e0266f
592bf0b7d54a236f85d969b9599245f7d0542609 25-Apr-2016 Chong Zhang <chz@google.com> Wait for next app to be visible if current activity is marked visible

WM's AppWindowToken.updateReportedVisibilityLocked() may not report
nowVisible if the app has animation set. So nowVisibible could be false
for a while after the app is already on screen. If we finish the app in
this state, we still need to wait for next app to be visible.

bug: 28019637
Change-Id: I4f9f8e138f5d011a9ab393913159ed2978d26e0d
0751a83a99dc4481533ed706a942b8bb9caf8834 25-Apr-2016 Dongwon Kang <dwkang@google.com> Merge "TIF: Be consistent with argument name for startRecording" into nyc-dev
0cb5244e52590214ddc16dd5fc1030b5baf04726 22-Apr-2016 Dongwon Kang <dwkang@google.com> TIF: Be consistent with argument name for startRecording

Change-Id: Icb0125049cc92c5664e0810cdb86f1cb0903405f
c79a568f18dde1590d361989ff0cb6b19a61b2e9 25-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "API changes for DownloadManager and JobScheduler." into nyc-dev
4a9653841b9a011c6c2dc2a841ef21bb501602ad 25-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix stuck windows in multi-window" into nyc-dev
dbe44ac48d79a8dacd0ae22fec296fda39066bf6 23-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix stuck windows in multi-window

Window manager checked for the full display size so isHiddenFromUserLocked
always returned true but activity manager and other places in window manager
thought it would be visible which created a really weird state.

Bug: 28344326
Change-Id: I98daefbcc64bf7a5196588c25d2cbc5ee046a77d
17178d95f2d324f4a74e5572ae403ecc58f65e40 25-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix layout for child windows" into nyc-dev
5f23a57707687e51d31b1641c5824e016d717556 23-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix layout for child windows

Turns out that we also need to fit child windows to display in all
cases except NO_LIMITS is set.

Bug: 27991404
Change-Id: I34a12bbf9d0169bdb770e0e96f4b994146063e90
02179da30ecec5770341d42c0545f62b33b687ce 25-Apr-2016 Jeff Sharkey <jsharkey@android.com> Destroy both CE and DE data when corrupted.

When we find either a CE or DE data directory that has been corrupted,
destroy both CE and DE data together, since internal services like
AccountManager get confused if they find DE data without matching CE

Bug: 28346537
Change-Id: Iaf3694c20e4664536af25a2afeb45fe8a90d8171
bc6d96e4d09ec71a2844ea4e9281b7e849a00f80 25-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Fix NPE when assist data request times out" into nyc-dev
442fd2a1ddcfde18887ae712649695d6e7c384b3 25-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow multiple recent entries for task with FLAG_ACTIVITY_MULTIPLE_TASK" into nyc-dev
6e267d3d2367dc5fafb61f32a0abe4e5eb876358 25-Apr-2016 Amith Yamasani <yamasani@google.com> Fix NPE when assist data request times out

Bug: 28329835
Change-Id: I032e20ea1008512954b97519a4abb6fe4d65c673
5e40748d3f32c0d5843855cac169e82dd15a0904 25-Apr-2016 Chong Zhang <chz@google.com> Merge "fix "am start -W" hang on activity start" into nyc-dev
6eb8c15b7e07e320243fbb34999f4a34fa729ed0 25-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Return null when user is locked" into nyc-dev
7881cf8f818317cc6efe4d6a4c42da94d6bab223 15-Apr-2016 Ricky Wai <rickywai@google.com> Make "work mode on dialog" show personal challenge in unified work lock

Bug: 28183335
Change-Id: Ib212b283b9561f88899f6e7ea130944391b6e558
f07c7b9fd0a640bff4bf7690373613da217fe69b 22-Apr-2016 Jeff Sharkey <jsharkey@android.com> API changes for DownloadManager and JobScheduler.

To support moving DownloadManager, add new JobScheduler network type
constraint that matches "any network except roaming." Also add an
API to get a specific JobInfo by ID.

Since the default network can be different on a per-app basis, and
individual apps may be blocked due to app standby, evaluate job
connectivity constraints on a per-UID basis. To implement this
cleanly, add NetworkInfo.isMetered() to match the isRoaming() API.

Add new DownloadManager APIs to support charging and device idle
constraints, which are plumbed through to JobScheduler under the
hood when scheduled.

Add filtering to JobScheduler dumpsys to omit noisy details for
packages the caller isn't interested in.

Bug: 28098882, 26571724, 19821935
Change-Id: I09ca7184ef7ce6adba399f579d415a5fb2ea6110
afb776d5447e19565c9a826a554911decb9ed92a 23-Apr-2016 Chong Zhang <chz@google.com> fix "am start -W" hang on activity start

Normally launch time counts from the point when the activity is
resumed, to when the first window is drawn. However the activity
could become visible before it is resumed, due to some other
activity in the same task being launched. In this case we still
need to report launch time to unblock

bug: 28333487
Change-Id: I445b602f495ed0c3cb669e2d81a137280317534f
02a0381e516f1782ff5a2170ed3b3e1bda7284fe 23-Apr-2016 Amith Yamasani <yamasani@google.com> Fix deadlock between VrManager, ActivityManager and WindowManager

Let WM register to listen for Vr mode state changes and keep
track of it locally to avoid calling out to vr manager.

Bug: 28342910
Change-Id: I071666fab7319f315021f48058177dd3141acc3a
aa1b2e2d4e47ae186df31ffe10f1ed05b951b753 23-Apr-2016 Chris Tate <ctate@android.com> Merge "Raise native-crash socket timeout" into nyc-dev
e8d5f650413dd6e0043f7dcb2e41bbb5df9832fb 23-Apr-2016 Wale Ogunwale <ogunwale@google.com> Allow multiple recent entries for task with FLAG_ACTIVITY_MULTIPLE_TASK

The caller wants multiple task in this case regardless of if it is the
same activity or intent filter. So allow it.

Bug: 28293748
Change-Id: I97f7900657975291f301cb4dc0a8af93ff6b70ea
ffcba67bf9d25d9b8131f0aab9d5c8a4df492b69 23-Apr-2016 Carlos Valdivia <carlosvaldivia@google.com> Merge "Rename GET_PASSWORD_PRIVILEGED and make it signature." into nyc-dev
404fd65e436df7600bbb1b495720f8d1288b0d9d 23-Apr-2016 Christopher Tate <ctate@google.com> Raise native-crash socket timeout

Stack unwinding can sometimes legitimately take more than 2 seconds.

Bug 28210681

Change-Id: If6fb30c5111e9c85ce98d36a97faa0b5f21bc04d
b6cd42a925136f6354555c9c1033d20fbaadd139 23-Apr-2016 Chong Zhang <chz@google.com> Merge "Force a relayout when task is resized while not drag resizing." into nyc-dev
c947ebd66d397782af0870df457ccc4fe83c77cc 23-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Cleanup of the PackageInstaller API - Frameworks" into nyc-dev
edaf305651ad56de9f024f5746619ac139b2e52d 23-Apr-2016 Chong Zhang <chz@google.com> Force a relayout when task is resized while not drag resizing.

mResizedWhileNotDragResizing is set is task bounds is resized, however
individual window's size may not change (eg. a floating dialog). The
relayout window may not come and the mResizedWhileNotDragResizing
flag won't get cleared.

bug: 28111853
Change-Id: If8bb79cc07d9c67d6e5685b0adc24a9ce2623ec6
ce83dcf4f7ed2082c72b062c7388a4314419e225 23-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix black flicker when closing IME" into nyc-dev
714bbd8539b73f9d8cf396b6e0edd03f968ebfbd 22-Apr-2016 Carlos Valdivia <carlosvaldivia@google.com> Rename GET_PASSWORD_PRIVILEGED and make it signature.

Now named GET_PASSWORD. Now it is just a signature, not privileged.

Bug: 28295831
Change-Id: Ice93b527edced9546639b6c7096aad933c517548
a1e7be375e618544e22287d0ee59f517536f95e1 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed NPE during boot animation on fugu." into nyc-dev
ae0e03a9e03de34e37b768b971d7596d7220a053 26-Feb-2016 Svet Ganov <svetoslavganov@google.com> Cleanup of the PackageInstaller API - Frameworks

The PackageInstaller app manages side-loading apps as well
as permission management. It should be updatable, hence
should rely on system APIs to talk to the platform. This
is the first step of defining an API boundary.

Change-Id: I9814eafd0b22ae03b4b847a7007cdbf14c9e5466
4c753d52cd4544a64a0c3bb9b1b0895cab8799f8 22-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix black flicker when closing IME

When closing the IME in docked adjusted mode, we still need to pass
in the IME window so we can still execute the logic to delay starting
the animation, so we don't see a black hole before the animation is

Bug: 28175599
Change-Id: I606d30bd63b5e909fdebd78b0aa4968bd9f26c24
5a91b615232374084a45752d7c09c25265e263ed 22-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Disallow disable of the system shared libs." into nyc-dev
7981e8ff6509769a590f15b440f989437d732be5 22-Apr-2016 Sujith Ramakrishnan <sujithrk@google.com> Merge "Unbundle RemoteService on TV - part 3" into nyc-dev
b7ba766352ca78784831e7332dd59aa2f0e2a314 22-Apr-2016 Sudheer Shanka <sudheersai@google.com> Merge "Remove debug flag for some important logs." into nyc-dev
93536af56d70c516760a796a1731237acce14f54 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix IME for status bar in docked mode" into nyc-dev
20ec11b4e61e5fffd639034f936ed5ef8359d414 22-Apr-2016 Wale Ogunwale <ogunwale@google.com> Fixed NPE during boot animation on fugu.

- Don't set a dim layer in the docked controller if we are not dimming.
- Check to make sure the docked divider window isn't null before trying
to use its layer for dimming.

Bug: 28339915
Change-Id: I33d49d26ffcaec63d135f82a6208e127ba0f0570
10f4f44efe0eeb47ea63471c221d7a765f55e3ae 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reconfigure display info. after configuration changes." into nyc-dev
9e76d3292b34c8683b549cc1f56bfff288defb92 22-Apr-2016 Robert Carr <racarr@google.com> Touch region fixes for dialogs and overlapping tasks.

There were two errors. First the function assumes that there are only
overlapping tasks in the case of freeform, and so otherwise it is not
necessary to union the focused task back at the end (and we can just
subtract all the non focused tasks). This won't work though, as there
can be for example dialogs over the launcher from another task. We
need to always add back the focused task. Secondly, we were requiring a
task to have a top visible "main app window" e.g. TYPE_APPLICATION or
TYPE_APPLICATION_STARTING. For tasks whose only presence on screen
is a dialog this will skip them and we will ignore them one way
or another.

Bug: 26962445
Change-Id: Idd5c54082409e7c34d9fc7480908c88fb12b378b
b5b86c11008422ac4bf5af5fed736f04ebbaa858 29-Jan-2016 Sujith Ramakrishnan <sujithrk@google.com> Unbundle RemoteService on TV - part 3

- New service TVRemoteService triggered by SystemServer
- Provider service proxy and watcher for maintaining connections to unbundled
services which have the BIND_TV_REMOTE_SERVICE permission.
- Shared library to facilitate connections between unbundled service and
- Unbundled service needs TV_VIRTUAL_REMOTE_CONTROLLER
permission to be fully functional.


Change-Id: Ief5c6995883d1f7268a73bdd0c920c4c3f42cddb
514316e76c8869557d3581a318a6bc1497c21851 22-Apr-2016 Sudheer Shanka <sudheersai@google.com> Remove debug flag for some important logs.

Bug: 27689631
Change-Id: I23c1396f3b29093e6d23ec06f90a382b6ce458d3
e67960ecae2ba008a7d1d364b5fdb1b95a179e52 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Force pinned windows to always be scaleable." into nyc-dev
cffe389a22cf3f3d63ec37a591b0d6226e1db99e 22-Apr-2016 Chong Zhang <chz@google.com> Merge "Fix black frame in finishing transition" into nyc-dev
ea999ac8e4d1e89eb79c11a76f30a4b25260b243 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add ambient light ring buffer for initial data gathering period." into nyc-dev
ae712e5708aeb2579bcfa38794e840350a992d97 22-Apr-2016 Adrian Roos <roosa@google.com> Fix IME for status bar in docked mode

If the dock divider is visible, window manager raises the IME from the
app's layer on top of the divider. However if the IME was targeting the
status bar, it would also remove it from the status bar's layer and
move it atop the divider (but below the status bar).

To fix this, we now only perform the adjustment to the IME's layer if
that moves the IME up, but never down.

Change-Id: I1308f51b98fffee64a5075c49697f5bc177ea32e
Fixes: 28024606
4c5f7ff42eda45be5f20a7dd981a9f064d8fb01d 22-Apr-2016 Chong Zhang <chz@google.com> Fix black frame in finishing transition

If either visible or nowVisible is true we need to wait for next
activity to become visible before we destroy the previous activity.

In some code path (eg. clear task top), when starting a new activity,
old activity is first paused and visible set to false with a dummy
transition set. Then finish activity is requested. At this point visible
is already false, but nowVisible is true. We still need to wait for
next app become visible to avoid a black frame shown in between.

bug: 27796252

Change-Id: Ief3d5fc8f11c51a729c424f996ab2597c815e4dd
6c83c7aa5f84680ffd53d3e318279cbead8b1af5 22-Apr-2016 Winson Chung <winsonc@google.com> Merge changes I222e50f6,I9832874d into nyc-dev

* changes:
Removing legacy calculation of Recents visibility.
Adding additional dump logging to track down bugs.
ccdb00ccc5ce332edfdc6729ecd99ae39295b990 22-Apr-2016 Wale Ogunwale <ogunwale@google.com> Reconfigure display info. after configuration changes.

Some of the information reported for a display is dependent on resources to do
the right calculations. For example, {@link DisplayInfo#smallestNominalAppWidth}
and company are dependent on the height and width of the status and nav bar
which change depending on the current configuration.

Bug: 28182307
Change-Id: I2ba5de4bcfb3fa3ad334e69eb192bd15f8f7ebb2
b5f554a25d93cd24588c63efc06c617bc63b87e7 21-Apr-2016 Hui Shu <hush@google.com> WebView downgrade prevention logic

Prevent *any* WebView provider packages to be downgraded lower than MonoChrome
Stable on the system image.

Assuming that all (and future) WebView provider packages follow the same
versionCode scheme, we can compare the subsection of Chromium versionCode that
contains branch number, which is done by ignoring the least significant 5

Note this CL is a follow-up to go/ag/895502.

BUG: 27469181
Change-Id: Iffe3c4b7f912d48c034f107079e065e54130713f
103fb78ac1b91874f8b90cc5a165e6f0502179c4 22-Apr-2016 Michael Wright <michaelwr@google.com> Add ambient light ring buffer for initial data gathering period.

We're seeing reports of the display being too dim at initial wake up.
Saving the buffer for this initial period lets determine whether this
is a calculation error or something wrong with the sensor readings.

Bug: 27951906
Change-Id: I96b5dd0772de056c3c5e54d59c13d1a3d902d343
1a83df8ba716d027ac26c9198ed3d3b8d2b98ad1 22-Apr-2016 Andrei Stingaceanu <stg@google.com> Merge "Keyboard shortcuts: dismiss when activities start via shortcut" into nyc-dev
82e5288ee63c92d3a610fd5c50bad510917fbf63 22-Apr-2016 Andrii Kulian <akulian@google.com> Merge "Show recents when task moves to docked stack" into nyc-dev
bf71968f893a8d556a03636109cb3bed4178a624 21-Apr-2016 Andrii Kulian <akulian@google.com> Show recents when task moves to docked stack

When task was moved to docked stack using adb command,
recents didn't show and docked stack was minimized when
home task obtained focus.
This CL shows recents if needed when task is moved to
docked stack.

Bug: 28215216
Change-Id: If1cfb9d24bd77cc9c3c8fad3479f115d7aca1301
0bf096f1b45959e260b09b2483e79187c1991f54 14-Apr-2016 Andrei Stingaceanu <stg@google.com> Keyboard shortcuts: dismiss when activities start via shortcut

* introduced a new intent DISMISS_KEYBOARD_SHORTCUTS and
and new public API in Activity (which sends a broadcast
to KeyboardShortcutsReceiver) which applications can
use to dismiss the keyboard shortcuts.

* plumbing and implementation for a new call to dismiss
keyboard shortcuts from PhoneWindowManager and used it:
** when starting activities invoked via Search+key
** when starting activities invoked via META
** when starting activities via application launch keys

* removed unused variable in

Note that for apps started via touch (aka non-shortcut)
like tapping the Settings gear icon from the notification
bar the menu is not automatically dismissed.

Bug: 28012198
Change-Id: I83a8d4f342bb8a08115a648648834d0d2bac19fd
ca82e616d3131570bf2ee29778f4796f343720d5 20-Apr-2016 Brian Carlstrom <bdc@google.com> Add reasons to notifyPackageUse calls

This is so we can record more specific times in PackageUsage.
If file with only one timestamp per package is found, the value is
copied to all usage slots.

Bug: 27902702
Change-Id: I8affe43c735e54620a9204433aad367cfddfded7
b003364bc7e31e7f85865ef298d399ed61c372a2 22-Apr-2016 Jaewan Kim <jaewan@google.com> Revert "Prevent recents from closing while moving PiP to fullscreen."

This reverts commit 744e6e3aef4d4b6cb3a75e8ecbbc1796da2388b2
to prevent Recents from shown again after an activity is PIPed
immediately after the fullscreen.

Bug: 28333917
Change-Id: Ifeceb910eefc3eef109bdc3ed24e11109f2cf9b4
784c93e372ff8ba8ca59499a8e35d83e5bd71c1a 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Split network monitoring and portal probe events" into nyc-dev
b40667eccdd797d08560c33e696625509f90d52b 22-Apr-2016 Rubin Xu <rubinxu@google.com> Merge "Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast" into nyc-dev
ff0ff67eccd784ccdd35b91ed182c50bb8df2d71 22-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Merge changes from topic 'blockOnProcessingUnsolicited' into nyc-dev

* changes:
Tethering: interface updates can be handled again
NativeDaemonConnector: add waitForCallbacks method
636c07d9a9a6e48197706bd9724e5d5db4e2fe9d 22-Apr-2016 Rebecca Silberstein <silberst@google.com> Tethering: interface updates can be handled again

When reloading wifi firmware, unsolicited responses from netd were
processed after softap had started and caused wifi tethering to be torn

The NetworkManagementServer.wifiFirmwareReload call has been changed to
not only block for the command to finish, but also until all unsolicited
messages (interface updates) have been handled. We should now be able
to handle interface updates in tethering without suffering from the
softap bringup/interface down notification race condition.

BUG: 27857665
Change-Id: Ie57cb8f760781b3227df575b577b33667070d63e
cc92c6e87773df9d5a84922066716ae9bb09cd6d 21-Apr-2016 Hugo Benichi <hugobenichi@google.com> Split network monitoring and portal probe events

This patches changes how captive portal tests and network lifecycle
events are logged as connectivity events:
- it splits NetworkMonitorEvent into two event classes:
- ValidationProbeEvent for logging individual probe events.
- NetworkEvent for logging network connection, validation,
lingering, and disconnection.
- it removes the redundant CaptivePortalCheckResultEvent class.
The information logged in CaptivePortalCheckResultEvent was already
logged by NetworkMonitorEvent, but missing the evaluation durations.
It is now logged by ValidationProbeEvent.
- it removes the CaptivePortalStateChangeEvent class, which is now
redundant with NetworkEvent, but missing evaluation durations.

In addition, it adds event logging when ConnectivityService puts a
network into lingering or removes a network from lingering.

Bug: 28204408
Change-Id: I8f9752e4d36175ecfcbd1545a01a41bad6e06ea4
efdb8454275954e54bd11a59d450cbac30c13da4 21-Apr-2016 Rebecca Silberstein <silberst@google.com> NativeDaemonConnector: add waitForCallbacks method

Add a method that allows callers to wait until all unsolicited
responses received from the native daemon during a command are

When commands are issued to a native daemon (such as netd) through the
NativeDaemonConnector we block until the command response is received.
Any responses or events that are a side-effect (considered
"unsolicited") of the command are placed in a Message and handled as
callbacks. The order of their processing is not guaranteed and, as we
have seen from bugreports, can be handled several seconds
later - causing the SoftAP that was just set up to be torn down
because a late interface down/removed is indistinguishable from a
new interface down/removed.

This CL adds a method that first checks to make sure callback thread
is not the same thread as used for the blocking call. The new
waitForCallbacks method uses a CountDownLatch to force the calling
thread to wait until all unsolicited responses received from the
native daemon during the execution of the command are handled.

The wifiFirmwareReload method is also updated to use the new
waitForCallbacks method.

BUG: 27857665
Change-Id: I3e22978f720b1cbf57fbb64ad4fea73f8c2d408a
42a6dc9bd6cd5028ab65f456fe7cc4d8a7fd77c8 22-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix squished UI elements" into nyc-dev
a482c6e5e61c2c01502a344240ef596dfbe84f26 22-Apr-2016 Paul Crowley <paulcrowley@google.com> Merge "Clear calling identity before calling mountService" into nyc-dev
65002e1d17031b76ecc67bff809494c158566408 22-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix squished UI elements

Stack bounds were wrong after moving all tasks from docked stack to
fullscreen stack, if fullscreen stack was created while moving.
This lead to very wrong bounds when rotating the screen the next

Bug: 27870534
Change-Id: I6d054922ffc7baa7cd1a86d0d3448050cbacd21f
60b688876de79392236524b950381927878fa34f 22-Apr-2016 Joe Onorato <joeo@google.com> Merge changes I036fbc5f,I979f0107 into nyc-dev

* changes:
If we can't call into an app process to deliver an intent, crash the process.
If a crash dialog can't be shown, just kill the process.
5869d1c5b67b8e8ee22696318ffb31316dcbb089 21-Apr-2016 Joe Onorato <joeo@google.com> If we can't call into an app process to deliver an intent, crash the process.

Rather than hoping the process will crash for some other reason, it is
better to just get rid of it right away. The Intent was not delivered,
so there are no guarantees that the app will continue to function

Bug: 28196243
Change-Id: I036fbc5ffd42dc7259437cc5a733976478a2dd3a
a51388d6536bd57c2bbcf18e84d87763d388dbf7 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I7261cf87,Icabfcf47,I09e6b032,I252cf139,If85ade73, ... into nyc-dev

* changes:
Revert "Death to synchronous transactions (2/2)"
Fix a few weird state issues from race-conditions
Fix lifecycle bug in when calling positionTask
Animation fixes when task is not resumed
Keep stack from mReuseTask
Final fixes for growing recents transition
da3cd339e968b8f54575f72823eb2e4cd826aa02 22-Apr-2016 Chong Zhang <chz@google.com> Merge "Update divider controller's dim layer when the layer is changed" into nyc-dev
1402c2efe815bbdfdbc2d3e8e25fff367d272dd4 22-Apr-2016 Chong Zhang <chz@google.com> Update divider controller's dim layer when the layer is changed

The divider's layer assignment could change after the initial adjust
animation has finished.

bug: 28255739
Change-Id: I5899fe22e4fec680c49c881437c7f85d8ee9ca74
d46b72788e8811d2e423ea1e5b2ff104ecb7f721 20-Apr-2016 Winson <winsonc@google.com> Removing legacy calculation of Recents visibility.

- This was causing us to try and launch the Recents activity again after
docking because the running task was the newly docked task and not

Bug: 28177001
Change-Id: I222e50f6de00a9d7881da2182eebc61564fd3266
3b6e05a2a8365c7e9c21e151ff05ca046b5bb9d9 21-Apr-2016 Jorim Jaggi <jjaggi@google.com> Revert "Death to synchronous transactions (2/2)"

This reverts commit dd05f0365aa0df9ba9a7631c8e02ed67f472132d.

There seems to be some logic that gets triggered inside surface flinger
regarding commit time of the transaction, and without it seems that
animations got jankier. No time to investigate...

Bug: 28305789
Change-Id: I7261cf8719d3528f8f5bee19e507b8ba88b8b729
a20eeda52951021da758fefba7bf956c9c9d15a2 21-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix a few weird state issues from race-conditions

- When starting another transition while the dock transition
is already set, always override that because that transition
starts prolonged animations which will never be ended.
- Only dock if we get a good UP event.

Bug: 28257206
Change-Id: Icabfcf475f419696d2bcff8fbb53cf3b29dedd69
023da538a2e8e31ad101fdb14bea9a653eb8f5c0 21-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix lifecycle bug in when calling positionTask

Sometimes the resumed activity from another stack gets positioned
BELOW the top activity of the current stack. We need to carry over
the mResumedActivity to make sure onPause is called on the moved

Bug: 28235047
Change-Id: I09e6b032cd8d0b00dc5fdd06bec68e53c25aae73
4ccfc30a80d6b63cc938ce3578b19773ca00a2ea 21-Apr-2016 Jorim Jaggi <jjaggi@google.com> Animation fixes when task is not resumed

- Make sure to add the activity to mWaitingVisibleActivities
to not destroy the activity before the app transition has
- Defer layouts in startActivityUnchecked so when clearing the
current activities in the current stack, we don't execute the
app transition yet. We need to wait until the new activities
are added as well.

Bug: 28026847
Change-Id: I252cf139e06197ea34329d1466f1f6162f3e7a30
b8c5876dc020959e133c0c7975d8ef65e4d47a27 21-Apr-2016 Jorim Jaggi <jjaggi@google.com> Keep stack from mReuseTask

When we launch an activity with CLEAR_TOP and NEW_TASK, we clear
all the activities in that task but then we don't reuse the stack,
which can lead to weirdness.

To fix this, we need to keep the target stack in that case.

Bug: 28000613
Change-Id: If85ade73b1036e8a7c0eda418d9f39e8596b8b16
5c80c41ee0ef808e7c8234087c5538531a16f5bb 20-Apr-2016 Jorim Jaggi <jjaggi@google.com> Final fixes for growing recents transition

- Make sure to reposition windows during animations to avoid that
they lag one frame behind.
- Don't put windows that are gone for layout into resizing mode.
- Don't layout windows that are gone for layout, to avoid resizing
the surface but the client won't draw anymore.

Change-Id: I809feffef00f9a086b44504126e03f509eb7f190
Fixes: 27855229
729c640cc887da9fe7a1b57121167a7bf83fee97 21-Apr-2016 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Rename DropPermissions to DragAndDropPermissions" into nyc-dev
5da7a4a3f078b2a770fc36be8a3c0d9c522525f8 21-Apr-2016 Chong Zhang <chz@google.com> Merge "Make sure don't adjust IME when docked left-right" into nyc-dev
cdb5fcf7b81de81793995097b017c001be2a4264 21-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Remove pre-N db after successful migration" into nyc-dev
1b5ea72b3cd946ae27e92743339f1fcb117a0520 20-Apr-2016 Robert Carr <racarr@google.com> Force pinned windows to always be scaleable.

Otherwise we have a race when switching it off at the end
of the animation when we don't move to fullscreen. Ensure
SCALE_TO_WINDOW is always enabled for windows while they
are in the pinned stack.

Bug: 27793381
Change-Id: Ia92465fd0d854f799caa8ed31edb4621af9fdecd
41de79e22050e3975636e50ab3954cf4be6bc6d8 21-Apr-2016 Chong Zhang <chz@google.com> Make sure don't adjust IME when docked left-right

bug: 28295645
Change-Id: Ia8f7f9a92fcc562bd672abae4d3ddfd6e6201a79
27bd37ff3aa4a4b0f84341cb576df7b75596450a 21-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Remove pre-N db after successful migration

Bug: 26279712
Change-Id: I53e4bd1b04b4ae6b94e8b5642d7f11a4edd6f1e4
289395b1feca65fc758384bb2d5c12f1c78500c1 21-Apr-2016 Chong Zhang <chz@google.com> Merge "Fix dead surface/window left on screen" into nyc-dev
d67a1ca49b138056d53490322ffdadef61d95fec 21-Apr-2016 Yohei Yukawa <yukawa@google.com> Merge "Accept null subtype in InputMethodSubtypeHandle." into nyc-dev
d3589ee715e397e61025265adc883c9ed3be4f56 21-Apr-2016 Tony Mak <tonymak@google.com> Merge "Fix wrong app is launched after solving challenge from tapping notification" into nyc-dev
646fe9913e5f5dda3d03d54ed6c6e9463a4161d0 21-Apr-2016 Tony Mak <tonymak@google.com> Fix wrong app is launched after solving challenge from tapping notification

PendingIntent.FLAG_ONE_SHOT is needed to prevent the PendingIntent being

Also, flag and activity option of credential intent in BaseStatusBar
is not same as the one in ActivityStarter. Added a new
function startConfirmDeviceCredentialIntent in AM to centralize it.

Change-Id: I2d9e5923ad5d4d012f10057c409c666c8ca299a3
Fix: 28309964
54a6394cf96423936e6f3548ed8d78ff82e6b247 21-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "Accept the calendar name in addition to the owner as a calendar filter." into nyc-dev
7c9350a940b4f96eb092c0dc2a7169b9e20b35ef 21-Apr-2016 Julia Reynolds <juliacr@google.com> Always reevaluate rules when a new service is added.

Otherwise the condition providers may never get an
onSubscribe call and may not turn on at the right time.

Bug: 26981870
Change-Id: Ia622597f10cc26f7c34ece1748013655543f488f
d82e981cf3003334affbb4454d8344c0a21bc124 19-Apr-2016 Julia Reynolds <juliacr@google.com> Don't call into audiomanager holding a zen lock.

Bug: 27642196
Change-Id: Ib510f2ddf966f36b3670290a4f3f695bf6b7810e
bcedd6b74f717dddb2e3e37385d1b4a4e82d949a 21-Apr-2016 Clara Bayarri <clarabayarri@google.com> Merge "Fix silent errors when launching Keyboard Shortcuts from Settings" into nyc-dev
3f4510535397bf103d0299440a0299ff8bbeec28 21-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "Cap number of NetworkRequests a UID can make to 100" into nyc-dev
c043ebee4b4b5851898667a92fdfca34a4d64e52 15-Apr-2016 Clara Bayarri <clarabayarri@google.com> Fix silent errors when launching Keyboard Shortcuts from Settings

The following error was thrown, given that Activity is generating a
protected broadcast:
Sending non-protected broadcast
android.intent.action.SHOW_KEYBOARD_SHORTCUTS from system

Bug: 28138503
Change-Id: I50d5212d7776d33ffe6e9df1c5f080205ac4a29d
b99d6af3ab406db14d161cdc0000ed521957d7ca 21-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expand NetworkMonitor metrics" into nyc-dev
7261fb27de16bb6d3ebd81bd3b73062bd212ea7e 21-Apr-2016 Hugo Benichi <hugobenichi@google.com> Merge "Some fixes in ConnectivityService event logging" into nyc-dev
a488c23dd5c9e024fb8ec702cee722916cdeaf0e 15-Apr-2016 Erik Kline <ek@google.com> Expand NetworkMonitor metrics

- add netid to CaptivePortalStateChangeEvent
- add NetworkMonitorEvent for simple duration measurements

Bug: 28204408
Change-Id: I62035e07d64013878a0bce30c67c929c2c7e7a85
5f16f760ad2469c8d5636f45974a2f725ef289be 19-Apr-2016 Hugo Benichi <hugobenichi@google.com> Some fixes in ConnectivityService event logging

Bug: 28204408
Change-Id: I44ed9539bb213a845c2bcc2861c947af7c3c9ef4
3cc58ddd3c39580d0c008d1cf7138d5634be1b90 21-Apr-2016 Chong Zhang <chz@google.com> Fix dead surface/window left on screen

If the surface is explicitly hidden while we're changing resizing mode,
we need to discard the preserved surface immediately, otherwise it could
linger around on screen.

Do not mark mAnimatingExit in setTokenVisibilityLocked. This flag can only
be set after client relayouts to invisible. There we set mAnimatingExit and
mAnimating, so that when animation finishes the surface is marked to be
destroyed. If we marke it too early (and not mark mAnimating at the same
time), the surface may get stuck in exiting state.

bug: 28236574
Change-Id: I5cc916dfa698113e1d783a66547e1878469a9879
4d07c8891913a338d13ffe56133e24b0d167519f 21-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Exclude IME dialogs from tap outside task bounds funcationality" into nyc-dev
1fa356289e50d9a48d84afe831b230b087870e76 21-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Disallow changing stacks if top activity" into nyc-dev
abadeba99afbb1d80a38b396407822c96c7e3706 21-Apr-2016 Rob Carr <racarr@google.com> Merge "Prevent recents from closing while moving PiP to fullscreen." into nyc-dev
46ac35d09b0a1ba7af7eb4c14293a7978edcd2ab 21-Apr-2016 Yohei Yukawa <yukawa@google.com> Accept null subtype in InputMethodSubtypeHandle.

There are two types of IMEs:
A. IMEs that have one or more subtypes
B. IMEs that have no subtype

The initial implementation to update hardware keyboard layout per
subtype change of layout (See Bug 25752812) has supported IMEs in the
category A only, and IMEs in the category B are just ignored in both
system and Settings app.

In order to support IMEs in the category B, InputMethodSubtypeHandle and
related methods need to accept null InputMethodSubtype. Technically
this is a straightforward change, because in InputMethodManagerService
we have already used InputMethodUtils.NOT_A_SUBTYPE_ID for those IMEs in
the category B. We also need to update Setting App, which will be done
by a different CL [1].

[1]: I46b9c5b018f08e3eaa4614a0893db0be91652f3c

Bug: 28182650
Change-Id: Ia013784a594ad3beaf30976d047f5ac0fa8185be
6c0ead993e48f6e260972171b1187ef77b6094fb 21-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removing disk access from startActivity thread" into nyc-dev
b5383455b6cae093e60684b4f5cccb0cc440330d 14-Apr-2016 Jim Miller <jaggies@google.com> Fix missing permission check when saving pattern/password

Fixes bug 28163930

Change-Id: Ic98ef20933b352159b88fdef331e83e9ef6e1f20
1f1926152734eb9508d8cc2c5ed487027a470579 21-Apr-2016 Wale Ogunwale <ogunwale@google.com> Exclude IME dialogs from tap outside task bounds funcationality

We don't want tapping on these windows to cause a change in app

Bug: 28184155
Change-Id: Ibd4ca15b2154c2e83a11f4a2a3edb4356cbfbfed
5719028766f51512beffa623db7ee682851570a0 21-Apr-2016 Joe Onorato <joeo@google.com> If a crash dialog can't be shown, just kill the process.

scheduleCrash() calls into the app process to ask it to nicely show
the crash dialog. If that call fails, rather than just silently
stopping, kill the process right away. It might be out of control.

This also adds an additional check for killedByAm to the flow there
so if the activity manager already has killed it, the dialog won't
be shown.

Bug: 28196243
Change-Id: I979f01074e5890640e7b06e29eeb0d6c38803569
4ad9856eb815c03723f9fe5f78518077b9c713c7 20-Apr-2016 Jorim Jaggi <jjaggi@google.com> Disallow changing stacks if top activity

When we attach an activity to an existing
task, and that task is already on top,
disallow changing stacks altogether even
if launch stack id is set.

Bug: 28026847
Change-Id: Ie70f0585a29dc1b85a5093624fede32110be3c76
dc4b80dde458ab43cc2bc8670864532023ddd6f2 21-Apr-2016 Suprabh Shukla <suprabh@google.com> Removing disk access from startActivity thread

Code was checking whether the directory for recent_images existed in
many places unnecessarily causing StrictMode violations. Moved the
code to only attempt to check and create the directory before
actually writing to disk.

Bug: b/28195831
Change-Id: I05f77a10f1dafc8cc0b1836b62352d56549ac1ee
a381455472a814c8dbd98fcb4312f46ed1373c88 21-Apr-2016 Lifu Tang <lifu@google.com> Merge "Added defensive code to prevent system crash" into nyc-dev
e1b51715bdd1d59913ef4cb83071ef8eaac968de 21-Apr-2016 Lifu Tang <lifu@google.com> Merge "Fixed bug in upgrading GpsMeasurement" into nyc-dev
665189f92646d34bf02082120cba3c62aa718770 21-Apr-2016 Chris Tate <ctate@android.com> Merge "Don't back up wallpapers that we've been told not to" into nyc-dev
b965ced011bdd7a3ec5450f93d1c58b889514f11 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 44e07e0 to mnc-dev am: 825b713 am: 8c635e7
am: 343600c

* commit '343600c3ecff31826e50d40821927e446adb9b0a':
Kill the real/isolated uid group, not the ApplicationInfo uid

Change-Id: I68dbf8f280672ec9770b6c57b9a17313f448e14a
343600c3ecff31826e50d40821927e446adb9b0a 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 44e07e0 to mnc-dev am: 825b713
am: 8c635e7

* commit '8c635e73c698302ce6661f227c274164972f048e':
Kill the real/isolated uid group, not the ApplicationInfo uid

Change-Id: Iae6fe5af0a8e0f27e8b45a56aecc2d722d7c3bc3
5a6c58e00202ed83cd60a02cd6a79da65598b655 20-Apr-2016 Rob Carr <racarr@google.com> Merge "Do not prematurely update position while bounds animating." into nyc-dev
8c635e73c698302ce6661f227c274164972f048e 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 44e07e0 to mnc-dev
am: 825b713

* commit '825b7134699fbaaa16423c52b7b424d4a9afefb1':
Kill the real/isolated uid group, not the ApplicationInfo uid

Change-Id: I0c120c8dbf76857985ebea04eadca81fa6470cb2
d7faf53605838487cace9979e577005cc7c8cabc 25-Feb-2016 Christopher Tate <ctate@google.com> Don't back up wallpapers that we've been told not to

In addition, now that the full uncropped wallpaper image is being
backed up, we now handle that via the full-data backup path instead
of key/value. Restore still knows about legacy data that gets
delivered via the older key/value mechanism.

This change also has the effect of removing the size limitations
around wallpaper restore acceptance. Any size source imagery is
valid, as crop & scale are rerun in a device-appropriate way
after the restore.

Bug 25453848
Bug 25727875

Change-Id: Idc64a2eaab97a8ecc9d2b8ca5dc011f29cab324d
54c4374b4a67fdfbda936e7f4a8a9538e16c3557 20-Apr-2016 Jim Miller <jaggies@google.com> Merge "Fix bug where fingerprint for wrong userId was attempted to be removed." into nyc-dev
377c32845bffaf68d5751d8cdf6fd60b8b3f5dc3 20-Apr-2016 Vladislav Kaznacheev <kaznacheev@google.com> Rename DropPermissions to DragAndDropPermissions

Bug: 28296057
Change-Id: Ic95cb4ae9c351d903df78628e983dec2bacd0ad5
0fea8ad44748abd031c2e73cd5e6bce6a086c5f3 20-Apr-2016 Ruchi Kandoi <kandoiruchi@google.com> Merge "Revert "PowerManager: Adds the Sustained performance API."" into nyc-dev
3966fb942c7a9445a8cc94aeafc445778c2311b4 20-Apr-2016 Chong Zhang <chz@google.com> Merge "Fix IME adjust when stack focus changes while IME is visible" into nyc-dev
9c36c02f0ea5f54bcb7cdf2a6175f4b8f92205a2 20-Apr-2016 Ruchi Kandoi <kandoiruchi@google.com> Revert "PowerManager: Adds the Sustained performance API."

This reverts commit 0abc001275d6cf0af4990f521ccff7346a7cd2bf.

Bug: 28150358
Change-Id: I99c71b3d6641310a33e898d6fd475d37c79ba9d0
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
a645c9753ff004e616a6df4a15c9d2e999508d91 20-Apr-2016 Ruchi Kandoi <kandoiruchi@google.com> Merge "window: Adds a Sustained Performance Mode window flag." into nyc-dev
8f2aca0ee4ff0eff6226df05d1531d2f2fa2f3c1 20-Apr-2016 Jim Miller <jaggies@google.com> Fix bug where fingerprint for wrong userId was attempted to be removed.

- cleaned up private API to ensure userId is distinct from groupId.
- fixed bug where we were sending the wrong userId when attempting to
- fix warning about wrong fingerId when receiving final id of 0.

Fixes bug 28268635

Change-Id: I9507723c1a763152775f2feff76c16762f23cf2d
825b7134699fbaaa16423c52b7b424d4a9afefb1 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 44e07e0 to mnc-dev

Change-Id: Ibc446c82a3d1446ccd81630743f82d1fd58fbd47
744e6e3aef4d4b6cb3a75e8ecbbc1796da2388b2 20-Apr-2016 Robert Carr <racarr@google.com> Prevent recents from closing while moving PiP to fullscreen.

If we close recents when beginning the animation, we will
trigger a resume of the previous fullscreen app, which will
attempt to aniamte in at the same time we are animating
the PiP to fullscreen. These conflict causing flicker and

Bug: 27793381
Change-Id: I520181dadab938bbf62b25891f5ba0e4e9783967
6ada702993227233fd362e98de93cc9e798dc75d 20-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Add settings for altering VR display behavior." into nyc-dev
8b7ad976bfa88d54c00c02a4b2b582d56bcaa699 20-Apr-2016 Lifu Tang <lifu@google.com> Added defensive code to prevent system crash

Bug: 26940611
Change-Id: I8226d1acb42ccc7d2cd910e30b47c7c63c9f490b
4a6bd4b48fe309f50a3878d85104be6fbf244d50 20-Apr-2016 Dongwon Kang <dwkang@google.com> Merge "TIF: Do not build input list for background user" into nyc-dev
69016e3472e9ba1144bfccd0217f7cf73b84f9ef 18-Apr-2016 Robert Carr <racarr@google.com> Do not prematurely update position while bounds animating.

We intend to update the task size in onAnimationStart
so that we can get a new buffer as quickly as possible.
We need to keep it at the old position though, or
we will see a jump at the beginning of the animation.

Bug: 28091556
Change-Id: I5fc5f9eef1629dea88844cf3f2274eaa48909b97
f347ab5eddd63dbcbb4a70a94ec0916b3db46569 19-Apr-2016 Chong Zhang <chz@google.com> Fix IME adjust when stack focus changes while IME is visible

- Use two values to animate divider width adjustment separately
from stack position adjustment. For example IME is visible
with focus on bottom stack, then user clicks top stack. In this
case bottom stack position should go back to unadjusted, but
divider should remain thinner.

- If we need to start a new animation during an existing animation,
start the motion from where the existing animation left off, so
that it doesn't look discontinuous.

- Do not adjust if IME is not actually focused on any stack. This
could happen when swiping down the status bar.

bug: 28175599
Change-Id: I802def5d1c13ebe11094eb28fc5a0b0c309e4d76
8ad4430c57539d8b4cb5856bd9cfc3ba06ca6343 20-Apr-2016 Lifu Tang <lifu@google.com> Fixed bug in upgrading GpsMeasurement

Bug: 28278410
Change-Id: I936e257d68c348654d6031eb3e8f6d63b28d5e0a
44e07e07a1a1ec269ee0ef0963b452ea9a7c7158 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 5e380f0 to lmp-mr1-ub-dev

Change-Id: Ie8d3c154f4c98bb1c2a1954ff1dabc8f5bc20b71
db973df830c32af8e2aeff256053299409f65dfd 20-Apr-2016 Rob Carr <racarr@google.com> Merge "When restacking IM windows preserve relative order." into nyc-dev
9724fba83545fd075cbda62bb13cdc7820c7291a 20-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added onRestrictBackgroundWhitelistChanged callback." into nyc-dev
c8df6aa42facbe0cf7c05e4db78ec4a4e224b78b 20-Apr-2016 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Send ACTION_DRAG_EXITED when the pointer moves over a non-touchable window" into nyc-dev
43e38de2530fecbbdea81c52d0fde90333432356 15-Apr-2016 Ruchi Kandoi <kandoiruchi@google.com> window: Adds a Sustained Performance Mode window flag.

Adds setSustainedPerformanceMode(boolean) API for applications to set
the mode for a given window. The mode will be disabled automatically when the
window is no longer in focus.

Bug: 28150358
Change-Id: Ibe8bc564eeaaccbcaad5c4f792cda16da931dffd
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
a897e5f5e32557efa03c375fde17faae3282673f 19-Apr-2016 Dongwon Kang <dwkang@google.com> TIF: Do not build input list for background user

Building input list for background user leads to unnecessary connection
request to hardware input and that causes incomplete service state.

Bug: 27407198
Change-Id: Id8d5d5001394781edd2dafe8681c674855332ae3
4e1d3fdf7a43b3e43efac0a26ca3d0f458ce87d3 08-Apr-2016 Paul Jensen <pauljensen@google.com> Cap number of NetworkRequests a UID can make to 100

This prevents DoSing ConnectivityService with too many requests.

Fixes: 27253080
Change-Id: Id0480d220b2f01b9ef1146bef8ead2fc8287e28d
49425d612cee3864a316e9ecb6ec3faeae519b1e 20-Apr-2016 Rubin Xu <rubinxu@google.com> Merge "Kill foreground apps when turning off work" into nyc-dev
da067dcbf2f9376814e6a7ea8302f9dfcc5cef59 20-Apr-2016 Keisuke Kuroyanagi <ksk@google.com> Merge "Allow switching keyboard layout to null." into nyc-dev
b976877a4b62a6030fe67796ab8a6a69b4cc041f 20-Apr-2016 Robert Carr <racarr@google.com> When restacking IM windows preserve relative order.

We were still having some troubles with attached windows which we
werent properly promoting here. Now we catch everything with
the mIsImWindow flag. Before it was safe to assume dialogs
were on top of the Input Method but with a whole range of child
windows we need to be more careful. WindowManagerService has
been very careful preparing the window list for us, so carry
out its wishes and preserve the original relative ordering of
input method windows when restacking.

Bug: 28235787
Change-Id: Ied96d83f77b82df81b3b0aa94cb61e9c22999d23
598d40d93713470b7a4b02036cbea8ba9ee7ef90 20-Apr-2016 Vladislav Kaznacheev <kaznacheev@google.com> Send ACTION_DRAG_EXITED when the pointer moves over a non-touchable window

Bug: 28276601
Change-Id: Ic8da5c5ae422a9c9dd2d5bef898ee36a66b73afd
50c410c1c91922e91fb8d1b873f6a541d1e2fd6c 20-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix wrong transition when recents is growing when entering" into nyc-dev
b7a92e6009fefc2cb390b886e6a971b0c8a3c2d8 20-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "Move batterystats stats collection to its own thread" into nyc-dev
20b84dfa59190bfef04aac6dc8fb90c9bac5f21b 20-Apr-2016 Adam Lesinski <adamlesinski@google.com> Move batterystats stats collection to its own thread

Too many other tasks run on common handlers, and the batterystats collection
may block waiting for a timeout of up to 2 seconds.

Change-Id: I5be1ddc374d69620f4f7d821eb29e8524294c9a4
db21bbd2caf05322864f09ec45a0c572cf071123 19-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix wrong transition when recents is growing when entering

Bug: 27855229
Change-Id: I050305d16df6fe53abf5e74e1f9ee6c882dd7ead
5e380f096c6056429190362d0ba5017ad1491a25 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 7641889 to lmp-mr1-dev
am: cebcde3b5a

* commit 'cebcde3b5a1e406d953629d5b4c87347921a17de':
Kill the real/isolated uid group, not the ApplicationInfo uid

Change-Id: I6e3c41c59dfe4105780ad7d6d20f9096aabd575a
e23f581081b834d6928a4e8924432e0109391387 20-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't block while dispatching PRE_BOOT." into nyc-dev
cebcde3b5a1e406d953629d5b4c87347921a17de 20-Apr-2016 Christopher Tate <ctate@google.com> resolve merge conflicts of 7641889 to lmp-mr1-dev

Change-Id: Ie162907d7388d0e388ab39bcf2471d19e2ce7020
4e9a9dfb67ebc48028b1613a03144101d94f7d92 20-Apr-2016 Rob Carr <racarr@google.com> Merge "Force windows to be scalable during pinned animation." into nyc-dev
3dd59487cc5f01f38e1e5068ce9257a40473baba 20-Apr-2016 Adrian Roos <roosa@google.com> Merge "Fix unprotected StatusBarManagerService calls" into nyc-dev
fd24108ca9876ac4f3598cf06464b78b61f32a96 19-Apr-2016 Jeff Sharkey <jsharkey@android.com> Don't block while dispatching PRE_BOOT.

While we're waiting on the final UX around PRE_BOOT_COMPLETED, don't
frustrate users by giving them a lockscreen that appears frozen
for several seconds.

Bug: 28164677
Change-Id: I54b62cea9bb83bc0f82fdf7e6e46a4640e1a30de
f815e1b8d775240056308d94e8d15627cadb405e 19-Apr-2016 Rob Carr <racarr@google.com> Merge "Place InputMethod after DockedDivider in window list." into nyc-dev
976f28b926964889666a72332b8483f81c777f60 19-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't crop windows not on defualt display to stack bounds." into nyc-dev
49506e089103e8fe38d10e0589688e51cceacaf2 19-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Add settings for altering VR display behavior.


Change-Id: I31fcda8b846e7dd62f98151020f2bff2be52d521
a7f46b3ca6aa784b1456735c421922fd4c31626d 19-Apr-2016 Joe Onorato <joeo@google.com> Merge "Add an event log for when the memfactor changes." into nyc-dev
4c4afedfc5134558c1f674c1fc8f41260e07bdeb 19-Apr-2016 Joe Onorato <joeo@google.com> Merge "Consolidate the HealthStats UI to only use milliseconds." into nyc-dev
f33e2da0378a20bfc096fabcd3d8ef255e39eaeb 19-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Call defuse even when restrictions bundle is empty" into nyc-dev
a9864d234757ef43b227f32b02f825fb0a33b61b 19-Apr-2016 Julia Reynolds <juliacr@google.com> Accept the calendar name in addition to the owner as a calendar filter.

Because that's what settings has been storing in the rule definition
since M.

Bug: 25974117
Change-Id: I54aa3f06b143948aa7c826fc069bdb76055a6413
4c5aa51717b1858132ffc5c9804f409a161283ec 19-Apr-2016 Wale Ogunwale <ogunwale@google.com> Don't crop windows not on defualt display to stack bounds.

There are some windows that live on other displays while there app
and main window live on the default display (e.g. casting...). We
don't want to crop this windows to the stack bounds which is only
currently supported on the default display.

Bug: 26782253
Change-Id: I45648cc6fe8729e35f5b28eb06207aac6c263cdf
66e640d8b459ff285c7d9533f97990e92f9cc0da 19-Apr-2016 Tony Mak <tonymak@google.com> Merge "Fix the misuse of calling user id as group id" into nyc-dev
1ca6a33f36357281b3445e85d9e67cacd1a12ede 12-Apr-2016 Robert Carr <racarr@google.com> Force windows to be scalable during pinned animation.

We resize windows at the beginning of the pinned stack
animation when animating to a larger size, and so for some
duration a resize will be pending. We need to force the window
out of SCALING_MODE_FREEZE so we can animate during this period.

Bug: 27891386
Change-Id: I5cff599ed67f2c179e938662b6f0d99bd790aaba
069ed7003b3de1f87d28413cc2debc9042386d3c 19-Apr-2016 Todd Kennedy <toddke@google.com> Merge "Always perform has code check" into nyc-dev
ff715ac551fcb09640acdf28278384ca2d5f85c0 19-Apr-2016 Tony Mak <tonymak@google.com> Fix the misuse of calling user id as group id

1. The userId stored in different clients are actually calling user id.
groupId should be used to do all the operations. Also, renamed the variable
to avoid further confusion.

2. Fix the bug null is always returned in getFingerprintDaemon
in RemovalClient.

3. Fix the misuse of calling uid as calling user id in startAuthentication.

Fix: 28268635
Fix: 28264725

Change-Id: I618ac3c6d913ae5c86e7b04cb3f9ead39828f216
f720a9d91eb964b7772e3d42aae6bef83f531aac 15-Apr-2016 Todd Kennedy <toddke@google.com> Always perform has code check

Move code checking from the package parser and into the block
where we implement policy.

Bug: 28132476
Change-Id: Ie5cacacbf80289ff8d85acc5b57e58ea7216859c
c6184685d8f9b08abf73f83778ca129bb5c9c51d 19-Apr-2016 Robin Lee <rgl@google.com> Merge "Move UidRange aidl declaration to system/netd" into nyc-dev
019fcd2bec414fbb730c0bb0fa62995ee692c5bf 19-Apr-2016 Felipe Leme <felipeal@google.com> Added onRestrictBackgroundWhitelistChanged callback.

When users add or remove an app to the Data Saver Mode whitelist, the
app is notified through a
ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED. But besides this
broadcast, it's also necessary to notify internal apps such Settings,
hence a new method is being added to INetworkPolicyListener.

BUG: 27481520
Change-Id: I1537a77becf6b7da1535ed5faabdc894fd9f7084
0d88d54c34fef668c6ba74249b7f0003bff823a7 19-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Call defuse even when restrictions bundle is empty

Bug: 28259217
Change-Id: I3e9ba60ee80d1fedef4844d264b312418c287be4
1dbff801aeac52a4525f085d1346cc8741c00d30 15-Apr-2016 Joe Onorato <joeo@google.com> Add an event log for when the memfactor changes.

Bug: 28113068
Change-Id: I84902d5f7f811fd49fa85ff4847cf21b258b62c0
bee44ae8e5da109cd8273a057b566dc6925d6a71 19-Apr-2016 Joe Onorato <joeo@google.com> Consolidate the HealthStats UI to only use milliseconds.

BatteryStats uses a mix of microseconds and milliseconds, and keeping
which one is which straight is difficult. The internal bookkeeping
is left using us where it already does, for the extra precision. But
having the API be mixed will only make it harder for developers, and
lead them to make the same mistake that I did in the API where I
missed some conversions.

Bug: 28197858
Change-Id: I99114bae259b9bdd47ce5c22e724d87bbd63336d
9c211a339689a2e54da3315ccdbf22add472c76a 19-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #28221912: Starting service as foreground might..." into nyc-dev
e896090caf761afd8c443bcf4732e38e43b4baa9 19-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28250286: Missing equals!" into nyc-dev
adfa806cfbd6ad51fe3ec8c4cea808ebd2967038 19-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Ignore user serial numbers in core-only mode." into nyc-dev
214bea1b599ba2deccfca6e72a77bf411c724696 19-Apr-2016 Jeff Sharkey <jsharkey@android.com> Ignore user serial numbers in core-only mode.

When booting in core-only mode, our data partition is a tmpfs which
doesn't support xattrs, so we can't set/enforce user serial numbers.

Bug: 28254840
Change-Id: Id83c551c7c603a4cd5043e06f7161441b2dfaa8b
89fa73fd7abe0f87634d2914163a8fc79ba2f738 19-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Unlock should always wait for pending PRE_BOOT." into nyc-dev
f8451b98150564b340207327d0951f44753338d1 01-Apr-2016 Rubin Xu <rubinxu@google.com> Kill foreground apps when turning off work

While work apps will all be killed as we stop the profile user when
turning off work, this can sometimes take a while. So let's kill the
foreground apps as soon as work profile is being turned off to make
the user experience nicer.

Bug: 27631526
Change-Id: Icdd3799385a98ee531b0b4247e8ede78f6f10da8
3da3d7f455761b73309bf5a02bef5eba816df5cd 19-Apr-2016 Julia Reynolds <juliacr@google.com> Merge changes I01afb5e9,I90d1adaf into nyc-dev

* changes:
Add content intent to autogroup summary.
Logging for ranker bundling.
882a0802a7f7268750b15adb8747dd3904f935b0 19-Apr-2016 Tony Mak <tonymak@google.com> Merge "User action should only stop lock task mode if it is in pinned mode" into nyc-dev
abb12ed4f2fe5843d5f23a1b3d29ade4f9da76e0 19-Apr-2016 Keisuke Kuroyanagi <ksk@google.com> Allow switching keyboard layout to null.

Previously, PersistentDataStore#switchKeyboardLayout doesn't allow
switching keyboard layout to null, which means default layout.
As a result, when no keyboard layout is corresponding to the new
subtype, previous keyboard layout continues to be used on switching

Bug: 27750850
Change-Id: Ie5c6ef7944ade48907a5b92986578f9f40b0f499
e63e01a661b62c0c1b72efb646eb8b6332abe4a8 19-Apr-2016 Robert Carr <racarr@google.com> Place InputMethod after DockedDivider in window list.

We need to ensure that the InputMethod ends up
after the docked divider so it will have a higher
Z-order for input.

Bug: 28184654
Change-Id: Ifbe943312a82a79e850f106cc906f3749737710d
84f0b791e2eb0170c6b797929235c98d44f12d47 19-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Properly resume paused activity when docked stack in maximized" into nyc-dev
3e38e6accf5586d350581a301e1ecfcadaf03b93 19-Apr-2016 Craig Donner <cdonner@google.com> Merge "Checks for existence of vr components before trying to disable them." into nyc-dev
3eefb4c313d0269f7e8bd226bdcc2d039f9e5608 19-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use right starting window resource in multi-window mode." into nyc-dev
d96d436324afa635719ab092251ecaf80c1356f6 19-Apr-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28250286: Missing equals!

Change-Id: I85073a1a8a0a37362a0c73a71d0e7c12ce9cfeef
672afaa43b97d24c1f3aaf9722e53b70dbac8c54 19-Apr-2016 Craig Donner <cdonner@google.com> Checks for existence of vr components before trying to disable them.

Fixes: 28249296
Change-Id: I98506c263387c9deb05ae6bc997e92e0000b71ad
0d47f4b6463077074abd6bed489a5f9243615c64 19-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev
3ad75d608dc55cb89329bf9d466af6f0f2e31631 19-Apr-2016 Wale Ogunwale <ogunwale@google.com> Properly resume paused activity when docked stack in maximized

Force focus to the fullscreen stack so that its activity is resumed
regardless of it current state when moving all tasks from the docked
stack to the fullscreen stack and the fullscreen stack should be on

Bug: 28247643
Bug: 28196862
Change-Id: Ic60c3794db765e9ee31b0facbbc4f461d65f30c2
76418899e66a144a257ee3489404dcb390552c18 19-Apr-2016 Christopher Tate <ctate@google.com> Kill the real/isolated uid group, not the ApplicationInfo uid

This is a direct reimplementation in L of fixes applied to N in
these two commits:


Bug 19285814

Change-Id: I59bcc8f1d41c426e9da635bea9ad1d7c6756d5aa
dfc18623edfd35778c1f2c8efab12dfeff98ded7 17-Apr-2016 Wale Ogunwale <ogunwale@google.com> Use right starting window resource in multi-window mode.

Use the override configuration for the task the app is contained
in to generate resources for the starting window.

Bug: 28220001
Change-Id: I6fdf39a6d6de41287b44b25861a76f58fe58dd53
b1dea03f0a72923793895048e1a5aac0d4e485c5 19-Apr-2016 Chong Zhang <chz@google.com> Merge "Misc fixes for IME adjust" into nyc-dev
198afac5ce6c8b85d5d8b374f4a7169104ef6eed 15-Apr-2016 Chong Zhang <chz@google.com> Misc fixes for IME adjust

- Use thinner divider when IME adjusted

- Dim non-focused stack

- Restrict IME adjustment so that top pane is shrunk to 30% at most

- Move top stack up together with IME adjust

- Move bottom stack up even when not focused for thinner divider

bug: 28175599

Change-Id: I83556535e5a171f0ec28d88429186fa1315b910c
67324c990c4fbad238119a4667341d5618b2bea2 18-Apr-2016 Dianne Hackborn <hackbod@google.com> Work on issue #28221912: Starting service as foreground might...

...kill previous notification.

Add new platform API to detach a notification from a service
without dismissing it.

Also, while I am here, add some more @IntDefs.

Change-Id: I3bb46d9cd3db7f73716c8ced19c20fea800eb30d
84a4c971c484f05f2a2494d6353f36f4d954a5e0 18-Apr-2016 Jeff Sharkey <jsharkey@android.com> Unlock should always wait for pending PRE_BOOT.

While processing an unlock request, we might go async to handle
long-running operations like dispatching PRE_BOOT_COMPLETED. This
change ensures that all unlock requests for a particular user wait
in line behind any pending async operations.

Without this CL, any subsequent unlock requests would immediately
return successful, even though PRE_BOOT_COMPLETED events were still
being processed.

Bug: 28240584
Change-Id: I307d6aaebfb8f38028f3666a2e19e4399b7cf3a7
8df940000ddf82e4268350abe6b1cf4be375160c 18-Apr-2016 Jim Miller <jaggies@google.com> Merge "Fix operator precedence bug causing a crash." into nyc-dev
c1e61b83c2fc3fa7a7111ec72081a8fa647bc354 18-Apr-2016 Jim Miller <jaggies@google.com> Fix operator precedence bug causing a crash.

This fixes a bug where string expression was being evaluated
and then compared to null. The result is a constant expression
which always passes, resulting in inadvertently accessing the
null variable.

Fixes bug 28237450

Change-Id: I755b4466fd1985bd7f8984c17e06839ac4a30642
de5dbec3aba4b0fcae226a8a512d37b1ee3071a8 18-Apr-2016 Craig Donner <cdonner@google.com> Merge "Disables VR components by default, but enables them if a VR app is installed." into nyc-dev
c86c3fdd9a0307b8df6e4bed70f9e514f911858b 18-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Return null when user is locked

In getUserData, peekAuthToken return null instead of crashing when a user is
locked. As per JavaDoc authenticators are expected to handle null return values.

Bug: 28217043
Change-Id: I06d5a2965fe685cad21215958d5d94f413f77677
f2efdd8c7ca65745245a0ac26c681a8d376adb87 16-Apr-2016 Adrian Roos <roosa@google.com> Fix unprotected StatusBarManagerService calls

Some Binder calls in StatusBarManagerService were
left unprotected. They had no business being binder
calls in the first place, so they got moved to

Bug: 28222649
Change-Id: Ib26dcca413eb642ba8cd6a4482bf13071f8bd3ab
3c800a49178552d52354592790396a1e1f7ee8ef 16-Apr-2016 Jorim Jaggi <jjaggi@google.com> Set correct stack before restoring tasks

When restoring a task when starting it from recents, we need to set
all the relevant state for the transition before we actually restore
the task and attach the docked stack, as all kinds of weird things
might go wrong otherwise.

Bug: 28194162
Bug: 27607141
Change-Id: I21d173a43c62d425e507e8cc3a1a576f95cfe048
d450aa9ac5b30897abf14f76a9ae2a5d76bc5331 16-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix IME layout

When introducing the fitToDisplay variable, it should have been

fitToDisplay = task != null -> (implies) !task.isFloating();

but was written as task != null && !task.isFloating.

Bug: 28182018
Change-Id: If0be86f1ed8bb88914ce167e9f5273b6b3dc2571
fed6c65f2a05a75f75d0a258da214770ff9168de 18-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Iterate through all known users after moving." into nyc-dev
ad14b884f4110e03ec7b5ba7b913be25d19aa95c 18-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Consistent creation/destruction of user data." into nyc-dev
77ca3629f60dd9a416938e625959d0bd750d1acd 18-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reduce activity lifecycle churn when exiting split-screen mode." into nyc-dev
9d1d006cb3fb85304d1002b0d71c1b9fa11ad2f6 18-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Merge "Fix VR->VR Activity transitions." into nyc-dev
9906259202819794dd3ab1f60813f0c34e412efb 15-Apr-2016 Craig Donner <cdonner@google.com> Disables VR components by default, but enables them if a VR app is installed.

If an existing app or newly installed app is installed, then enable them,
otherwise, they stay disabled.

Fixes: 26568985
Change-Id: I8274b061220f41b9462d83b8aff501905d84a508
8dd32a56f74b896b21895ec75d58fa415caa2c70 18-Apr-2016 Rob Carr <racarr@google.com> Merge "Always update DimLayer bounds when starting dim." into nyc-dev
36ac7e9f88e43a518b9670f556c011cb3d8f236f 18-Apr-2016 Rob Carr <racarr@google.com> Merge "Promote input method dialogs layers with input method." into nyc-dev
3f6e211d7306bb7a4d5abc01a966e06294a48988 18-Apr-2016 Shishir Agrawal <shishir@google.com> Merge "Adding slotId to certain Telephony broadcasts." into nyc-dev
853304c0b11921db142a3945ab66fae5f0cc7d8a 18-Apr-2016 Tony Mak <tonymak@google.com> Show work challenge in if user in docked stack is locked

Register docked stack listener in ActivityManagerService.
If the docked stack is leaving minimized state, check whether the user
of the docked stack is locked. If yes, show credential confirmation.
Also, we now show work challenge in home task.

And we now scan the entire top task to handle the case the work app is
somewhere in the middle of the task. (eg: open personal camera in work app)

Bug: 27565539
Bug: 28094505

Change-Id: Iaf0738f43ae916a535b17949ec0f322bbfb194dc
106069412da3edd7de44f616a4f876d7102dcb45 30-Mar-2016 Robin Lee <rgl@google.com> Move UidRange aidl declaration to system/netd

Which owns the native UidRange.cpp, so it makes more sense for the
declaration to live there since frameworks/base depends on netd but not
vice versa.

Bug: 26694104
Change-Id: I0efda77713ee6f0ec8070fb0e09a694b95f6cd25
2c11dc99632354836281cbe3000b911e72a30d14 18-Apr-2016 Tony Mak <tonymak@google.com> User action should only stop lock task mode if it is in pinned mode

There are two lock task modes: pinned and locked.
Pinned mode is the one that one that need users action to accept the pinned
request. For locked mode, it is triggered by DPM.
We should not allow user to stop locked mode by user action.
Please notice that it does not happen before because the action to dismiss
lock task mode is pressing both back and recents button and recents button
is hidden in locked mode. But it becomes a problem after the user action
is changed to long pressing back button.

So changes are as follows:
1. Only stop lock task mode if it is pinned mode in
2. Remove the permission checking in stopLockTaskModeOnCurrent. I can't
see the reason we are having this because there is no permission
checking to in stopLockTaskMode when it is in pinned mode. So you
can always stop pinned lock task mode anyway by calling
stopLockTaskMode directly.

Bug: 28184751
Change-Id: I610cc1dfade7737e0b08fc9a13dad29e62e09a32
a09b4d2a611a7606e8fc8c73a24bd941b6fc173f 15-Apr-2016 Narayan Kamath <narayan@google.com> Remove unnecessary allocation+unboxing of objects.

Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
988a20a94b71c7a8fdffcfbfe0b0ee0dd58854cb 18-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Always send configuration changes to activity." into nyc-dev
02ebaa02c41050b7223b9ec772da669810bff43b 18-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't allow pinned activities to request visible behind" into nyc-dev
d82b748b268dbd35e02d21eb7cc6be7b19484f5f 18-Apr-2016 Robert Carr <racarr@google.com> Promote input method dialogs layers with input method.

When raising the layer of the input method window we also
have to raise the layer of its assosciated dialogs which
thankfully are already collected for us.

Bug: 28138068
Bug: 28186814
Change-Id: I4e63a642199c5aad3b3322e773df287ced80d641
7393c7b3ec4230f2dc2caf4c6a8c25dfcf6a5b91 18-Apr-2016 Robert Carr <racarr@google.com> Always update DimLayer bounds when starting dim.

Otherwise animateDimLayers can occur before
updateDimLayers and we can show the dim at the
wrong size.

Bug: 26908486
Change-Id: Ifd664e48f3daa77900a7f0bffa58a379efa6b53c
c8da41e2f4f6087b5ae0e08a30962d8f5231b01c 16-Apr-2016 Wale Ogunwale <ogunwale@google.com> Reduce activity lifecycle churn when exiting split-screen mode.

- Ignore calls to resize the docked stack due to it detaching while we are
already resizing stacks due to the docked stack switching to fullscreen mode.
- Defer resuming activities in a stack we are resizing to fullscreen when the
docked stack is going away. The activities may not be the top most activity
anymore since the activity in the docked stack might be moved on top of it.
- Removed call to ensure configuration in ASS.positionTaskInStackLocked.
This isn't needed as the ensure activities visible call will make sure
the activity is in the right configuration if it is going to be visible and
we don't want to be relaunching it if it isn't going to be visible.

Bug: 28196862
Change-Id: I26460dd9c649b8ec1bf296d5182e9ff6cafe6df0
f7dab1e53f4c8544a6129ff8785363baec1272dc 16-Apr-2016 Wale Ogunwale <ogunwale@google.com> Always send configuration changes to activity.

We are not sending override configuration changes to activities if the change in
configuration is not significant enough (i.e did resources will not be reloaded
due to the change). This breaks apps that rely on getting onConfigurationChanged()
call whenever the config changes regardless of if resources will be reloaded.
We no deliver all configuration changes to the activity.

Bug: 28177873
Bug: 23904868
Change-Id: Icc979dabb8bc93ae8a976ef6074cd2559aedca67
43896cffe69ffb70ed4d8248c81c9c25f69a7540 16-Apr-2016 Wale Ogunwale <ogunwale@google.com> Don't allow pinned activities to request visible behind

Also, release visible behind when pinning a visible behind activity.

Bug: 28042883
Change-Id: I1162d7639626f669f648ff82f5c367cb7b3fe6e6
e2be9f4a670198edbe9b1c42422d6d429b8a21f6 16-Apr-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManager: Categories should be Set, not List." into nyc-dev
c99f05e1b0d3b13bbf46ebcb5b23307d6af4e1ce 16-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix broken statusbar disable flags" into nyc-dev
be73a8068ff3babe5b0a4f12656731ba8eea6149 15-Apr-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Categories should be Set, not List.

Bug 27923857

Change-Id: Ife859da8e66478174f6c4463316886a23e5aa4e0
b56b72a8461dcc1a9dccd4c7019e2ecbf191fc1c 15-Apr-2016 Ruben Brunk <rubenbrunk@google.com> Fix VR->VR Activity transitions.

- Briefly delay unBinding VrListenerService and making HAL calls
when leaving VR mode Activity in case subsequent activity will
be immediately re-entering VR mode.

Bug: 28115931
Change-Id: I3f362131ed2beb6a29ce78fe01e9301d8b396520
2a6291069187756a1c45786215716db3f37097f7 16-Apr-2016 Adrian Roos <roosa@google.com> Fix broken statusbar disable flags

Fixes a bug where the disable flags were
always applied to user 0 instead of the current
user because the user switch dispatch from
WindowManager was broken.

Change-Id: Ib2faf0777c5367af5bf07cb2d11c51ed0222d65c
Fixes: 28062568
010bf374d8145528f8733dfa6ef101b15de23a8d 11-Apr-2016 Adam Lesinski <adamlesinski@google.com> BatteryStats: Introduce Async external stats requests

Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.

This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.

Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
275c94aea32e3c95cbf8177c80c77a1b191e7fa3 15-Apr-2016 Jim Miller <jaggies@google.com> Merge "Fix missing permission check when saving pattern/password" into nyc-dev
426e4206f9bd1eb2c16abc6ba36b1b88bc00b322 15-Apr-2016 Jeff Sharkey <jsharkey@android.com> Iterate through all known users after moving.

installd no longer supports USER_ALL when destroying app data.

Bug: 28174913
Change-Id: I23496eda7269ad1ad58007de0f44cb89a2291ecb
b3e26a9b414da986963bade0e18a80a20851c74a 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix wrong transition when dock minimized and docked app launched" into nyc-dev
f7e59c1f618d20b79df6e936b9daedaa7c1b4d3d 13-Apr-2016 Shishir Agrawal <shishir@google.com> Adding slotId to certain Telephony broadcasts.

These particular boradcasts need to expose phoneId since they are valid even
when there is no SIM.

- Added phoneId to broadcast.
- Removed TelephonyRegistry non subId call.
- Added phoneId to broadcast.
- Removed TelephonyRegistry non subId call.
- Added phoneId to broadcast.
- The non-subId version is called by Telecomm to communicate overall state.
Telephony sends its own version, so only the Telephony call needs to add

Bug: 27378995

Change-Id: I554f7ee18b9ae19919f4724328dcff3ef9cbd092
fe31ada9996662cf743b60ebfb4be8b61045a9af 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed bug with activity moved to pinned stack left in resumed state." into nyc-dev
fcf1e55821b694df3b8434f40aa3b6d3c3e7ea50 15-Apr-2016 Jeff Sharkey <jsharkey@android.com> Consistent creation/destruction of user data.

Preparing and destroying users currently needs to be split across
installd, system_server, and vold, since no single party has all the
required SELinux permissions.

When preparing user directories on a storage device, always enforce
the serial number and destroy data if we run into a mismatch. When
deleting a user, write the updated user list first before we start
destroying data. Also start reconciling users on internal storage
at boot, so we can recover from stale data left behind from partially
destroyed users.

Check both CE and DE user directories when reconciling user storage
on a newly mounted storage device.

Bug: 27896918
Change-Id: I4536c82b0196e2720628c4f73fccb742c233350b
39686e8cdec3550c941d376929084f59ac0d78cd 14-Apr-2016 Makoto Onuki <omakoto@google.com> When app is updated, save the new version code, and update shortcuts
with resource based icons.

Bug 28152054

Change-Id: I14f537c08b1a0ba48dd508b0c42fc1d3ed4f5eb0
681fc7b2670542aae0f3b9ef8f6c7a88db984ea9 15-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix wrong transition when dock minimized and docked app launched

When having an app docked and then going home, and then launching
the app from the homescreen, we had a wrong transition because
getTopMost task was already set to the launched app, because
getRunningTasks doesn't exclude the docked stack. Instead of adding
flags for getRunningTasks, which sounds risky, we just pass a "force"
value when we launch recents in this state.

Bug: 27154882
Change-Id: Iee4512fed13115dbbe8b74413ff1fa9b87afa0ef
7a4fd5e1f287963c97bf25f265b940c289d6ecf6 15-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix minor issue with IME

Because we only "carve" out the area for the IME once it's actually
visible now, we need to relayout the windows when we show it - else
they won't update the insets until the next real layout happens.

Bug: 28175599
Change-Id: Ie0af1225da03905bfcb52044e212812c892c88a9
5bba3e7cd39e1acd4c3190f962f258ad3378b4e1 15-Apr-2016 Julia Reynolds <juliacr@google.com> Add content intent to autogroup summary.

Change-Id: I01afb5e9aa7d74844d6640fdc70b39b59ef2093a
Fixes: 28194709
b1ebc3b7a013a647dd4a3c6f006e00a017886b20 15-Apr-2016 Julia Reynolds <juliacr@google.com> Logging for ranker bundling.

Bug: 28210646
Change-Id: I90d1adaf23d318e07b1a9941ac45b5d6ae0624e8
7e25024758c2aff4b70024c70d931f81ad25cbd6 15-Apr-2016 Rob Carr <racarr@google.com> Merge "Always assign layer when restacking special windows." into nyc-dev
74870c441fde0aa141edca84f066d1ace4cf5db5 15-Apr-2016 Pavel Zhamaitsiak <pavelz@google.com> Merge "Make ConnectivityMetricsLogger and related classes @SystemApi" into nyc-dev
db0f3a708acdb4640e00cce848294d6f7dc88fa3 15-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Update interface quota on the handler" into nyc-dev
fc465bf6bf456f5be1790b2ba60ea3da9c671d71 15-Apr-2016 Craig Donner <cdonner@google.com> Merge "Fix VR mode handling when the screen blanks and unblanks." into nyc-dev
23cd9dab01bff3ce7bd2fd275411fc99a903f2b4 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "CEC: Remove listener records only if they are currently used" into nyc-dev
90da5e54482fd513ab73bbcfce9f55312d0c96f7 15-Apr-2016 Robert Carr <racarr@google.com> Always assign layer when restacking special windows.

In assignAndIncreaseLayerIfNeeded we need to always
restack the special windows, even if we are stacking them
downwards, otherwise they could be left at too high of
a value from a previous pass. This check was added by
me originally, as a now revealed poorly thought out attempt
to avoid changing existing behavior too much.

Bug: 28139028
Change-Id: I305499e194f2c6bcf7a38c80af1e64bd1fc20943
d022ac21ebcb441314b80b6d8f0656939f2480e5 13-Apr-2016 Todd Kennedy <toddke@google.com> Fix parse flags

Setting PARSE_IS_SYSTEM to the parse flags happens long after the
APK is actually parsed. So, we fail to pick up the boot aware and
protected storage attributes. Instead, always pull them from the
manifest, but, remove the flags if the package is not actually a
system package.

Also, we were incorrectly skipping certificate verification if
the flag PARSE_IS_SYSTEM was set. However, this flag is used for
_any_ system package -- whether it's physically on /system or if
it's an unbundled update. Instead, we should only skip this step
if the flag PARSE_IS_SYSTEM_DIR. We can implicitly trust any
APK actually stored in /system.

On a different note ... At some point, we will break apart the
parse flags into actual parse flags [i.e. those that change
physically parsing an APK] and policy flags [i.e. those that
change the interpretation of the APK contents].

Bug: 28116074
Bug: 28088617
Change-Id: I85246b0cb18fb5647df3618107910e288137fbc7
fbbeb3e54a73e0fa7dbd5c2c1093705e69ae27da 15-Apr-2016 Donghyun Cho <donghyun@google.com> CEC: Remove listener records only if they are currently used

HdmiControlService manages listeners in listener record instances, and
remove them when binders become disconnected. However, if the listener
and its record are replaced due to new listener, the record for the new
listener should not be set as null by previous binder's disconnection

Bug: 28069465
Change-Id: I2984d8f93d6443048cf5d3f2988b3c6cf362f012
(cherry picked from commit f5c2a1f58dc95b9800ffb6ebf405c11acc6626b2)
1c685d2a2b4fe8b5c2b31b7c53aa8455fc1530ee 15-Apr-2016 Makoto Onuki <omakoto@google.com> Merge "Remove all icon bitmaps when a publisher is uninstalled." into nyc-dev
3646cbdfe77ff37475259b39171aa49686c5501a 13-Apr-2016 Amith Yamasani <yamasani@google.com> Update interface quota on the handler

This avoids making expensive netd calls while holding the mRulesLock

Doesn't fix the problem of turning on hotspot while WiFi was connected.
It is no longer blocked on isNetworkMetered() call though.

Partial fix for following bugs...
Bug: 27857665
Bug: 28201280
Change-Id: I62f3c0b0571292cc1e156b48ce3329def41cdd07
23abc598a5bdeb5d1cf66f83ff14eb3f440d5a9a 15-Apr-2016 Benjamin Franz <bfranz@google.com> Merge "Don't show the unlock notification when Work mode is off" into nyc-dev
2f4c2299c7ef4b9d604b9833c790a7afd2ed75af 15-Apr-2016 Benjamin Franz <bfranz@google.com> Merge "Maybe decrypt user when quiet mode is disabled" into nyc-dev
19c2a57c24fa337030ff31867380b685e9a5b586 15-Apr-2016 Rubin Xu <rubinxu@google.com> Remove MANAGED_PROFILE_AVAILABILITY_CHANGED broadcast

Bug: 27532254
Change-Id: Iaca17355d3ec75fa09c36a5353f40d678cc2c812
a4c0b1de1a33219b4f8ef1cdfc4e7641ac246f4b 15-Apr-2016 Ricky Wai <rickywai@google.com> Merge "Fix cannot unlock keyguard when work challege is unified and work mode is off" into nyc-dev
f02420c5e1bcc8b2c278f272aca633fe6d2b4e88 04-Apr-2016 Benjamin Franz <bfranz@google.com> Maybe decrypt user when quiet mode is disabled

When quiet mode is disabled for a user and that user is not currently
decrypted, we show a confirm credentials screen to trigger decryption
of that user. Only if that was successful, do we actually disable quiet

Bug: 27764124
Change-Id: Ib1f649194d89e225dad62c14f3ddba1fa3d79da2
46dc79cecf2daf1a0e1ec392c56fcb4f7c7a8eaf 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Metrics logging for DNS queries." into nyc-dev
428fdd104c6877889da1af2d35af41d5c14833c9 15-Apr-2016 Nicolas Prévot <nprevot@google.com> Merge "Call notifyLockedProfile in TrustManagerService instead of KeyguardViewMediator." into nyc-dev
f6ef828a7495be3bfe767ad0bb67ad155c6101de 14-Apr-2016 Ricky Wai <rickywai@google.com> Fix cannot unlock keyguard when work challege is unified and work mode is off

Bug: 28138657
Change-Id: I20e2f571d9ac76c0cd92251de7e068f6c7fb3367
43724734d76c900fba9a004e28ff0ea4bd9d07ec 12-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Metrics logging for DNS queries.

Bug: 28204408
Change-Id: I05fc9b580aa20d99e8766057e17a38b5eb6267e8
bb9fb194f85225fcf0360fc53da51f12a649bd1b 15-Apr-2016 Rob Carr <racarr@google.com> Merge changes Id603816c,I86e41324,I025d0558,I44d8dbac,Iabfc2e81, ... into nyc-dev

* changes:
Only set mResizedWhileNotDragResizing for base windows.
Fix Task dim with docked resize.
Correct window replacement string comparison.
Replace DimLayers with windows.
Prevent premature window replacement.
Correctly prevent entrance animation for replacing windows.
Replace secondary app windows across activity relaunch.
b6ccae999fe285eb9c0c17ca88c271046afdfc20 13-Apr-2016 Craig Donner <cdonner@google.com> Fix VR mode handling when the screen blanks and unblanks.

When blanking the screen, turn off VR mode if it's enabled, and when waking up
after the keyboard goes away, turn it on if the top activity has requested VR

Bug: 26751056
Change-Id: Ib57b1c59e083e3615a02408d922c8c7be645ce92
5981b8c2e8f6363d1f3bf09e7f1b3b5fb9a3846a 15-Apr-2016 Andrii Kulian <akulian@google.com> Merge "Remember task which is being locked" into nyc-dev
ff71d20ff357a33c30e1e3b474e51ad47d5c5d3a 14-Apr-2016 Jorim Jaggi <jjaggi@google.com> Put windows into resizing during IME adjust animation

Because the IME animates in with translucency there was a black hole
visible at the bottom. This CL puts the window into resizing mode,
waits until the change is commited, and then starts the animation

Bug: 28175599
Change-Id: Ib31c1e765639e5490208bccba77b25318ec8dc71
698e7634aa2ced554f564f588c2e878fb35757a3 14-Apr-2016 Jorim Jaggi <jjaggi@google.com> Disable resize when IME is adjusted

Bug: 28175599
Change-Id: I338dd230443973d912f17946ed722789b0f545a2
eb88d83fc5da8ea05033c03bbb9f0d4b804ba162 14-Apr-2016 Jorim Jaggi <jjaggi@google.com> Add nice animation when adjusting for IME in multi-window

- Run a separate animation when we need to adjust for the IME. We
can't use the attached animation because the adjustment animation
needs to be longer than the IME animation.
- Also run an animation when IME is disappearing.
- Adjust IME exit animation to better match with adjustment exit
- Make sure to update adjust for IME when entry/exit animation of
IME is starting, to avoid flickers.
- Don't update the IME window in PhoneWindowManager for layout
until the animation has started. This lead to an issue where the
content inset was set too large too early.

Bug: 27154882
Bug: 28175599
Change-Id: I09a33413e307f84d6c3cf4ae928c280f7ad48348
be67c90f4c2255cab3bc036ecdc8d9636ed5e4b5 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> Don't log transition time if no process switch

If the process of an activity that is launching has another
non-stopped activity, the data is not that interesting,
so remove the logging in these cases.

Bug: 27295491
Change-Id: I65d4a0e01b1e634a589ce8ecbbab337f0e6497ca
0f051f5abdb31024d862a954cc4c4716b1dde616 14-Apr-2016 Andrii Kulian <akulian@google.com> Remember task which is being locked

We need to remember task which requested to be locked
because we can accidentally lock another task after
user interacts with pinning request dialog.

Bug: 27876860
Change-Id: Ie8e607df4380dd33ea9b3474afc247b02e31de07
f6f24c03f39016ee927e8bdbcff75a53841829c8 15-Apr-2016 Pavel Zhamaitsiak <pavelz@google.com> Make ConnectivityMetricsLogger and related classes @SystemApi

Bug: 25691077
Change-Id: Ia98d0a52a9541d9ae773be2b0e962d609f9dd7ee
e484eaff00096f3819c5002b66487b8c1d16ef57 14-Apr-2016 Jim Miller <jaggies@google.com> Fix missing permission check when saving pattern/password

Fixes bug 28163930

Change-Id: Ic98ef20933b352159b88fdef331e83e9ef6e1f20
f2abc9d299f74a73010d0543e27215980555382f 15-Apr-2016 Jim Miller <jaggies@google.com> Merge "Temporarily increase timeout for devices with buggy driver" into nyc-dev
93d828de59986a990bfd2fffcfc399deae5ba6ba 15-Apr-2016 Jim Miller <jaggies@google.com> Temporarily increase timeout for devices with buggy driver

Some devices don't properly respond to cancel() which must
return a cancel notification. This workaround shortens the
timeout for those devices so they're functional until
this is fixed.

Workaround for bug 28201240

Change-Id: I9a5b41e400c217444b8df97ebee2b60f5b879d76
fd950bd6ff659f87fd87dd435207899bac65d991 15-Apr-2016 Rob Carr <racarr@google.com> Merge "Synchronize future unsync transactions to last sync." into nyc-dev
dd3d44faf9d74a793458a515fddf153432601dd6 14-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix configuration calculation in multi-window

Bug: 27975877
Change-Id: I97dcbe7570fe2fdb82dafef8a07fe7351d901704
952050539c991fcf58cd1f336193aa04890ad0a3 15-Apr-2016 Jim Miller <jaggies@google.com> Merge "Fix bug where fingerprint events can be delivered to the wrong client" into nyc-dev
de16f96c7e66b7a643ecc7b6c1a8fb70737f5250 15-Apr-2016 Winson Chung <winsonc@google.com> Merge "Take app screenshots in 565." into nyc-dev
cb2ce6f1f0deef80943ece093ae40bacc1f57c44 14-Apr-2016 Jim Miller <jaggies@google.com> Fix bug where fingerprint events can be delivered to the wrong client

- Make FingerprintService more closely track the expected state of fingerprintd.
- Don't switch to a new operation until fingerprintd completes previous operation.
- Refactor clients into separate classes and add tracking logic.
- Add missing enumerate()/cancelEnumeration() methods to IFingerprintDaemon
- Make late-binding decision of "foregroundness" of activity so that it's
decided in the order the events are actually handled.
- Add more logging so we can determine FingerprintService state when errors occur.
- Cache a copy of authenticator_id from the last time it was set so we don't
interrupt the driver during actual authentication.
- Don't allow clients to access authenticator_id unless they're current.

Fixes: 27902478, 26273819
Change-Id: Ic1f9e30bd89bcdbb8fe7f69e0545e68339317721
0033b2a190feeda8b41dd62b489aca3a19a09d5b 15-Apr-2016 Makoto Onuki <omakoto@google.com> Remove all icon bitmaps when a publisher is uninstalled.

- Also show the directory sizes on dumpsys.

Bug 28196831

Change-Id: I3202fcd3151da3b26b436732e8103caf93aba525
f3323287438c743ec3704a1d3de9c8279a44eb80 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensure sane WallpaperData" into nyc-dev
eb3cbd82ee223a2c96be843c7eecba991e170c52 15-Apr-2016 Chong Zhang <chz@google.com> Merge "Fix crash due to null uri in ContentObserver.onChange" into nyc-dev
e34279035acf43e23172960503e6380dc8037e50 14-Apr-2016 Chong Zhang <chz@google.com> Fix crash due to null uri in ContentObserver.onChange

Also make sure we don't respond to unrecognized changes.

bug: 27291666
Change-Id: I110445231d15427e1fe9e225ed0520af262f740e
a5fdde9d15fbdf1aaeb61e1cf0c128af3aeb7b67 15-Apr-2016 Winson <winsonc@google.com> Take app screenshots in 565.

- Or to be specific, SurfaceFlinger can’t easily take 565 screenshots,
so convert them when creating the ashmem bitmap.

Bug: 28151300
Change-Id: Ic7586659a41cc19c322136f77a1c52ef68c22707
469caae9ea03c8f4261b8fd6df25aa20b3647e9a 22-Mar-2016 Sriram Viswanathan <tvsriram@google.com> Disable recents button in carmode inside of NavigationBarView,
instead of doing it from PhoneWindowManager, which doesnt maintain
the mUiMode properly and in sync with that in the UiModeManager.
In addition the re-layout / modifications in the content of the
navigation bar in care mode are better consolidated in one place
instead of many places.

Bug: 27313462

Change-Id: I1bdc2324f649f19f879b71c695381587561498e9
b5dd049089a8c62efea445be9abd1f476fbf1ab9 14-Apr-2016 Muyuan Li <muyuanli@google.com> Fixes a bug in shortcut key.

All shortcut keys that are dispatched to listeners will be checked
against user provisioning status. Only if user setup is complete will
the listeners receive shortcut keys.

Bug: 28192375
Change-Id: Iecc5a21a40d07bdc4f71d1a36187cca4a5b30bde
(cherry picked from commit f0667f077f66ba3e58387f7570dd82a26aaed7b8)
98e46791d5e636abc0346e8687e864a73eac9943 14-Apr-2016 Andy Hung <hunga@google.com> Merge "Unify dumped native stack traces" into nyc-dev
c28e3a93ff01a809bcfa5bb78e3358f926a09879 14-Apr-2016 Adrian Roos <roosa@google.com> Ensure sane WallpaperData

Also adds dumpsys output for lock wallpapers.

Fixes: 28192320
Change-Id: I66ccf8afad7412ae346e7cc02d030c2fdda97753
c180d68a079ed02999c6015401c6f99c87005855 14-Apr-2016 Hui Shu <hush@google.com> Merge "Cache the parsed result of WebView provider config xml" into nyc-dev
27c0e70223cafb91e62f2722c12c23dbec498bd5 14-Apr-2016 Felipe Leme <felipeal@google.com> Merge "Fixed initial metered state of new policy." into nyc-dev
02e9214ed603296c5ef7df68c4bb78de58d03e7a 14-Apr-2016 Felipe Leme <felipeal@google.com> Fixed initial metered state of new policy.

BUG: 27808364
Change-Id: I33d45a971c66623bcd94ebe95e84fb852308d8ea
0d723a2a4d83db5f01aa5a21f3cbd9d2b608bced 14-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Multi-window assist callback" into nyc-dev
9455bd0105f974de3d1164890353c2a0d0605840 08-Apr-2016 Hui Shu <hush@google.com> Cache the parsed result of WebView provider config xml

BUG: 27736084
Change-Id: I3665a5fd4777d22c6f217b358195edbeaad3bb1d
4f9ad451e0862d99304f68bbca17cdcfbc347692 14-Apr-2016 Gustav Sennton <gsennton@google.com> Merge "Fix the behaviour for explicitly switching WebView provider" into nyc-dev
b33daec8c2e9e12cdb9c7e5db388656fd8aff98f 14-Apr-2016 Rob Carr <racarr@google.com> Merge "Add WindowManager side timeout for toasts." into nyc-dev
95f7e8e06dd0003a813f7a4b3c718c68d0fa4a01 14-Apr-2016 Gustav Sennton <gsennton@google.com> Fix the behaviour for explicitly switching WebView provider

Before this CL when we tried to change WebView provider through the Dev
setting and failed we would then have the setting point to the provider
used before the change. With this CL we instead let the setting point to
the intended target but also switch to the package which the
WebViewUpdateService see as most fit (rather than just reverting back to
the original choice).

Add unit tests to verify we kill processes depending on WebView
packages when switching WebView provider.

Add unit tests to ensure we can recover from trying to change provider
when there are no providers available.

Bug: 27673076
Bug: 27635535
Change-Id: Ie7bb6afdf8acf4344cfb363947929c0b492775fb
d28967f489996d1d74ff5c0bbb9c19d158efbf37 14-Apr-2016 Julia Reynolds <juliacr@google.com> Phone call vibrate should obey user preference.

Bug: 27353237
Change-Id: I6b52e378c9e664600720025af30596be09aeb19d
dbf4481cc3eea106992df2ac145269ab737b2f24 14-Apr-2016 Julia Reynolds <juliacr@google.com> Adjustment bundles are defusable.

Bug: 28168811
Change-Id: I1699e6bfd03a5f117cc89585c03e235fe6a99456
c662898a182ca8f13d73b71649feeeeceb574edd 14-Apr-2016 Nicolas Prevot <nprevot@google.com> Call notifyLockedProfile in TrustManagerService instead of KeyguardViewMediator.

Setting the profile as locked is not synchronous.
In some cases, KeyguardViewMediator called notifyLockedProfile before
TrustManagerService had actually marked the profile as locked.


Change-Id: Ic2ad302c74806ae368d56050eb31503a8ef0bd38
45e2966da9f81077777bb6df61e9a880790741ec 14-Apr-2016 Gustav Sennton <gsennton@google.com> Merge "Update persistent WebView packages setting only when user changes it." into nyc-dev
f014c74ec4070f1c903bbb8ac82d80b2ddbfe306 14-Apr-2016 Gustav Sennton <gsennton@google.com> Merge "Ensure at least one default-available webview package is a non-fallback" into nyc-dev
48f12f2ad6e59484f528978ce3627c16be3bf10d 14-Apr-2016 Erik Kline <ek@google.com> Also log IPv4 and IPv6 connectivity of any previous default network

Change-Id: I07595c0a131fea21914f524949cd64af87403b88
1feca76bd48008aa3421c8741cb147ecc1a6e912 14-Apr-2016 Pierre Imai <imaipi@google.com> Merge changes Ia71865a9,I40b6de54 into nyc-dev

* changes:
Log an event whenever we lose the default network.
Record the transport types for connectivity events.
04e22225a7d98cc8fc6bced71c89192e0cefc84b 12-Apr-2016 Pierre Imai <imaipi@google.com> Log an event whenever we lose the default network.

Change-Id: Ia71865a90b2db5dc0d3ad627563a6b1f99686f04
6b4e15b1558e13cb9d9b3975412c4c6bda6e0c37 06-Apr-2016 Pierre Imai <imaipi@google.com> Record the transport types for connectivity events.

BUG: 25691077
Change-Id: I40b6de5446325e717c0356603fd66cd395db9acb
37ce0221891a3c38f23a3f713111ee921385e931 14-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28156248: Receiving connectivity receiver..." into nyc-dev
015e42aef65509270462e3f8e6b165a39d3e37fa 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Limit don't dispatch when non-interactive and the display is off to watches" into nyc-dev
689574ad4a3cebe5ad6993621fa19554fb392674 14-Apr-2016 Andy Hung <hunga@google.com> Unify dumped native stack traces

Bug: 28179196
Change-Id: I96a8c0c2ec1a7d4c569a8788e1f6f8ac6a6a1bcc
a9c2500a6863dabdd786f17a25ce0bf3683109a2 14-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Disallow disable of the system shared libs.


Change-Id: If731f2d90312a083bb940f83431ba3eccf213947
6b15ea5cea58e7b35e8ee6e751250e2670f6887e 04-Apr-2016 Wale Ogunwale <ogunwale@google.com> Limit don't dispatch when non-interactive and the display is off to watches

We still want to dispatch input for non-watch devices when the non-interactive
and the display is off.

Bug: 26277593
Change-Id: I38023b3494e46c63578dd3162e2b9aa0a213862d
2cde05c3bb9267ba6be456af43b0b0710a06c6ea 14-Apr-2016 Carlos Valdivia <carlosvaldivia@google.com> Merge "Improve CryptoHelper" into nyc-dev
0e5da8c50681e4cc8693d885c5f4e89f3b039f07 14-Apr-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28156248: Receiving connectivity receiver...

...broadcasts in Android N


Change-Id: I91ae6d3993e5e295965d8825e07993e67d10b357
577672966cf466db37e6af1e383111de008154a3 14-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "Allow notification listeners full DND access." into nyc-dev
e8222e551f8abd2d82ca4f77ddb275e2e509751e 09-Apr-2016 Amith Yamasani <yamasani@google.com> Multi-window assist callback

Introducing a new callback in VoiceInteractionSession to
provide assist data for additional activities in the
foreground in a multiwindow setup.

PIP, docked windows and free-form windows (top-most)
will be queried for assist data and passed through the
new API to the Voice Interaction service.

Bug: 27718385

Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
c142a8c43fa7d1b6c9d797e044060755d9ecfcd6 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "StrongAuthTracker: Don't rely on USER_PRESENT" into nyc-dev
766b28329326628eaf1ef8009ebd5d611369c490 07-Apr-2016 Carlos Valdivia <carlosvaldivia@google.com> Improve CryptoHelper

No longer reuses IV, also stops using SecretKeySpec's, and leaves it to
the Cipher to create the IV.

Bug: 27579433
Change-Id: I11a1cbf525146495fb4209ec6606223a6b15b7bc
ceeb44daf9fcd2b78a4f64d3b0d4f709b093e3c2 14-Apr-2016 Lifu Tang <lifu@google.com> Merge "Fixed bugs when deliver GnssMeasurement from N-HAL" into nyc-dev
9e31b3fd817aed28d9afd712fa49ec9d6fc11329 14-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "More work on issue #26390151: Add new JobScheduler API..." into nyc-dev
4ab7e595a5deef72448da950f2f973bc0c90fe18 14-Apr-2016 Adrian Roos <roosa@google.com> StrongAuthTracker: Don't rely on USER_PRESENT

USER_PRESENT is sent via the background queue. A delay
there can cause us not to recognize that the user has
unlocked and prompt for the credential again, when trust
or fingerprint would be sufficient.

Also removes an obsolete reference to USER_PRESENT from

Change-Id: Ie8d1a180170df5f0c8f9e71660504fd71eeacd99
Fixes: 27830458
2d135ab150e5bf87f321ad8695a61c1c9d658b3b 14-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Bind wallpaper at later boot phase." into nyc-dev
383f9fedd6c3423d7a8abed21151a89808fa0fab 14-Apr-2016 Jeff Sharkey <jsharkey@android.com> Bind wallpaper at later boot phase.

We need to wait until third-party apps can start before we try
binding to the wallpaper.

Bug: 28166684
Change-Id: I6ef559a667104e830e97da68b437ff592816f6f3
70f0d229c02b91d7b987c4972b9b08bb9dcd04b5 11-Apr-2016 Robert Carr <racarr@google.com> Add WindowManager side timeout for toasts.

If the thread a toast is shown on is shut down,
the attempt to post the hide message to it's handler
will fail and it will never request removal. If this was
only some application background thread we will also not
receive a death notification. It seems best to use a timeout
to ensure we don't need the clients cooperation, espescially
as toasts can keep the screen on.

Bug: 21693547
Change-Id: I1d6e54ded5b9e2050daedc4d263e2e21fbe69862
adf85cac3acc6f132c15b0f05d902a12f5777e38 13-Apr-2016 Jorim Jaggi <jjaggi@google.com> Trace screenshotApplications

Bug: 27864285
Change-Id: I5b2b84e5369d136af5057bbfadc3fe4e9b38ab30
6e839b006e102b4c2d9f495fe0551e7668dae61e 13-Apr-2016 Julia Reynolds <juliacr@google.com> Allow notification listeners full DND access.

Bug: 27976092
Change-Id: I15da87f4b6a17e43ced80ea473288b43d20195d8
a28e8cc50ffa37cd739518b34985e21ca88466d8 09-Apr-2016 Jorim Jaggi <jjaggi@google.com> Do not transfer starting window to translucent activity

When starting the "App may not work in split-screen" activity which
is translucent we used to transfer the starting window, and then the
frame was drawn quickly so the starting window from the behind was
removed, leading to a black hole.

Bug: 28094732
Change-Id: I828f0ea8b0465a5a113fd76a82d33177c8faa566
1e79be9f0a6595cfd3cfadb272e2692197098767 13-Apr-2016 Daniel Sandler <dsandler@android.com> Merge "Fix NPE when the vr manager isn't around at first." into nyc-dev
2c17cd254ba334462265c7b55938a7531545b2d3 09-Apr-2016 Robert Carr <racarr@google.com> Only set mResizedWhileNotDragResizing for base windows.

Dialogs, etc, may appear to not be drag resizing as they are not base
windows. Still though, when they resize we don't want them to enter
in to this mResizedWhileNotDragResizing mode or we will freeze
surface boundary updates and lose the ability to crop them to the stack.

Bug: 26668339
Change-Id: Id603816cf5f33b281f46c7812779ba29a024f34f
a86a6bf73e8f6e58590c1b53972cd2d1cc7c137f 09-Apr-2016 Robert Carr <racarr@google.com> Fix Task dim with docked resize.

When are are docked resizing, just fake
the task bounds as the stack bounds for the purposes
of DimLayers, even if we don't want to relayout the
application interactively we want the DimLayer to keep
up with the divider.

Bug: 28154322
Change-Id: I86e41324cf384f2dceea15cd5e8ddd753dc5bfbd
8bc8907ef142b4d60c1728f20cf18836833f1aad 08-Apr-2016 Robert Carr <racarr@google.com> Correct window replacement string comparison.

We were comparing the objects, not the strings, which happened
to work in many cases as they were both the same package name String.

Bug: 26668339
Change-Id: I025d05586cc6c11e788add967c7e6ad916cba276
9fe459da7ee3fd462a646b638f647c917c229eb4 08-Apr-2016 Robert Carr <racarr@google.com> Replace DimLayers with windows.

When replacing windows seamlessly we should also
replace their DimLayers.

Bug: 26668339
Change-Id: I44d8dbacf1b2213cfb882a40a1c878666a1ebef0
dcdca58cd5eb60a32de583eda5a334eb17f38034 08-Apr-2016 Robert Carr <racarr@google.com> Prevent premature window replacement.

maybeRemoveReplacedWindows is called when any window
has reported drawing, we have to verify that we have
actually ourselves drawn, before commencing the replacement.

Bug: 26668339
Change-Id: Iabfc2e813989381f9f20f3bb111100911405686b
b439a63fdf9398e46ca44811fbfde35fd02911c4 08-Apr-2016 Robert Carr <racarr@google.com> Correctly prevent entrance animation for replacing windows.

Prevention of entrance animation for seamlessly replacing windows,
was not working for non child windows. To correct it, we simply bail
from applying the app entrance transition.

Bug: 26668339
Change-Id: I4349e6aef55c3957d81a0a168cf6ac1d7c8866f1
96635bd0561172e7fd711bcb191a21205c6ce43e 25-Mar-2016 Mike Cailean <mcailean@codeaurora.org> Fixed bugs when deliver GnssMeasurement from N-HAL

There're two major problems that prevents GnssMeasurement from N-HAL from
delivering to Java-side correct:

1. The size check of HAL-provided GnssData is wrong. So native code rejects all
valid GnssData.

2. The svid's data type is different between HAL-side and Java-side. Therefore
an explicit type casting is required.

This CL fixes those problems, together with a few typo fixes.

Bug: 28169973
Change-Id: Id0c2cc120387970564b840cfcbdcb6f329c7e543
bae147f174116dab43d7fb50179a9c8b213c6089 13-Apr-2016 Andrii Kulian <akulian@google.com> Merge "Make task fullscreen when locked" into nyc-dev
4c13596fd0732b1d3708dc87e0247035977b658e 13-Apr-2016 Chong Zhang <chz@google.com> Merge "Add ContentObserver for animation scale changes" into nyc-dev
8db0fc15b85c6501a0418b17edee2d9c447b408a 12-Apr-2016 Dianne Hackborn <hackbod@google.com> More work on issue #26390151: Add new JobScheduler API...

...for monitoring content providers

We now have some delays before reporting URI changes, to allow
them to batch together.

Also clean up debug output, and fix some issues with how we
were managing the content observer state.

And while I am here, fix the device idle and app idle controllers
to no longer maintain their own list of jobs, but just directly
iterate over the JobStore.

Change-Id: If3fdff23c00c2f1b99901a9be096d851562d3439
e3f617b23f202e11d4ee67d322609ee7b07b11bb 13-Apr-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28035090: Disallow abuse of JobScheduler" into nyc-dev
807de78c072c5a40be7b12c656d641d9e73741d2 08-Apr-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28035090: Disallow abuse of JobScheduler

We now keep track of how long each app has been running a job
for, in 30 minute batches. If it is running jobs frequently,
we will bump down the priority its jobs run at to allow other
jobs to run before it.

Currently we count both pending and active as the job running,
which means that an app that has jobs waiting in the pending
queue will count against its abuse prevention. This could
allow starvation -- if we bump down the priority of an app's
jobs and the system is so busy continually that they sit
in the pending queue a lot -- it could never recover. But I
think that is okay... if we are really in a state where we
are continually running as many jobs as possible, we probably
have other larger issues.

Change-Id: I838aa4b5840e91df49a1e17b53188d6e4a66a6d1
4661e816e7997cab865f1b456b2dab924bcdbcda 13-Apr-2016 Chong Zhang <chz@google.com> Add ContentObserver for animation scale changes

bug: 27291666

Change-Id: Ic80af9d1cb0c58fb2decbe66591e29c584384a23
3166593f4e8e7ccfdecfca010fd8d22b5e219487 13-Apr-2016 Dan Sandler <dsandler@android.com> Fix NPE when the vr manager isn't around at first.

There's a race condition when grabbing the VR service during
ImmersiveModeConfirmation's constructor since the window
manager allocates the ImmersiveModeConfirmation in its own
init(); vr may still be starting up at that time.

Change-Id: Ic0aa0fbf8fd087f01f4690c14e1c68f0670b0bc0
Fixes: 28159168
3fb1c81394f98b025b488774916b7580f9e31dab 13-Apr-2016 Wale Ogunwale <ogunwale@google.com> Merge changes Ieefeb843,Ic2a94b09 into nyc-dev

* changes:
Update surface insets on window elevation changes.
Fixed bug with cropping out drop shadow for pinned stack.
e502345d7104a719b11f11973955b70e2778422d 13-Apr-2016 David Brazdil <dbrazdil@google.com> Merge "Remove UsageStats post-OTA package update filter" into nyc-dev
bf705b4aae2d77d7c0d23e23e9ded34788994645 13-Apr-2016 Rebecca Silberstein <silberst@google.com> Merge "Add error logging for softap commands" into nyc-dev
c0bc993801ae1296c8338b5fd971743309fde924 13-Apr-2016 Gustav Sennton <gsennton@google.com> Ensure at least one default-available webview package is a non-fallback

Parts of the WebViewUpdateService code assume that there exists at
least one webview package which is available by default and is not a
fallback package. With this CL we enforce this assumption by crashing
when parsing the webview packages config file if it doesn't hold.

Bug: 28014401
Change-Id: Ib7de1f596e31bae65542a6883a9f3af54337bf1b
4ef1982af8f6669b6ab0ea2468f63503bc3453c5 13-Apr-2016 David Brazdil <dbrazdil@google.com> Remove UsageStats post-OTA package update filter

Filtering packages for boot-time post-OTA update with
UsageStatsManager idleness API is too aggressive and leaves out even
apps used heavily in the foreground. Remove for now.

Bug: 27902702
Bug: 28161327

Change-Id: I7912f9ad5d8c6206c19068a76383e370d24818db
a9159040c86d94f7a3d45bdc7fe6c4ea24f58456 11-Apr-2016 Gustav Sennton <gsennton@google.com> Update persistent WebView packages setting only when user changes it.

To ensure that we don't permanently change WebView implementation if the
current package is temporarily uninstalled (e.g. when being replaced) we
don't update our persistent setting unless the user explicitly changes
WebView implementation (and on boot!).

Unfortunately this will means that the Dev Setting for changing WebView
implementation will work in a slightly less intuitive way. The
persistent setting is now persistent across uninstalls and installs.
I.e. the Dev Setting shows the current WebView implementation though
that could differ to the value chosen by the user since the package
chosen by the user could be uninstalled or disabled. In this case
installing/enabling that package would again make the Dev Setting point
to it.
However, as a compromise, we do change the setting at boot so that if
the currently chosen package is not valid we will change the setting so
that it points to the package we currently use instead.

Also ensure we only use WebView packages that are available-by-default
if no WebView packages are enabled.

Add unit test to ensure that if a user-chosen provider is uninstalled we
switch back to using that provider when it is installed again.
Add unit test to ensure we switch user-chosen provider at boot if the
chosen one is uninstalled.

Bug: 27673076
Change-Id: Icd27ae302798ebf695b9ef4bd4d5fd47fe4be02c
5352dda479452c248f87521d6c69c9dd8399ebb7 13-Apr-2016 Gustav Sennton <gsennton@google.com> Merge "Don't run the WebView preparation if using the same non-replaced package" into nyc-dev
9e5922cf73d32077587bf74c7a086b0d3274da16 13-Apr-2016 Nick Kralevich <nnk@google.com> Merge "change directory name" into nyc-dev
e91dba06f9240451510a4542c463ef9d2cdb1f42 13-Apr-2016 Nick Kralevich <nnk@google.com> change directory name

external/sepolicy was renamed system/sepolicy

Change-Id: Id27cd8c22d966958e481c9ed0171f637b3ffe2c0
eadbe1db7574ea037e3b0a644031bca114421155 13-Apr-2016 Rubin Xu <rubinxu@google.com> Merge "Remove temporary workaround of restoring periodic syncs." into nyc-dev
fc5f9f512752ccf72707cc59927ad31f7828e1ec 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't kill apps when only clearing caches." into nyc-dev
c27916642d59c9d13a5e33019871149971e5fe57 13-Apr-2016 Andrii Kulian <akulian@google.com> Make task fullscreen when locked

Previously if we were in multi-window mode and some task called
startLockTask() or kiosk mode was started - other tasks remained
on screen. User could still interact with other tasks, locked or
pinned task could be removed.
This CL makes tasks move to fullscreen when they are locked.

Bug: 27876860
Change-Id: I547a94be50276c7f418343600877e51b6b40c7a7
aceda5b93a01a93c88fc37334ca03b2bb74c71e9 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make wallpapers direct-boot aware." into nyc-dev
a74888ddf6657b41aed28dff0b0b1d47a80f107f 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "TRON refinements for multi-window" into nyc-dev
7b6c731fd83d9dbb5b42021ac42f8164b64dbacc 13-Apr-2016 Jeff Sharkey <jsharkey@android.com> Don't kill apps when only clearing caches.

Bug: 28152575
Change-Id: I469e87a75ce7ce6ddfeb934e00f8087cddcaa30a
1cab76af8537a275d1af38d25f5692a68e48eed6 13-Apr-2016 Jeff Sharkey <jsharkey@android.com> Make wallpapers direct-boot aware.

If the user's wallpaper isn't direct-boot aware, wait around for
the user to be unlocked, instead of clearing the wallpaper.

Also switch a few classes to using SystemService lifecycle, since
events are dispatched faster than through broadcasts. Fix bug where
ContentService.systemReady() was never called, and make sure
EntropyMixer doesn't risk being GC'ed.

Bug: 26280055
Change-Id: I9fff468a439b868baa68cf11bb6ee9f7d52b7b5a
0a6a6dbe9107a3e31d74293f853b46ae0e5b9e7b 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added api to delete cache files for a given user" into nyc-dev
29379ec859bf7118dec9f3248c63ee369218ad6b 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> TRON refinements for multi-window

Bug: 26013430
Change-Id: I89b139b4ca3e7b6a06d8b5b351d67ffac240f73f
4196ab00e3f781f0a22636db8f5df5031a3a48fa 13-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Fix calculation of content insets" into nyc-dev
656f6506fbbee34f2f66f013702ad860b738a73a 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix calculation of content insets

When calculating all the frames and insets, we need to use the actual
frame instead of layoutContainingFrame. To do this, we layout mFrame
with layoutContaining/layoutDisplayFrame, calculate all the content
frames and insets, and then offset everything by the constant offset.

Bug: 28075359
Change-Id: I78f0a54ca2a0cc6c7c8be21153c2b2c8f1d5c0a9
d1a010f279447bbf2b186e4c24ff6bdb8ecedbf0 08-Apr-2016 Robert Carr <racarr@google.com> Replace secondary app windows across activity relaunch.

are not child windows in the sense of SurfaceView, etc, as they are
independent windows like Modal Dialogs rather than embedded parts
of other windows. Still though, we expect them to reappear following
activity relaunch, and they won't be covered by window preservation,
so we need to mark them for replacement.

Bug: 26668339
Change-Id: I652b4137085f6ef4d6c9d54de609727f966ef4d6
f0ad384e9ede428486004536d5f7b1967d2b32e1 13-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "No input for windows in minimized docked stack" into nyc-dev
3395ed142165dd3c5c52a2d2f07449fa5d78aba4 13-Apr-2016 Lorenzo Colitti <lorenzo@google.com> Merge "If we want to release the lock, release instead of acquiring it." into nyc-dev
b72c9ad721e5ff5b9d5a45ca4ba2608940815388 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> No input for windows in minimized docked stack

Also make them unfocusable, and don't focus the docked
stack when tapping into it in that state.

Bug: 27972642
Change-Id: Ic24ff9a5f39f596fe4a2f50567566d4400f9c125
a5df489c9c56b1ac5b0f1acef07454ea438b5367 13-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Add shadow for minimized dock" into nyc-dev
2917dc4918ab2061f6cab3d181d19ea8375df9f6 11-Apr-2016 Jorim Jaggi <jjaggi@google.com> Add shadow for minimized dock

Bug: 27972642
Change-Id: Ic4c8145f61694ff2bb0e237da1142093c6a4d965
3e6a6fc60ea78994298ff38cfe7230faf24fe6b7 13-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "If Internet probe is redirected, pass redirect destination to NetworkAgent." into nyc-dev
78c9eb8947538f63d2e06684663d400991dfff8f 13-Apr-2016 Suprabh Shukla <suprabh@google.com> Added api to delete cache files for a given user

Added an api to delete application cache files for a specific user. This
allows settings to clear cache files for work profile apps as well.

Bug: b/25338468
Change-Id: I52d4944a7a03b6d63ad44dd6bb868aec62815eab
5961ab3ac5d64473d3224eb6c11563c347df178b 13-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "Remove category from managedservices." into nyc-dev
2376f9d35f43db645a3f043cdfaa2f4fd3e27640 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't count system partition code against size." into nyc-dev
d1b8d6d342d049e00d9a304c291c6c024aa3c0a0 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Set label for links to resolver activities." into nyc-dev
d7e1d429c49c2925d921878d26250afc3e862888 13-Apr-2016 Lifu Tang <lifu@google.com> Merge "Removed all the references to deprecated class" into nyc-dev
f8173ca8ac0efef39c79d732fd9eee80d1066302 13-Apr-2016 Philip P. Moltmann <moltmann@google.com> Set label for links to resolver activities.

Also: Add specific labels for capture-image-intent.

Fixes: 20134921
Change-Id: I3678def1089512a8340f19110645a03379c26cee
1d616f0d880d0a4109e811221f3c3ff2e016013b 13-Apr-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManager: Address API review feedback." into nyc-dev
959586b9a9ca96a70c2232af0f99696a369d1b1d 13-Apr-2016 Jeff Sharkey <jsharkey@android.com> Don't count system partition code against size.

Bug: 28136734
Change-Id: I2b843b13c493bbf78c2ad9dd7d75faa302e3a11b
65136ac6a4f6fb2423a0768b451782dcd0e960d5 13-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Keep read/write external storage as built-in permissions" into nyc-dev
5b49d8a00640ef2e6de953eb83a0cf81f27fa58c 12-Apr-2016 Lifu Tang <lifu@google.com> Removed all the references to deprecated class

Bug: 28144767
Change-Id: If14752a81f6662fb33aacc04d54bfee249221d74
1fe7dfa66aaf37045c62094438ab3db2ee5403c5 12-Apr-2016 Sunny Goyal <sunnygoyal@google.com> Merge "Changing LauncherApps to resolve activity by component name" into nyc-dev
39a878dbcae7a4f1400d7f61c8dac1188b9d7923 12-Apr-2016 Bryce Lee <brycelee@google.com> Merge "Properly check to see if a suppressor is present before returning it." into nyc-dev
ba3d895283ac04aee2ab3f07f0bfc8d07bfc1b51 12-Apr-2016 Bryce Lee <brycelee@google.com> Properly check to see if a suppressor is present before returning it.

Bug: 28111086
Change-Id: Ib2cde8269443832e5490906396cd95832c7a146f
dfd72d43089b3690b6093dc53cc93f5bbcc18218 12-Apr-2016 Craig Donner <cdonner@google.com> Merge "Sets COARSE_LOCATION permission for VrCore when in vr mode." into nyc-dev
09c4954cc177d3635b2885e28d02897010329372 09-Apr-2016 Jorim Jaggi <jjaggi@google.com> Make sure to report activity launch time when starting from recents

Bug: 27295491
Change-Id: I27d660ccc960610f39c72ba9bbab5963746fcd45
d7f6e7c7694305c3231a575cf709ba13075bfe48 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> Clip mWinShowWhenLocked if Keyguard is not showing

Bug: 28076605
Change-Id: I80ae6dbd09d419c258efd79639a62dce8c2fbe79
5ac2ba25ceab29a6adc1a2ca2d685678c86258d8 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix a small issue with IME adjustment

For some keyboards, display frame is the same as the fullscreen, because
the way they layout their stuff is different. In such cases, the stack
bounds were moved too far.

Bug: 28126905
Change-Id: Id3c2c8d9d16e27634006a8ef70d35d8826302da0
b6d3523dfb5d73ddda4b750a82c059cdc42acf8e 05-Apr-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: Address API review feedback.

- "delete" -> "remove"
- add/deleteDynamicShortcut() now takes a list.
- Throttling default settings is now 2 calls / hour.

- Add categories to ShortcutInfo.
- getIconResourceId() is now public

Bug 27923857
Bug 27548047

Change-Id: I8457b30e4b2f7c63ab2988648b37178fd16ea45b
321cfa379188eee7bcc54c754bd2b7eb8f0b3c8b 12-Apr-2016 Ricky Wai <rickywai@google.com> Merge "Add tests for profile keys in LockSettingsStorage" into nyc-dev
cd1e1de4cebbb8257e9ab827ab3727c7c4fe1cae 12-Apr-2016 Yohei Yukawa <yukawa@google.com> Merge "Make sure that Toast is always shown by Meta-Space." into nyc-dev
2198a53ea497739334f0b9c696c5b5077e349321 12-Apr-2016 Gustav Sennton <gsennton@google.com> Don't run the WebView preparation if using the same non-replaced package

Whenever all primary WebView packages become disabled or uninstalled the
fallback will be enabled and then used. The enabling causes an intent to
be broadcasted and that intent then causes WebViewUpdateService to rerun
its WebView preparation phase.
With this CL we ignore intents for changing the enabled-state of the
current WebView package if we will still use the same WebView package.
The only time we should rerun the preparation logic when the package
is the same (if it has the same name) is if it has been replaced by a
new version.

Bug: 27899444
Change-Id: Iea029e9f854e31b25b1803048c470fb6732e5d0f
a20e8f314f73c4fc43d33783040d2dc7612e7b75 12-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "Return everything but an autogroup summary." into nyc-dev
a3dc1fb0b7f236012fc82360c18c063bb4fc8f69 12-Apr-2016 Julia Reynolds <juliacr@google.com> Remove category from managedservices.

Bug: 27976092
Change-Id: Ic6303b95fc6d612e83f3a42a933ae94bd7c17255
4c4ad595dddef18094d69418ab9da6994e580fae 12-Apr-2016 Julia Reynolds <juliacr@google.com> Return everything but an autogroup summary.

Bug: 28132467
Change-Id: I9a6df6d3e876af00a9ef6fc8ed702ed8342c751a
9bb991a3bb95a2690483ee8783afe3982ff121c0 12-Apr-2016 Chris Wren <cwren@android.com> Merge "remove special case code for groups." into nyc-dev
ce2cb7630c94c4d394f3a12ab5fd5475f61e343c 12-Apr-2016 Gustav Sennton <gsennton@google.com> Merge "Add initial unit tests for WebViewUpdateService." into nyc-dev
064e612779b960a0694d0334851d59d1c8aaf57d 12-Apr-2016 Daniel Sandler <dsandler@android.com> Merge changes from topic 'vr-fixes' into nyc-dev

* changes:
Suppress immersive mode confirmation in VR mode.
Suppress heads-up notifications in VR mode.
8ab776cd90f6c6e8c7e63cc4960ad44cc4f2bad1 11-Apr-2016 Chris Wren <cwren@android.com> remove special case code for groups.

Once all the platforms as special, none of them will be.

Bug: 26919636
Change-Id: I70eb05126184feb2af310e71f0ffd82ab9dcebc6
53b78241ffc32e61d12afc6245633266e592db88 07-Apr-2016 Gustav Sennton <gsennton@google.com> Add initial unit tests for WebViewUpdateService.

The logic in the WebViewUpdateService is now more complex and there
are lots of edge cases that should be tested to make sure we don't
regress anything.

Also refrain from running fallback logic on boot if fallback logic not
enabled (bug found through a failing test, yeeah buddy!).

Catch uncaught MissingWebViewException (very timing-dependent!) and add
test for this.

Add tests for:
Some package setups (single package, non-default vs. default packages,
valid vs. invalid packages).
Ensure correct error codes used
Switching provider through settings-method
Switching provider through adding more prioritized provider
Switching provider in the middle of already running webview preparation
Ensure fallback logic is run when enabled and not run when disabled (at
boot, packageStateChanged, and when adding a new user).

Bug: 27635535

Change-Id: I275ecb0f6129f71258da0fa053e7f7b36a675886
2324373124f0ba4e59ba6d3de9e274f2fa28cff0 06-Apr-2016 Paul Jensen <pauljensen@google.com> If Internet probe is redirected, pass redirect destination to NetworkAgent.

Transport may use the redirect to make additional determination about network

Bug: 25203607
Change-Id: I07d8918f13fdcbe0b6fd757536bfc1850a2a244f
a46b40fd5c3603b59c4a0d5d5fa4b0547fc26aff 31-Mar-2016 Ricky Wai <rickywai@google.com> Add tests for profile keys in LockSettingsStorage

Bug: 27940135
Change-Id: Iade153f6607db4c75385bed6f20d3120c10674b0
631de99ef99dddde939aa5132e89625e35e77046 07-Apr-2016 Gustav Sennton <gsennton@google.com> Add more checks for invalid states when reading webview packages config.

There should be at least one available-by-default package (otherwise the
user would have to explicitly choose webview implementation before using
webview). Furthermore a fallback package should always be available by
default (otherwise it would have to be chosen by the user to be used
after being enabled).

Bug: 28014401
Change-Id: I90c300898a5be4219317d65f15878e1d421193d7
b2f901ab222b8a7193f9a17cb06232f73cf20518 12-Apr-2016 Yohei Yukawa <yukawa@google.com> Make sure that Toast is always shown by Meta-Space.

It turns out that my previous CL [1] does not always show Toast when
Meta-Space is hit multiple times in a short period. With this CL, we
attempt to make sure that the Toast is shown every time when Meta-Space
rotates the current IME subtype.

This CL also removes a rule that we do not show Toast when the IME
window has InputMethodService.IME_VISIBLE bit as it turns out to be
confusing. In Android N, we just provide a consistent behavior
no matter the IME window is visible or not.

[1]: If3fe17adbffe4c1125783fc77fed3cfe78fc7933

Bug: 27547054
Bug: 28127795
Change-Id: I551c51cd672dba6e7693d23cb181007f51b0de9d
b026b6a40f69d8068e4f9fd6324c81607191995d 12-Apr-2016 Seigo Nonaka <nona@google.com> Merge "Fix incorrect boot time locale." into nyc-dev
4e9817ec872033a7801988c32082e9d9f2086789 12-Apr-2016 Jorim Jaggi <jjaggi@google.com> Nuke minimum time for camera double tap gesture

When the device was sleeping, we get really really low values so
we can't use that as a filter for anti-falsing, or else the gesture
is extremely unreliable when the device was sleeping.

Bug: 26731262
Change-Id: I9b31a3d58ffc22fca31defb40c69a830cf4aa648
01a1ad511e126aca0b445457f06e31f903b84ffb 12-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Fix notifications that are sent for USER_ALL." into nyc-dev
012bc7bb9fa1d0731be7b094a3d0631e01b03fbe 12-Apr-2016 Jeff Sharkey <jsharkey@android.com> Fix notifications that are sent for USER_ALL.

Also avoid creating a heavy LoadedApk object which will be cached
around in the long-lived system process.

Bug: 28116427
Change-Id: I1a5fc43e6d559a09088636b2fe4b5c76f08d3413
bc20320f7f224d1cc5be3c436a1a5ece2067f2ec 12-Apr-2016 Makoto Onuki <omakoto@google.com> Merge "ShortcutManager: First cut of CTS" into nyc-dev
45d3e977487da262a58bbfc5650c99a2d94aba9f 31-Mar-2016 Sunny Goyal <sunnygoyal@google.com> Changing LauncherApps to resolve activity by component name

This makes the behavior of resolveActivity similar to isActivityEnabled.
Not that starting this activity may still fail due to other reasons.

Bug: 27549770
Change-Id: I924d7aa2305c64fd319ca1e38058f9f956c0c256
518bae5fa411327b14ca1e1496f6c9836da0eccd 12-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Make AccountManagerServiceTest work again" into nyc-dev
eeca6584cff3858e6993dd4b88f1b55418f07ad2 08-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Make AccountManagerServiceTest work again

It was broken for quite a while. Introduced the following changes:
- Use mockito to mock AppOpsManager and UserManager
- Use MockContext directly and override what is necessary.
RenamingDelegatingContext doesn't work with absolute file names for
database paths, which is the case for system server DBs.

Bug: 26279712
Change-Id: I9f2a3892f9bd7a882d78f0bb7beb8669f7dc8c6f
03c7b09a834a82050351f7a335b2fb457694003d 12-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Use callerPackage instead of callerApp." into nyc-dev
0568f28ac3ba83ec268b54d16a8b19c1fcaf9c89 11-Apr-2016 Craig Donner <cdonner@google.com> Sets COARSE_LOCATION permission for VrCore when in vr mode.

See b/27900412 for more details.

Bug: 27900412
Change-Id: I3e8544e44ff6dfc96d58f9189cf0034ce76ed009
9323df6e469de5002cae168d24d776e79d7f6f4c 12-Apr-2016 Jeff Sharkey <jsharkey@android.com> Use callerPackage instead of callerApp.

When AlarmManager sends a broadcast, it only knows the packageName
that requested the broadcast, and the callerApp may not even be
running anymore. Since we only need the package name for enforcement,
use that instead of the possibly null callerApp.

Bug: 27397019
Change-Id: I8a52d73b4a83eebf85aa1adbfe06bd8886814d4b
7b068fa903e7f10e4f693f67b432e3a88ba9b9b1 12-Apr-2016 Todd Kennedy <toddke@google.com> DO NOT MERGE Fix intent filter priorities am: eeb970a am: cd24c4e
am: bd770bc

* commit 'bd770bc97b7c4745c39d16ca417bd8ddedcaefcf':
DO NOT MERGE Fix intent filter priorities

Change-Id: I7c17baf18e2d25c95fb5b8fa45f5cc7b5936723b
bd770bc97b7c4745c39d16ca417bd8ddedcaefcf 12-Apr-2016 Todd Kennedy <toddke@google.com> DO NOT MERGE Fix intent filter priorities am: eeb970a
am: cd24c4e

* commit 'cd24c4ebc0904342b5c9657c43dfa6c07c6e1eec':
DO NOT MERGE Fix intent filter priorities

Change-Id: Idc3d639cd5494210f06f46b644f465be26eca9b1
2b05239ac83c1b5d9f68475a6e5d162b3eb2c22c 12-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Abort PRE_BOOT dispatch when user is stopped." into nyc-dev
100bd9c24a06e3b139ad51526c3eec9cbcff68ee 12-Apr-2016 Jeff Sharkey <jsharkey@android.com> Abort PRE_BOOT dispatch when user is stopped.

If a user was started and then stopped in quick succession, we need
to stop dispatching PRE_BOOT broadcasts for that user.

Bug: 28032940
Change-Id: Ie9aedc2cd66a7a2cb2076e5004831cf8fe1afc4a
cd24c4ebc0904342b5c9657c43dfa6c07c6e1eec 12-Apr-2016 Todd Kennedy <toddke@google.com> DO NOT MERGE Fix intent filter priorities
am: eeb970a

* commit 'eeb970ada10d37495ad7a8a4b14ad0506b640eea':
DO NOT MERGE Fix intent filter priorities

Change-Id: I22cfcc61e9ec37242e0e47ef732c9364bdb8a886
5ba0d3e3a3035b67d2ce3a59975145b1e0061ef4 11-Apr-2016 Makoto Onuki <omakoto@google.com> ShortcutManager: First cut of CTS

Bug 27548047

Change-Id: Idd7a768ea4fee44c2cf6e3bd473cea9e67f5f7cd
766dc50eeb444b45e969263ecff38954a51a83e3 11-Apr-2016 Chris Tate <ctate@android.com> Merge "Scale wallpaper crop to device-suitable size" into nyc-dev
cf0cc881ebf2c2f00129dd9e045e23f6bf970d54 11-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Rate-limit how often we collect wtf() logs." into nyc-dev
5cbcb52b96b5a2b97234381af59002fbe32593cd 11-Apr-2016 Jeff Sharkey <jsharkey@android.com> Rate-limit how often we collect wtf() logs.

We've seen that aggressive Log.wtf() calls can DoS the system
process, since we fork and collect recent logcat output for each
call. After this CL, we rate-limit to only perform this heavy
lifting 5 times during any given 10 second window of time.

We still log the wtf() message to the binary event log.

Bug: 28117774, 28052546, 27994717, 27381069
Change-Id: Ic91b23fe7ee26818083a8d40fd4850fcb9d93643
096ba22ae3a40630792eb6fc262597af46e47b6a 11-Apr-2016 Dan Sandler <dsandler@android.com> Suppress immersive mode confirmation in VR mode.

Change-Id: I5046d3f60727bded484cb11233638be0e24ef0d8
Fixes: 28052143
f3d241486b17cbfef7ad9b57aef3454ac3e0e769 11-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Merge "Allow deleting accounts when user is locked" into nyc-dev
f64a0fea6c1f5b2d8262282bb7f2b8b1c67ae9a4 11-Apr-2016 Julia Reynolds <juliacr@google.com> Merge "Don't get application info for the system" into nyc-dev
b401fa75f90d576bcf665b42e1571b76ecbea649 11-Apr-2016 Julia Reynolds <juliacr@google.com> Don't get application info for the system

Bug: 28107178
Change-Id: Ic1a75a7d6d6e80e0df8f3017fb8737cf18f4dd3a