Commit Graph

65435 Commits

Author SHA1 Message Date
Julia Reynolds
91cf4501f8 Merge "Allow some non-MessageStyle notifications to be convos" into rvc-dev 2020-05-27 23:40:24 +00:00
TreeHugger Robot
9d62182591 Merge "Fix app standby bugs." into rvc-dev 2020-05-27 23:38:37 +00:00
Hongwei Wang
97c4cda831 Merge "No onMultiWindowModeChanged callback from split to PiP" into rvc-dev 2020-05-27 23:30:19 +00:00
TreeHugger Robot
10bee631fd Merge "Adding permission check for dumping visible windows" into rvc-dev 2020-05-27 23:03:40 +00:00
Kweku Adams
52b52a6016 Fix app standby bugs.
1. Don't set app standby buckets when app idle is disabled. When the
bucket is set when app idle is disabled, AppStandbyController notifies
listeners, which then puts the listeners in an invalid state where
they think some apps are exempted from things like battery saver.

2. Remove uninstalled packages from AppStateTracker's exempted package
cache.

Bug: 156868557
Test: make cts -j 64 && cts-tradefed run commandAndExit cts -m CtsBatterySavingTestCases -t android.os.cts.batterysaving.BatterySaverAlarmTest
Test: make cts -j 64 && cts-tradefed run commandAndExit cts-on-gsi -m CtsBatterySavingTestCases -t android.os.cts.batterysaving.BatterySaverAlarmTest
Change-Id: If62c75eff0bc56ef1750e109335ba7e47832c128
Merged-In: 2a94051c04
2020-05-27 21:48:50 +00:00
Hongwei Wang
95c307f8ad No onMultiWindowModeChanged callback from split to PiP
When entering PiP from split-screen, there should be exact one
onPictureInPictureModeChanged  callback with zero
onMultiWindowModeChanged since the multi-window mode is not changed.

When the stack is nested, we reparent the to-be-pinned stack to the
display area and later on set the stack windowing mode onto
ActivityRecord, which ends up WINDOWING_MODE_FULLSCREEN in this case.

Therefore, the windowing mode changes from split-screen-secondary to
fullscreen and then pinned. And client receives
onMultiWindowModeChanged(false), onPictureInPictureModeChanged(true),
onMultiWindowModeChanged(true) in sequence.

Fixes this by setting the windowing mode prior to re-parenting within
RootWindowContainer#moveActivityToPinnedStack

Bug: 157172491
Test: manually enter PiP from split screen and verifies lifecycle
Change-Id: Idf57235349ed6b78db96a632af9665b6e39edb78
2020-05-27 14:25:20 -07:00
Mady Mellor
67be1e7ae7 Merge "Don't do the SAW perm check if there's an invalid UID" into rvc-dev 2020-05-27 21:02:30 +00:00
Julia Reynolds
4f73a7f02f Allow some non-MessageStyle notifications to be convos
Test: atest
Fixes: 157481581
Change-Id: Ieaecbed03ef5bce4b52d50d4c63ed261bbf36833
2020-05-27 20:19:20 +00:00
Ruchir Rastogi
d7ec4822a5 Merge "Impl. puller for BYTES_TRANSFER_BY_TAG_AND_METERED" into rvc-dev 2020-05-27 19:24:39 +00:00
Sunny Goyal
2ffca5a0de Adding permission check for dumping visible windows
Bug: 157010495
Test: Verfied that 3P apps cant call this API
Change-Id: I0dee93c82d33152fc54b6784970103c82a8ba6ef
2020-05-27 19:24:38 +00:00
Mehdi Alizadeh
c95be6995a Merge "Adds cacheFlags parameter to cache/uncacheShortcuts() methods" into rvc-dev 2020-05-27 19:23:39 +00:00
Mady Mellor
bccdf45c13 Don't do the SAW perm check if there's an invalid UID
Bug: 157451684
Test: atest PreferencesHelperTest
Change-Id: I1b9eb9dd60ad91b60a059bdee56af67ad53706ea
2020-05-27 11:57:36 -07:00
Benedict Wong
8f29769362 Merge "Add methods for IKEv2/IPsec test mode profiles" into rvc-dev 2020-05-27 17:31:00 +00:00
Adam Bookatz
203a17d955 Merge "Unify multiuser switcher enabled setting" into rvc-dev 2020-05-27 17:15:33 +00:00
Ruchir Rastogi
e3cd20f80d Impl. puller for BYTES_TRANSFER_BY_TAG_AND_METERED
+ refactor puller implementation for NetworkStats pullers in order to
support arbitrary slicing of NetworkStats data

Test: adb shell cmd stats pull-source 10000~10003
Test: adb shell cmd stats pull-source 10083
Test: atest CtsStatsdHostTestCases
Bug: 144771940
Change-Id: I92809f9f8d5d14742e8ba323eb8c7792dadb802f
2020-05-27 09:36:49 -07:00
Fiona Campbell
0f8da63140 Merge "Fix Walleye dim brightness curves" into rvc-dev 2020-05-27 16:25:51 +00:00
Gavin Corkery
6a459b2b35 Merge "Ensure that health check controller is unbound correctly" into rvc-dev 2020-05-27 16:08:13 +00:00
Cody Kesting
9e09e8a7fa Merge "Forward unknown Data Stall types to Connectivity Diagnostics." into rvc-dev 2020-05-27 16:03:38 +00:00
TreeHugger Robot
44fb3a97ff Merge "Trigger app transition explicitly when nothing gets resumed" into rvc-dev 2020-05-27 15:57:23 +00:00
Taran Singh
e20c25ddc6 Merge "Add Insets dumps and IME debug logs" into rvc-dev 2020-05-27 15:12:30 +00:00
Taran Singh
85661e3f9e Add Insets dumps and IME debug logs
Add more dumps and logs to better help debug IME insets better
Logging can be enabled by setting InsetsController.DEBUG to true.

Bug: 154348613
Test: manually build and flash.
      Verify showing and hiding IME shows logs.
      verify adb shell dumpsys window windows has new dumps

Change-Id: Iad0a21d81a22d6acfaaf5c5ca8b5131eec411e79
2020-05-27 15:12:07 +00:00
Fiona Campbell
270ea4155a Fix Walleye dim brightness curves
This fixes the issue that cause -1.0f to be added to the brightness
curves when a devices had 0 in the backlight configuration
(config_screenBrightnessBacklight) in config.xml.

This code is the same as it originally was before the float brightness changes.

Bug: 153290107

Test: manual, check values in `adb shell dumpsys display | grep -i
"spline\|mconfig\|mambientlux"`

Change-Id: I332fc09565b26bfc5f108fe32bf109f9584c60a2
2020-05-27 15:51:30 +01:00
Alex Johnston
155d909a08 Merge "Per-profile user restrictions in org-owned managed profile" into rvc-dev 2020-05-27 13:12:43 +00:00
Gavin Corkery
553c94bcab Ensure that health check controller is unbound correctly
Explicitly call into the health check controller if there are
no more packages to check. This is due to the fact that
the ExplicitHealthCheckController will unbind itself in this
case. If this call is not made, the controller will continue
running in the foreground and will not be killed by lmkd.

Test: atest PackageWatchdogTest
Test: check logcat to see that the service is unbound
Bug: 156323728
Change-Id: I0044d0832178ee90043d5e64e406df07ee2c36a2
2020-05-27 13:16:52 +01:00
TreeHugger Robot
148fb0e8c2 Merge "System Bars animation for fixed rotation transform" into rvc-dev 2020-05-27 06:19:51 +00:00
TreeHugger Robot
f49fa1a9ea Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev 2020-05-27 04:39:45 +00:00
Alex Buynytskyy
4e5ff2eb7d Merge "Lifecycle: detecting blocked and unhealthy." into rvc-dev 2020-05-27 04:15:54 +00:00
TreeHugger Robot
d7d14eb420 Merge "Dump UidRecord's capability and list of ProcessRecord." into rvc-dev 2020-05-27 01:28:45 +00:00
Mady Mellor
82e64ff476 Merge changes from topic "canBubble_isBubble_nuances" into rvc-dev
* changes:
  Always open bubble for bubble notifs + fix issue
  canBubble only true when it can actually bubble
2020-05-27 00:06:58 +00:00
TreeHugger Robot
c6d6c0b466 Merge "Avoid setting a barrier on layers that will not render frames" into rvc-dev 2020-05-26 23:55:19 +00:00
TreeHugger Robot
dbc5e64b68 Merge "ShellRoot: Hold lock during binder death." into rvc-dev 2020-05-26 23:42:46 +00:00
Hui Yu
39e99108d1 Dump UidRecord's capability and list of ProcessRecord.
For example:
    UID u0a148: UidRecord{4b1bf83 u0a148 BTOP procs:3 seq(0,0,0)}
      curProcState=3 curCapability=LCM
      proc=ProcessRecord{eaf5d6f 3854:com.google.android.googlequicksearchbox:interactor/u0a148}
      proc=ProcessRecord{9b68072 4143:com.google.android.googlequicksearchbox:search/u0a148}
      proc=ProcessRecord{3eaef29 5665:com.google.android.googlequicksearchbox:assistant/u0a148}

UID u0a148's capability is "LCM", it has 3 processes.

Bug: 157269041
Test: "adb shell dumpsys activity -a", looking for "UidRecord"
Change-Id: I564193f47292b8ebf0e239e8da50536931fc3d75
2020-05-26 16:32:21 -07:00
Adam Bookatz
d626fd310c Unify multiuser switcher enabled setting
This does the following:
1. The multiuser switcher (in Settings and SysUI)
is now disabled by default. In order for it to be enabled
one of the following must be true:
  a. the user has explicitly toggled it on in Settings
  b. a new user gets created (via any means)
  c. config_showUserSwitcherByDefault overrides this default

2. Even if a new user is added, if the user had explicitly
*disabled* the switcher, the switcher still won't be enabled.

3. SystemUI and Settings (et al.) all use
UserManager.isUserSwitcherEnabled as the source of
truth in this regard.
No one else reads USER_SWITCHER_ENABLED directly.

4. If the switcher is enabled, then SystemUI will show the
switcher avatar, even if there are no other users on the device,
as long as new users can be created. This way, if the user
has enabled the switcher, the user can use the avatar to add
guest/secondary users (which would not be possible if enabled
status was tied solely to the existence of other users).

Bug: 137943217
Bug: 141372193
Bug: 149973281
Bug: 130270878

Test: manual: Settings > Multiuser doesn't turn on the systemui avatar
Test: manual: Settings > Multiuser is initially disabled
Test: manual: adb shell pm create-user A, does turn on sysui avatar
              even if the user didn't enable, but not if they disabled

Change-Id: Ia440b4db78792da76f94322a563d93db0c68e933
2020-05-26 23:01:55 +00:00
Chavi Weingarten
d91929d91f Merge "Force reportResized when useBlastSync enabled" into rvc-dev 2020-05-26 21:45:03 +00:00
TreeHugger Robot
851415b693 Merge "Disabled DEBUG_USER constant on SystemService." into rvc-dev 2020-05-26 21:37:46 +00:00
Vishnu Nair
1a7075f235 Avoid setting a barrier on layers that will not render frames
Fixes an issue where a barrier is set on a layer that will not
submit a buffer and transactions will get queued up causing
the system to eventually watchdog.

Fixes: 150578848
Test: Run manual repro steps in bug
Test: go/wm-smoke

Change-Id: Icba60e60fa9e62cca2fb3ff06d73f1975485a91d
2020-05-26 21:09:35 +00:00
Mady Mellor
db0a602465 canBubble only true when it can actually bubble
If the notif is unable to present as a bubble:
  - set the record#canBubble value to false
  - null out bubble metadata if present (we show bubble
    button if there is metadata, so shouldn't show it
    if it can't present for some reason)

Because bubble metadata is now null'd out we don't have
the shortcutId to check / update the tracked shortcut
list, so instead if it's null check for that entry in
the list and remove it. Also fixes one spot where we
weren't unregistering the listener before and adds a
test for it.

Test: atest ShortcutHelperTest BubbleExtractorTest NotificationManagerServiceTest
Bug: 152883583
Change-Id: I29e993c01a8fb9fcdf2386b18a94adc712fe101f
2020-05-26 14:02:36 -07:00
TreeHugger Robot
58c7846f6a Merge "WindowlessWindowManager: Set size when creating surface" into rvc-dev 2020-05-26 20:41:22 +00:00
Todd Kennedy
edd9383a90 Merge "Add check for cross user permission" into rvc-dev 2020-05-26 20:16:41 +00:00
Todd Kennedy
dcf6bafbaa Add check for cross user permission
Bug: 153995991
Bug: 153996872
Bug: 153996866
Bug: 155466646
Test: atest ManagedProfileCrossProfileTest
Change-Id: I9d5f8b506f796c4890352ea9d77ec80d3a9ef1da
2020-05-26 20:15:45 +00:00
Alex Buynytskyy
8ef61aebee Lifecycle: detecting blocked and unhealthy.
Part 1: interfaces and PM implementation.

Bug: 153874006
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: I312dd919d2bb552bea3d72fb49fd1579882da14b
2020-05-26 19:34:39 +00:00
TreeHugger Robot
00b717d6f4 Merge "updateAppUidRecLocked() needs to run for all ProcessRecord of a UidRecord." into rvc-dev 2020-05-26 18:43:51 +00:00
Robert Carr
5d9d2ddca2 WindowlessWindowManager: Set size when creating surface
When we set the buffer size from relayout window, there is a race
condition where the client may then submit its first buffer but the
transaction hasnt applied yet on the SF side and so the buffer is
rejected. Setting a defualt size when creating fixes this. Luckily
SurfaceControlViewHost size is known at add time, since we force the
window size based on the values passed in to the SurfaceControlViewHost API.

Bug: 157153874
Test: Existing tests pass
Change-Id: I2566844aea81df92f1694f43254a480fc3b3c019
2020-05-26 11:29:39 -07:00
Robert Carr
1dc572934c ShellRoot: Hold lock during binder death.
We need to acquire the lock in removeShellRoot because we may
end up calling it from a binder thread.

Bug: 154486882
Test: Existing tests pass
Change-Id: I59bfd521a04f81590c403025c729729438d0d841
2020-05-26 11:19:37 -07:00
Ryan Mitchell
4515014469 Merge "Add overlayable configurator resources" into rvc-dev 2020-05-26 17:53:47 +00:00
Hui Yu
ca10d44c13 updateAppUidRecLocked() needs to run for all ProcessRecord of a
UidRecord.

for example,
adb shell dumpsys  activity -a | grep *APP*  | grep quicksearchbox
*APP* UID 10148 ProcessRecord{a86bfc8 19343:com.google.android.googlequicksearchbox:search/u0a148}
*APP* UID 10148 ProcessRecord{8932590 20318:com.google.android.googlequicksearchbox:assistant/u0a148}
*APP* UID 10148 ProcessRecord{7458b77 19013:com.google.android.googlequicksearchbox:interactor/u0a148}

UID 10148 has three ProcessRecord.

After uidRec.reset(), for uidRec that has multiple processes(ProcessRecord),
We need apply all ProcessRecord into UidRecord, otherwise, the
UidRecord's proc state and capability are wrong.

Bug: 157269041, 152709842
Test: Use the reproduce step in b/152709842, squeeze phone and talk to
Assistant.

Change-Id: Id46dbd4f428968fb2029255fbcf61bba328b582c
2020-05-26 09:49:03 -07:00
felipeal
edec484d1a Disabled DEBUG_USER constant on SystemService.
Test: none
Fixes: 133242016

Change-Id: I0e34ffc37a0701b5a5ab2843402ce504ce97c4a5
2020-05-26 09:47:39 -07:00
chaviw
73abde9d93 Force reportResized when useBlastSync enabled
We need to always reportResized if using blastSync since the window
waiting on a finishDrawing from the client. Therefore, always add the
window to the resizing list even if bounds have not changed.

Test: WindowStateTests#testRequestResizeForBlastSync
Bug: 153579514
Change-Id: I87b459d95fac315b9a25f2d8e989fe3aaf0c0c85
2020-05-26 09:41:53 -07:00
Vadim Caen
4b4fc236ff System Bars animation for fixed rotation transform
Fade out system bars when the fixed transform is starting and fade
them in once its finished.

In other words, if mFixedRotationLaunchingApp is set, the hide
(fade out) animation will start. And if mFixedRotationLaunchingApp
is cleared or seamless rotation is done for fixed rotation, the
show (fade in) animation will start.

Note a special case: the fixed rotation app hides the system bars,
so there may be no window to rotate. Then the show animation will
apply immediately (though they are invisible) to make sure the bars
can be visible by transient state.

Bug: 150676212
Bug: 156864004
Test: Manual: open and close a landscape application, and open and
      immediately cancel opening animation.
      Manual: open a landscape application which hides status bar
      and navigation bar. The bars should still be visible after
      swiping from edge of screen.
Test: WmTests:DisplayContentTests#testApplyTopFixedRotationTransform

Change-Id: Ic326b4bda44b39c875aeb27f33fba31a5cfcfc66
2020-05-27 00:36:51 +08:00
Michael Groover
2046776127 Merge "Address edge cases for signing certificate lineages in sharedUids" into rvc-dev 2020-05-26 16:07:57 +00:00