From e9f801e292ff3b1b0f554fca77bad431347da6bc Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Tue, 14 Jun 2022 12:28:18 -0700 Subject: 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 --- services/core/java/com/android/server/wm/Task.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index fc1b89348c25..3a272859c70c 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -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(); -- cgit v1.2.3-59-g8ed1b