diff options
| author | 2023-11-17 01:46:19 +0000 | |
|---|---|---|
| committer | 2023-11-17 01:46:19 +0000 | |
| commit | fa48db8ca66dcb0102c970f207366b35a0cd3bd5 (patch) | |
| tree | 8064d99ef9527fbc573f61b08eef4ea0e15b4709 /libs | |
| parent | 3b930b1a1452d68369982f3ef368aa467cf5672c (diff) | |
| parent | 2c2b7136ae0589fc5a33e9f197f63c6fc7fb4d86 (diff) | |
Merge "Implement no animation expand pip (2/2)" into main
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java | 10 | ||||
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java | 21 |
2 files changed, 2 insertions, 29 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java index 9bb383f0b61a..0448d94669ce 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java @@ -57,11 +57,6 @@ public class PipScheduler { @Nullable private SurfaceControl mPinnedTaskLeash; - // the leash of the original task of the PiP activity; - // used to synchronize app drawings in the multi-activity case - @Nullable - private SurfaceControl mOriginalTaskLeash; - /** * A temporary broadcast receiver to initiate exit PiP via expand. * This will later be modified to be triggered by the PiP menu. @@ -95,10 +90,6 @@ public class PipScheduler { mPinnedTaskLeash = pinnedTaskLeash; } - void setOriginalTaskLeash(SurfaceControl originalTaskLeash) { - mOriginalTaskLeash = originalTaskLeash; - } - void setPipTaskToken(@Nullable WindowContainerToken pipTaskToken) { mPipTaskToken = pipTaskToken; } @@ -133,6 +124,5 @@ public class PipScheduler { void onExitPip() { mPipTaskToken = null; mPinnedTaskLeash = null; - mOriginalTaskLeash = null; } } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java index 7d3bd658d126..6200ea583a48 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java @@ -16,7 +16,6 @@ package com.android.wm.shell.pip2.phone; -import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.view.WindowManager.TRANSIT_OPEN; @@ -50,7 +49,7 @@ import com.android.wm.shell.transition.Transitions; public class PipTransition extends PipTransitionController { private static final String TAG = PipTransition.class.getSimpleName(); - private PipScheduler mPipScheduler; + private final PipScheduler mPipScheduler; @Nullable private WindowContainerToken mPipTaskToken; @Nullable @@ -168,14 +167,9 @@ public class PipTransition extends PipTransitionController { } mPipTaskToken = pipChange.getContainer(); - // cache the PiP task token and the relevant leashes + // cache the PiP task token and leash mPipScheduler.setPipTaskToken(mPipTaskToken); mPipScheduler.setPinnedTaskLeash(pipChange.getLeash()); - // check if we entered PiP from a multi-activity task and set the original task leash - final int lastParentTaskId = pipChange.getTaskInfo().lastParentTaskIdBeforePip; - final boolean isSingleActivity = lastParentTaskId == INVALID_TASK_ID; - mPipScheduler.setOriginalTaskLeash(isSingleActivity ? null : - findChangeByTaskId(info, lastParentTaskId).getLeash()); startTransaction.apply(); finishCallback.onTransitionFinished(null); @@ -201,17 +195,6 @@ public class PipTransition extends PipTransitionController { return null; } - @Nullable - private TransitionInfo.Change findChangeByTaskId(TransitionInfo info, int taskId) { - for (TransitionInfo.Change change : info.getChanges()) { - if (change.getTaskInfo() != null - && change.getTaskInfo().taskId == taskId) { - return change; - } - } - return null; - } - private void onExitPip() { mPipTaskToken = null; mPipScheduler.onExitPip(); |