Commit Graph

8104 Commits

Author SHA1 Message Date
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
Jeff Sharkey
785f494e87 Require permission for FLAG_WILL_BE_FOREGROUND.
We caught scheduleAsPackage(), but not schedule(), oops.

Bug: 28998999
Change-Id: I0642c2265ff61eead8747cc6b4d0f852f1ca3ef2
2016-07-14 10:43:14 -06:00
Rubin Xu
74eb4a5226 Merge "Fix typo in DevicePolicyManager" into nyc-mr1-dev 2016-07-14 09:46:23 +00:00
TreeHugger Robot
a7ebd4f4bb Merge changes I56d6be69,Ibf8f9b26 into nyc-mr1-dev
* changes:
  Fixed a bug where the headsup would be stuck disappearing
  Changed the appearance of phone call notifications
2016-07-14 01:38:53 +00:00
Wei Liu
6e8630307a Merge "Add BUGREPORT_OPTION_WEAR so that Wear can customize its bugreporting." into nyc-mr1-dev 2016-07-13 23:59:28 +00:00
Selim Cinek
06e9e1fe00 Changed the appearance of phone call notifications
Change-Id: Ibf8f9b266428fdd5374ee824ec4c2df10daeb9a7
Fixes:28269355
2016-07-13 14:56:05 -07:00
Adrian Roos
a07af1ee35 Merge "ApplicationErrorReport: Sanitize stack trace" into nyc-mr1-dev 2016-07-13 21:34:19 +00:00
Rubin Xu
d3609d4cc3 Fix typo in DevicePolicyManager
Change-Id: I4aa9530794f1487d17765a532ad65a303f4f7ff8
Fix: 30115660
2016-07-13 18:32:57 +01:00
Adrian Roos
732ae95fbf ApplicationErrorReport: Sanitize stack trace
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
2016-07-13 17:25:18 +00:00
Benjamin Franz
17ca90430b Merge "Add hidden API to store whether provisioning config has been applied" into nyc-mr1-dev 2016-07-13 14:31:50 +00:00
TreeHugger Robot
2921dfac50 Merge "Don't hold a lock while loading default wallpaper" into nyc-mr1-dev 2016-07-12 19:18:08 +00:00
Amith Yamasani
3bfbc531b3 Merge \"Include new constant for encryption status in the getter\'s javadoc\" into nyc-dev
am: e278cf7665

Change-Id: I22c884f8982d3a1aaf7baf1b981a3d3d8d8ab624
2016-07-12 17:46:58 +00:00
Fyodor Kupolov
b6378cf4ae Don't hold a lock while loading default wallpaper
It currently causes lock contention during user switch, when instance of
WallpaperManager in SystemUI is accessed from multiple threads

Bug: 29039588
Change-Id: I4b827d54d10fbd3b188fb94f47e78a2967ecb480
2016-07-12 10:39:56 -07:00
Makoto Onuki
50752f7391 Merge "Throw ActivityNotFoundException when failed to launch shortcut" into nyc-mr1-dev 2016-07-12 17:09:32 +00:00
Benjamin Franz
2aa9bab8a1 Add hidden API to store whether provisioning config has been applied
Bug: 29629204
Change-Id: Iaf4164357868b17dbc6615a77babb0e7cbc183b7
2016-07-12 17:20:18 +01:00
Amith Yamasani
75db125ebb Include new constant for encryption status in the getter's javadoc
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
2016-07-11 15:02:18 -07:00
Makoto Onuki
83f6d2da37 Throw ActivityNotFoundException when failed to launch shortcut
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
2016-07-11 14:37:18 -07:00
Mahaver Chopra
790d198860 Add an api to verify if ro.device_owner was set
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
2016-07-11 11:22:52 +01:00
Wei Liu
967fc8dd62 Add BUGREPORT_OPTION_WEAR so that Wear can customize its bugreporting.
b/30041885

Change-Id: I4ffa7b5c8ddad35e32f0f31ce904848ff40ad734
2016-07-08 17:08:26 -07:00
TreeHugger Robot
702589d060 Merge "Preparations for different scrim depending on wallpaper" into nyc-mr1-dev 2016-07-08 22:13:51 +00:00
Andreas Gampe
56177bf81b Merge "Revert "Frameworks/base: Refactor UserHandle and Environment a bit"" into nyc-mr1-dev 2016-07-08 18:09:54 +00:00
Andreas Gampe
d281b4204a Revert "Frameworks/base: Refactor UserHandle and Environment a bit"
Breaks monkey in root mode.

This reverts commit 6e16714c68.

Bug: 29338430
Change-Id: I238f89dad77d7dcae6d02eccbda52eb9c6c6466c
2016-07-08 03:50:27 +00:00