diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/RecentsAnimationController.java | 3 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 14 |
2 files changed, 7 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java index 737e7d10c3b4..2feb8a743930 100644 --- a/services/core/java/com/android/server/wm/RecentsAnimationController.java +++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java @@ -1163,9 +1163,6 @@ public class RecentsAnimationController implements DeathRecipient { // Apply the task's pending transaction in case it is detached and its transaction // is not reachable. mTask.getPendingTransaction().apply(); - - // Reset whether this task can affect the sysui flags - mTask.setCanAffectSystemUiFlags(true); } } diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 93fc4f2a3149..039422d2c6a4 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -5407,17 +5407,17 @@ class Task extends WindowContainer<WindowContainer> { : WINDOWING_MODE_FULLSCREEN; } if (currentMode == WINDOWING_MODE_PINNED) { + mRootWindowContainer.notifyActivityPipModeChanged(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); - mRootWindowContainer.notifyActivityPipModeChanged(null); - } - if (likelyResolvedMode == WINDOWING_MODE_PINNED - && taskDisplayArea.getRootPinnedTask() != null) { - - // Can only have 1 pip at a time, so replace an existing pip - taskDisplayArea.getRootPinnedTask().dismissPip(); + if (taskDisplayArea.getRootPinnedTask() != null) { + // Can only have 1 pip at a time, so replace an existing pip + taskDisplayArea.getRootPinnedTask().dismissPip(); + } } if (likelyResolvedMode != WINDOWING_MODE_FULLSCREEN && topActivity != null && !topActivity.noDisplay |