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: Icc8f8dbd060762ae1a7b1720e96c5afdb8aff3fd
- Log when hasTopUi state changes
- Add hasTopUi to dumpstate
- Only allow persistent processes to honor this flag
Bug: 30292998
Change-Id: Ifb481c8d50b102ea4cac3078ea3eb39e45c08259
Bug 30230667
Ensure that pre-N applications initialize in the proper order,
but allow N and above applications to be created prior to
asking for a Transition.
Change-Id: I859f22a7c5518e4b496cbd7ee58ef1d3206a5c86
(cherry picked from commit 78d38fc839)
The previous path "worked" but left the wallpaper bookkeeping with
incorrect SELinux labeling, which led to cascade failures later on
when apps tried to set new system wallpaper imagery or read the
current image for the picker UI.
We now (a) explicitly label wallpaper files in all change cases,
(b) let the restored imagery flow through the full crop path, as
should have been done in the first place, and as a result (c) lift
the size restrictions on the source image, because now we are doing
a device-appropriate scaling operation on the image.
The "when to crop/scale" test has been slightly relaxed such that
a restored image of exactly the right size now longer triggers a
superfluous factor-1.0 scaling operation.
Bug 30361282
Change-Id: I9a305eea2227952493f64ab78862648cafb816ff
Also fixes a bug which didn't set the correct renderThreadTid
when restarting an app (for example, when SystemUI gets killed).
Bug: 30292998
Change-Id: I420bee8a11d430b1e52ded050536e56a85a48800
Fixes a bug where onServiceDisconnected could be delayed
such that it would be dispatched after the connection has
already reconnected.
Bug: 30182617
Change-Id: I6e3fc2f125a477bb342de601530c254c34ffb4f7
When app is transferred from split-screen mode to fullscreen
and the app doesn't handle configuration change, relaunch is
scheduled with non-empty override config corresponding to
fullscreen size. This override config is then used in instance
of DisplayAdjustments and in size/metrics calculations in
corresponding methods of Display class. To obtain correct values
in fullscreen mode override config should be empty.
Configuration change that follows relaunch has correct (empty)
override config, but it is not really applied for resources
because final config matched current activity config.
Bug: 30185335
Change-Id: I95fb69e0c229c2c6b0c1cd79e9d60556de579ae4
Also fix b/30230996.
TODO: Support the sourceBounds argument to LauncherApps.
startShortcut().
Bug 30218829
Bug 30230996
Change-Id: Ibb6c59d5b7c0a320c21d09436d016d0eac94644f
It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout like toasts are.
Now 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. The
token is passed in the app domain in the request to
construt and add the toast window which allows a bad
app to add arbitrary toast windows. However, this is
fine since the token will be invalided and all of its
windows removed after the toast for which it was
create times out.
We do not care of braking apps that add toast windows
directly due to the security and privacy implications
of arbitrary UI redressing. Also we have dedicated
Toast APIs which are the way to add this time of UI.
bug:30150688
Change-Id: I65372c81a791489de89fb2886cc96392c28680bb
Makes sure that the size of the stack trace does not exceed
40 KiBi, to ensure that even errors with large stack traces
are properly reported to ActivityManagerService. For good
measure, also ensure that the exception message is not too
long either.
Change-Id: Id8a99094023c15a981b1b79fd9ee0d803921e220
Fixes: 29918978
It currently causes lock contention during user switch, when instance of
WallpaperManager in SystemUI is accessed from multiple threads
Bug: 29039588
Change-Id: I4b827d54d10fbd3b188fb94f47e78a2967ecb480
Added a bit more information in the javadocs about the new constant
ENCRYPTION_STATUS_ACTIVE_PER_USER in related methods/constants so
that developers don't miss checking for that constant when targeting
API Level 24.
Change-Id: Id9cd6248637fe0fc28d5161344abe02614b5f502
Fixes: 30073719
Originally the code used IIntentSender, but I had to switch to calling
startActivitiesInPackage() directly, because sendIntentSender() does
not support returning errors.
Bug 30035853
Change-Id: I5d7669c96a2f1805373c71aebf45b97ac1d01ff6
Currently for OobConfig app we used DEVICE_PROVISIONED Global setting to
verify if device was provisioned. This setting can be modified using
adb. we just need to know if it was set atleast once. Added an api in
DPM to return whether system property "ro.device_owner" was set.
Bug: 29935702
Change-Id: I9a2b5217c0bc2cc11d68282e05a5450ea3f6cf21