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
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
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
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
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
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
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
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
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
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
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
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
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