Commit Graph

8141 Commits

Author SHA1 Message Date
Wale Ogunwale
826c706156 Immediately deliver new intent to paused activity in docked stack
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
2016-09-13 10:38:30 -07:00
Andrew Solovay
ae09fcad26 docs: Fixing links to moved Fragments guide, + redirect am: f53968061c
am: 37b32a5d31

Change-Id: Iedccf6e09180096235f438edb96bdf73e273fae0
2016-09-08 17:50:36 +00:00
Andrew Solovay
37b32a5d31 docs: Fixing links to moved Fragments guide, + redirect
am: f53968061c

Change-Id: Ic29b29244d2919bcd5eb5b72daeaa8a78dc71e2d
2016-09-08 17:43:40 +00:00
Andrew Solovay
f53968061c docs: Fixing links to moved Fragments guide, + redirect
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
2016-09-07 15:42:35 -07:00
Makoto Onuki
bb69f55f17 Merge "Allow DO/PO to be installed with certain preconfigured accounts." into nyc-mr1-dev 2016-09-07 21:36:38 +00:00
Makoto Onuki
5e7e0670c7 Allow DO/PO to be installed with certain preconfigured accounts.
- 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
2016-09-06 11:56:45 -07:00
Svetoslav Ganov
aa07653d2e Prevent apps to overlay other apps via toast windows
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
2016-09-02 14:00:07 -07:00
Mark Lu
eab610d0a6 docs: fix broken links in Activity reference am: fa43485910
am: 497c2907fd

Change-Id: I35f07a633757dc83970accbe78b3173090e71099
2016-08-25 22:14:14 +00:00
Mark Lu
497c2907fd docs: fix broken links in Activity reference
am: fa43485910

Change-Id: I72cebe96e1ea0c1950ca316bc80c337bfdde9002
2016-08-25 21:54:49 +00:00
Andrew Scull
56bfc1cecf Merge "Explain the IAE thrown by resetPassword." into nyc-mr1-dev 2016-08-25 15:01:18 +00:00
Jorim Jaggi
9d0879c6ac Change retail mode wallpaper (1/2)
am: 6c902d0453

Change-Id: I1ca69b6cc7450d7f7056e69e3cf7fab1ad2df624
2016-08-23 00:17:20 +00:00
TreeHugger Robot
c7136b3b3c Merge "Change retail mode wallpaper (1/2)" into nyc-dr1-dev 2016-08-22 22:55:15 +00:00
George Mount
c9373e5505 DO NOT MERGE ANYWHERE:Fix NPE during Activity transition using wrong Activity.
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)
2016-08-20 22:37:45 +00:00
Jorim Jaggi
6c902d0453 Change retail mode wallpaper (1/2)
Change-Id: I7ce5711e57bc39edf10fc7151f26168c6183d71e
Fixes: 30830249
2016-08-19 21:44:48 +00:00
George Mount
a3edbf6a5d Fix NPE during Activity transition using wrong Activity.
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)
2016-08-18 17:15:43 +00:00
Mark Lu
fa43485910 docs: fix broken links in Activity reference
Bug: 30142414
Bug: 30837469
Change-Id: If370e49fee32df41b7dab93d6c89c79a9835dabb
2016-08-12 16:05:17 -07:00
Christopher Tate
6172266154 Check system & lock wallpaper backup eligibility independently
Bug 30751829

Change-Id: Ic94689dd63238449222d1aea07231d9fd29fc76d
2016-08-11 11:22:14 -07:00
Dianne Hackborn
848c690f69 Merge "A little more on issue #30766518: Document what targeting N does" into nyc-mr1-dev 2016-08-10 17:38:02 +00:00
Adrian Roos
d4a95806ab Merge "Notification: Reuse drawable in Header if Icon unchanged" into nyc-mr1-dev 2016-08-10 16:52:15 +00:00
Dianne Hackborn
5f1649e852 A little more on issue #30766518: Document what targeting N does
Change-Id: I67f2bfd01261a4304b532495a0d3cc791726ed5e
2016-08-09 18:00:31 -07:00
Dianne Hackborn
75cdd5f68f Merge "Fix issue #30766518: Document what targeting N does" into nyc-mr1-dev 2016-08-10 00:45:55 +00:00
Hemal Patel
f8c0a138fb Docs: Fixed the link that loads Fragments guide am: a8e1c75bf6
am: dabee01e9b

Change-Id: I6a17d73c3dab8980c57e9f6c9617bb465c48f1a5
2016-08-09 21:10:40 +00:00
Dianne Hackborn
b34cbedb4e Fix issue #30766518: Document what targeting N does
Also small documentation cleanup in a few other places.

Change-Id: I16581c751aa0ffa146faba3b140a8fa2170f4520
2016-08-09 13:21:24 -07:00
Adrian Roos
c4337a3569 Notification: Reuse drawable in Header if Icon unchanged
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
2016-08-09 12:31:20 -07:00
Hemal Patel
a8e1c75bf6 Docs: Fixed the link that loads Fragments guide
In the class description, fixed the reference link that points to the
Fragments guide.

Bug: 29007808
Change-Id: I3399e5f10c461eb6666a04f8829c6cde774948e0
2016-08-08 16:43:22 -07:00
Selim Cinek
5a3e33a82a Merge changes Idc4c2c14,Ibea016c6,I49ab58c3,Id911d405,I0f17dc5f, ... into nyc-mr1-dev
* 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
2016-08-08 19:18:33 +00:00
Chris Tate
b3690ccf2c Merge "Fix "adb backup -shared"" into nyc-mr1-dev 2016-08-05 18:04:25 +00:00
TreeHugger Robot
9d9621f472 Merge "Move EphemeralResolverService" into nyc-mr1-dev 2016-08-05 17:37:35 +00:00
Todd Kennedy
31b95e0265 Move EphemeralResolverService
It should not have been under com.android.internal

Fixes: 30673742
Change-Id: I2277aa4a4799fa59bf68af7c4cfcb4e1216aeb8d
2016-08-05 07:17:52 -07:00
Christopher Tate
60af594c3e Fix "adb backup -shared"
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
2016-08-04 17:23:20 -07:00
Selim Cinek
e99acb29db Fixes a bug where setting a null bigLargeIcon would not clear it
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
2016-08-04 13:04:29 -07:00
Makoto Onuki
0fd8670fd5 Merge "ShortcutManager: Update foreground check." into nyc-mr1-dev 2016-08-04 19:29:27 +00:00
Chris Wren
a61f179c3d only rate limit notification updates
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
2016-08-04 17:04:02 +00:00
TreeHugger Robot
1584d5d6e2 Merge "ResourcesManager: Return null on failure to create Resources" into nyc-mr1-dev 2016-08-04 00:08:21 +00:00
Makoto Onuki
33525d2f1a ShortcutManager: Update foreground check.
- 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
2016-08-03 16:36:38 -07:00
Adam Lesinski
53fafdfbe7 ResourcesManager: Return null on failure to create Resources
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
2016-08-03 14:44:52 -07:00
Svetoslav Ganov
a2f247e6a6 Merge "Revert "Prevent apps to overlay other apps via toast windows"" into nyc-mr1-dev 2016-08-02 01:56:10 +00:00
Svetoslav Ganov
2fc661a453 Revert "Prevent apps to overlay other apps via toast windows"
bug:30150688

This reverts commit dc24f937b0.

Change-Id: Id7e8ddbf82ab426f55a5296791f1e8ebb61514bc
2016-08-02 01:55:01 +00:00
Svetoslav Ganov
fea7cfce8b Merge "Prevent apps to overlay other apps via toast windows" into nyc-mr1-dev 2016-08-01 18:48:11 +00:00
Svet Ganov
dc24f937b0 Prevent apps to overlay other apps via toast windows
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
2016-08-01 11:46:02 -07:00
Andrew Scull
60df33da54 Explain the IAE thrown by resetPassword.
DevicePolicyManager.resetPassword can throw an IllegalArgumentException
which is now documented.

Bug: 30105812
Change-Id: Ied02a0586ad62cca636c46da4faa16df64e17e5a
2016-07-29 16:29:58 +01:00
TreeHugger Robot
ca5310dd5f Merge "Follow up for I420bee8a11d430b1e52ded050536e56a85a48800" into nyc-mr1-dev 2016-07-28 19:20:00 +00:00
Jorim Jaggi
8d4f5f52a1 Follow up for I420bee8a11d430b1e52ded050536e56a85a48800
- Log when hasTopUi state changes
- Add hasTopUi to dumpstate
- Only allow persistent processes to honor this flag

Bug: 30292998
Change-Id: Ifb481c8d50b102ea4cac3078ea3eb39e45c08259
2016-07-27 11:35:05 +02:00
Adam Powell
4e00581e6b Merge "Check for target SDK version for out-of-order fragment creation." into nyc-mr1-dev 2016-07-26 23:24:59 +00:00
George Mount
00b7846b1e Check for target SDK version for out-of-order fragment creation.
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)
2016-07-26 14:59:23 -07:00
Christopher Tate
ebadfb17e7 Fix wallpaper restore from pre-N devices
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
2016-07-25 18:11:47 -07:00
Daniel Chapin
adc51e460c Merge "Move SysUI to top app scheduling if panel expanded" into nyc-mr1-dev 2016-07-22 22:49:37 +00:00
Jorim Jaggi
f6782ee1c8 Move SysUI to top app scheduling if panel expanded
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
2016-07-23 00:12:39 +02:00
TreeHugger Robot
0ff47b64cd Merge changes Idd0b38b4,I511356a8 into nyc-mr1-dev
* changes:
  Fixed a bug where the fade in from dark would not work properly
  Changed the appearance of fullscreen intent notifications again
2016-07-22 19:20:49 +00:00
Selim Cinek
981962e6ad Changed the appearance of fullscreen intent notifications again
Change-Id: I511356a8dc0fe253541c625fb7b43ed0c7bafaca
Fixes: 28269355
2016-07-22 12:13:11 -07:00