- If an activity is done relaunching and the device is sleeping or
shutting down, go ahead and force the activity to sleep which will
transition it into the stopped state. We do this after the activity
is relaunched as activities can currently only relaunch into the
resumed or paused state both of which are visible state.
However, the activity should be in the stopped state while the device
is sleeping.
- Also removed previous fix for b/28518380 that prevents activities from
relaunching due to configuration changes while the device is sleeping.
We need to allow relaunches due to configuration changes while the device
is sleeping so the things are responsive when you wake-up the device.
And, it is no longer a big deal since we are transitioning the activity
to the stop state when the relaunch is complete.
Bug: 30253333
Bug: 28518380
Change-Id: I5313c13a13c2d2f9bb43831797918d9e67a30cda
It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout.
Now for apps targeting SDK greater than N MR1 to add a
toast window one needs to have a special token. The token
is added by the notificatoion manager service only for
the lifetime of the shown toast and is then removed
including all windows associated with this token. This
prevents apps to add arbitrary toast windows.
Since legacy apps may rely on the ability to directly
add toasts we mitigate by allowing these apps to still
add such windows for unlimited duration if this app is
the currently focused one, i.e. the user interacts with
it then it can overlay itself, otherwise we make sure
these toast windows are removed after a timeout like
a toast would be.
We don't allow more that one toast window per UID being
added at a time which prevents 1) legacy apps to put the
same toast after a timeout to go around our new policy
of hiding toasts after a while; 2) modern apps to reuse
the passed token to add more than one window; Note that
the notification manager shows toasts one at a time.
bug:30150688
Change-Id: Ia1dae626bd9e22541be46edb072aa288eb1ae414
This doesn't take long, so there is little reason to show it if
we didn't show the dex opt dialog.
Bug: 29643498
Change-Id: I955f9dfa233166a8a150deb2d115a591e6d82394
Sync adapters were able to access the synced account without the accounts
permission which circumvents our permission model. Therefore, we require
sync adapters that don't have access to the account to get user consent.
This can be noisy, therefore we will white-list sync adapters installed
before we started checking for account access because they already know
the account (they run before) which is the genie is out of the bottle.
bug:31162498
Change-Id: I815e521778892ec592d53d086273743f1711bd17
Put it back under SHOW_TRANSACTIONS, this was for assist debugging
some early surface destroy issues but should be no longer needed.
Change-Id: I0806ac0ad2c9de3d0ccf9af995ced25c9a2f7668
Before getting the package uid, need to clear the calling identity
Change-Id: Id917288f5457baa7672d0355889a498bc9a92cb3
Fixes: 31058820
Test: cts-tradefed run commandAndExit cts --skip-connectivity-check --skip-device-info --disable-reboot -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPackageInstallUserRestrictions
One can pass a null Surface to createVirtualDisplay and then set the
Surface after creation. Properly handle the isSingleBuffered check for
this case.
Bug 31219726
Change-Id: I14ebaca58912fdb4989e0ba0f4c251df31e24617
For adoptable storage and FBE to coexist we need a new dm-biocrypt
kernel feature which isn't ready yet. So for now, prevent devices
from being adopted on FBE devices.
Bug: 30770036
Test: none
Change-Id: I51d54d2a8976ed02a03b107545aa094cf68df5d0
(cherry picked from commit 3b7f4b69b7)
Fixes a bug where the wrong part of an image was decoded if
the image needed to be scaled but not cropped.
Change-Id: I011e59d85b526097ef1daabd63805c7cdc74c17b
Fixes: 31112957
Since appShowWhenLocked is already null during the animation, we
also need to show the window if it's attached to a
FLAG_SHOW_WHEN_LOCKED window
Test: Test animation occluded -> lockscreen with an app that
has a SurfaceView
Fixes: 30829255
Change-Id: I0e0012bbe5679cd0894ce4d94902ff8b24823b51