Commit Graph

8125 Commits

Author SHA1 Message Date
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
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
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
Andrii Kulian
8fcd8f1fb9 Merge "Make sure to apply latest configuration to resources" into nyc-mr1-dev 2016-07-22 18:16:35 +00:00
Adrian Roos
1dcda85414 Merge "ServiceConnection: Properly serialize events" into nyc-mr1-dev 2016-07-22 17:03:43 +00:00
Adrian Roos
a9b43182c6 ServiceConnection: Properly serialize events
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
2016-07-21 15:52:47 -07:00
Andrii Kulian
3b3c914e62 Make sure to apply latest configuration to resources
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
2016-07-21 13:55:14 -07:00
Makoto Onuki
b84ce2e034 Merge "Support multiple intents in ShortcutInfo" into nyc-mr1-dev 2016-07-20 23:05:31 +00:00
Makoto Onuki
440a1ea8e2 Support multiple intents in ShortcutInfo
Also fix b/30230996.

TODO: Support the sourceBounds argument to LauncherApps.
startShortcut().

Bug 30218829
Bug 30230996

Change-Id: Ibb6c59d5b7c0a320c21d09436d016d0eac94644f
2016-07-20 14:46:48 -07:00
Svetoslav Ganov
78fa7a1b3f Merge "Revert "Prevent apps to overlay other apps via toast windows"" into nyc-mr1-dev 2016-07-20 01:04:52 +00:00
Svetoslav Ganov
f1395d730a Revert "Prevent apps to overlay other apps via toast windows"
This reverts commit b3b22cba86.

Change-Id: I905e7435893fab49f03fdb708f4ab5a9d2c9cbae
2016-07-20 01:00:51 +00:00
Chris Tate
3cec9d44b3 Merge "Document that WallpaperManager.getDrawable() can return null" into nyc-mr1-dev 2016-07-18 17:29:39 +00:00
Christopher Tate
41dc83bd57 Document that WallpaperManager.getDrawable() can return null
Bug 30164766

Change-Id: Idc03a41ea3fab3772de4f24551765dff78eb6d7f
2016-07-15 15:59:23 -07:00
Adrian Roos
9d8de73530 Merge "Notification: Apply small icon level" into nyc-mr1-dev 2016-07-15 21:09:37 +00:00
TreeHugger Robot
9a7c3bd577 Merge "Add way to set live wallpaper across users" into nyc-mr1-dev 2016-07-15 21:07:31 +00:00
Svetoslav Ganov
e2d148b008 Merge "Prevent apps to overlay other apps via toast windows" into nyc-mr1-dev 2016-07-15 19:56:42 +00:00
Adrian Roos
40ea083b59 Add way to set live wallpaper across users
Also adds an entry point for vendor specific services
to SystemUI.

Bug: 30038484
Change-Id: I8f335c1f7de15d619f2c688a8ac95372f166595f
2016-07-15 11:20:36 -07:00
Svet Ganov
b3b22cba86 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 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
2016-07-14 19:16:42 -07:00
TreeHugger Robot
97639a1310 Merge "Require permission for FLAG_WILL_BE_FOREGROUND." into nyc-mr1-dev 2016-07-14 20:05:39 +00:00