When the docked stack is minimized and we are unminimizing it
due to a request to start it's currently paused top activity,
it is possible for the new intent not do be delivered immediately
because it isn't resumed due to another activity been launched in
the system (Recents) which is resumed instead. So, the user won't
see the effect of the new intent until they touch the docked activity
causing it to get the new intent and resume.
We now deliver new intents to the top activity in the docked stack if
it is in a minimized state. Then on the client side we temporarily
resume the activity and pause it again to guarantee onResume is called
after onNewIntent.
Bug: 31371093
Change-Id: Ib1764ccf5efc9d6498ce6cc8a34236c79fc07dad
The Fragments API guide was moved, but apparently a redirect was
never set up. Also, there are a few links to the old location in
the Javadocs.
Staged the revised Javadocs (see first comment for stage location).
Not going to stage the redirects file since it would trash another,
bigger CL that deals with the redirects file, but it's pretty
straightforward.
bug: 30559011
Change-Id: Ibd65f85c1ebb9789c1d40614fe11fe4ffda97e58
- Non-test-only DO/PO still can't be installed when there are
accounts.
- Test-only DO/PO can be installed even when there are accounts,
as long as all the accounts have the
"android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED" feature.
Some authenticators claim to have any features, so to detect it,
we also check android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED
and disallow installing if any of the accounts have it.
- Also add logs on certain important events in DPMS.
Bug 28928996
Change-Id: I62efce10e9cc22e994ea8cae91a4fafcce25dd77
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
Bug 30786309
If the Activity used in makeSceneTransitionAnimation isn't
the same one used in the startActivity call, a NullPointerException
could be thrown.
Change-Id: Id21c54fcf99b353feab62f7fc160997ed06e7d23
(cherry picked from commit 3289bfa289)
(cherry picked from commit a3edbf6a5d)
Bug 30786309
If the Activity used in makeSceneTransitionAnimation isn't
the same one used in the startActivity call, a NullPointerException
could be thrown.
Change-Id: Id21c54fcf99b353feab62f7fc160997ed06e7d23
(cherry picked from commit 3289bfa289)
Mitigates an issue where a LevelListDrawable would constantly
be reloaded even if unchanged. To avoid this, small icons are
now only reloaded if they no longer point to the same resource.
Note that StatusBarIconView already has this logic.
Change-Id: I6be436e5cef7b7ca91a28edc413b1aaa0f1007d5
Fixes: 30496073
In the class description, fixed the reference link that points to the
Fragments guide.
Bug: 29007808
Change-Id: I3399e5f10c461eb6666a04f8829c6cde774948e0
* changes:
Improved the transition when clicking on the last notification
Fixed a bug that could lead to an empty notification
Removed contentDescriptions that hindered accessibility usability
Fixes a bug where setting a null bigLargeIcon would not clear it
Fixed the transition of the background of the notifications
Fixed a bug where the notification would fade out in a ugly way
An accidental side-effect of introducing the XML content file and its
domain semantic checking was that the shared-storage domain got
dropped on the floor. Now the mechanism understands what it means
again.
Bug 29999884
Change-Id: I22b99c96869683d1a92430f237dda54b170b8f60
Because we were also looking for legacy icons and the legacy icon
was always restored for old listeners, the icon would not disappear.
Change-Id: Id911d405e5ae00bf45e34368effbf67c2425a40c
Fixes: 30663590
Updates to progress bars are the main culprit in system
performance events caused by apps spamming the notification
service. Rate-limiting only updates allows us to set a lower
threshold wihtout the owrry of mistakenly dropping bursts of
notifications being quickly posted after a network sync.
Also reduce logspam caused by the rate-limit events.
Bug: 30132961
Change-Id: I49acda6a2831204da45e899ddd3d62d571d7174b
- When the cached UID state says a UID is in the background,
check with AM and get the latest state, since the state
might just have been changed.
Bug 30640208
Change-Id: If448f6f21f290fa0fc13550d9c740f56aa8bfce0
A lot of calling framework code expects a null value on failure,
and didn't catch the previous exception. There were some strange
corner cases where previously a null value was not checked for
in framework code, allowing the null Resources object to be
returned to the caller. Introducing an exception changed the
semantics and can crash certain apps.
Bug:30422475
Change-Id: I51d34ae43c9ec605a8790989c56cf85b815ff5b8
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
DevicePolicyManager.resetPassword can throw an IllegalArgumentException
which is now documented.
Bug: 30105812
Change-Id: Ied02a0586ad62cca636c46da4faa16df64e17e5a
- 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