Keep mCanAffectSystemUiFlags to be false while in PiP

Introduced in ag/14105379 and it appears that a Window should not be
able to affect system ui flags when it's in PiP mode. Reset this flag
when we're leaving PiP mode.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dH4cGuTxpEYpm2myTNraJI
Bug: 234082669
Test: follow the reproduce steps in bug, see also the video \
      1. status bar does not flash when launch another app \
      2. status bar always visible when launch Settings \
      3. status bar turns back invisible when exiting to fullscreen
Change-Id: I4d64c19750e69a33ad9ec5962ee4e62320b921af
This commit is contained in:
Hongwei Wang
2022-06-14 12:28:18 -07:00
parent 513cc27dc7
commit e9f801e292

View File

@@ -4427,13 +4427,13 @@ class Task extends TaskFragment {
: WINDOWING_MODE_FULLSCREEN;
}
if (currentMode == WINDOWING_MODE_PINNED) {
// In the case that we've disabled affecting the SysUI flags as a part of seamlessly
// transferring the transform on the leash to the task, reset this state once we're
// moving out of pip
setCanAffectSystemUiFlags(true);
mRootWindowContainer.notifyActivityPipModeChanged(this, null);
}
if (likelyResolvedMode == WINDOWING_MODE_PINNED) {
// In the case that we've disabled affecting the SysUI flags as a part of seamlessly
// transferring the transform on the leash to the task, reset this state once we've
// actually entered pip
setCanAffectSystemUiFlags(true);
if (taskDisplayArea.getRootPinnedTask() != null) {
// Can only have 1 pip at a time, so replace an existing pip
taskDisplayArea.getRootPinnedTask().dismissPip();