Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 608b5a26 authored by Winson Chung's avatar Winson Chung
Browse files

Fix issue with updating canAffectSystemUiFlags when swiping up with PIP

- The previous change reverted to resetting the flag when cleaning
  up the task, so we can remove the other path to reset the flag
- The original intent was to reset the flag when entering PIP, so
  it should be in the likelyResolvedMode == WINDOWING_MODE_PINNED
  block and not the currentMode == WINDOWING_MODE_PINNED block

Bug: 184703546
Test: Verify when entering PIP that we set canAffectSysUiFlags=false
      on transferring the leash, and then back to true when it enters
      PIP
Change-Id: I4c3ef81b6cecde14117a4d75ae1423456ff65f6a
parent 6074ebc1
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -1163,9 +1163,6 @@ public class RecentsAnimationController implements DeathRecipient {
                // Apply the task's pending transaction in case it is detached and its transaction
                // Apply the task's pending transaction in case it is detached and its transaction
                // is not reachable.
                // is not reachable.
                mTask.getPendingTransaction().apply();
                mTask.getPendingTransaction().apply();

                // Reset whether this task can affect the sysui flags
                mTask.setCanAffectSystemUiFlags(true);
            }
            }
        }
        }


+7 −7
Original line number Original line Diff line number Diff line
@@ -5407,18 +5407,18 @@ class Task extends WindowContainer<WindowContainer> {
                    : WINDOWING_MODE_FULLSCREEN;
                    : WINDOWING_MODE_FULLSCREEN;
        }
        }
        if (currentMode == WINDOWING_MODE_PINNED) {
        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
            // 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
            // transferring the transform on the leash to the task, reset this state once we've
            // actually entered pip
            // actually entered pip
            setCanAffectSystemUiFlags(true);
            setCanAffectSystemUiFlags(true);
            mRootWindowContainer.notifyActivityPipModeChanged(null);
            if (taskDisplayArea.getRootPinnedTask() != null) {
        }
        if (likelyResolvedMode == WINDOWING_MODE_PINNED
                && taskDisplayArea.getRootPinnedTask() != null) {

                // Can only have 1 pip at a time, so replace an existing pip
                // Can only have 1 pip at a time, so replace an existing pip
                taskDisplayArea.getRootPinnedTask().dismissPip();
                taskDisplayArea.getRootPinnedTask().dismissPip();
            }
            }
        }
        if (likelyResolvedMode != WINDOWING_MODE_FULLSCREEN
        if (likelyResolvedMode != WINDOWING_MODE_FULLSCREEN
                && topActivity != null && !topActivity.noDisplay
                && topActivity != null && !topActivity.noDisplay
                && topActivity.canForceResizeNonResizable(likelyResolvedMode)) {
                && topActivity.canForceResizeNonResizable(likelyResolvedMode)) {