Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +3 −3 Original line number Diff line number Diff line Loading @@ -156,11 +156,11 @@ public abstract class PipTransitionController implements Transitions.TransitionH } /** * Called when the Shell wants to start resizing Pip transition/animation. * Called when the Shell wants to start changing the Pip bounds transition/animation. * * @param duration the suggested duration for resize animation. * @param duration the suggested duration for bounds change animation. */ public void startResizeTransition(WindowContainerTransaction wct, int duration) { public void startPipBoundsChangeTransition(WindowContainerTransaction wct, int duration) { // Default implementation does nothing. } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipDisplayTransferHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,6 +86,6 @@ public class PipDisplayTransferHandler implements if (startTx == null) return; startTx.apply(); mPipScheduler.scheduleFinishResizePip(destinationBounds); mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); } } libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java +5 −5 Original line number Diff line number Diff line Loading @@ -52,11 +52,11 @@ import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.shared.animation.PhysicsAnimator; import com.android.wm.shell.shared.magnetictarget.MagnetizedObject; import java.util.Optional; import kotlin.Unit; import kotlin.jvm.functions.Function0; import java.util.Optional; /** * A helper to animate and manipulate the PiP. */ Loading Loading @@ -810,7 +810,7 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, cleanUpHighPerfSessionMaybe(); // Signal that the transition is done - should update transition state by default. mPipScheduler.scheduleFinishResizePip(destinationBounds); mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); } private void startResizeAnimation(SurfaceControl.Transaction startTx, Loading @@ -830,8 +830,8 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, settlePipBoundsAfterPhysicsAnimation(false /* animatingAfter */); cleanUpHighPerfSessionMaybe(); // Signal that we are done with resize transition mPipScheduler.scheduleFinishResizePip(destinationBounds); // Signal that we are done with bounds change transition mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); }); animator.start(); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipResizeGestureHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -530,8 +530,8 @@ public class PipResizeGestureHandler implements resetState(); cleanUpHighPerfSessionMaybe(); // Signal that we are done with resize transition mPipScheduler.scheduleFinishResizePip(destinationBounds); // Signal that we are done with bounds change transition mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); }); animator.start(); break; Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java +6 −6 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ public class PipScheduler implements PipTransitionState.PipTransitionStateChange } } wct.setBounds(pipTaskToken, toBounds); mPipTransitionController.startResizeTransition(wct, duration); mPipTransitionController.startPipBoundsChangeTransition(wct, duration); } /** Loading Loading @@ -230,19 +230,19 @@ public class PipScheduler implements PipTransitionState.PipTransitionStateChange Rect newSampleBounds = new Rect(0, 0, (int) newWidth, (int) newHeight); wct.setBounds(pipTaskToken, newSampleBounds); mPipTransitionController.startResizeTransition(wct, DISPLAY_TRANSFER_DURATION_MS); mPipTransitionController.startPipBoundsChangeTransition(wct, DISPLAY_TRANSFER_DURATION_MS); } /** * Signals to Core to finish the PiP resize transition. * Signals to Core to finish the PiP bounds change transition. * Note that we do not allow any actual WM Core changes at this point. * * @param toBounds destination bounds used only for internal state updates - not sent to Core. */ public void scheduleFinishResizePip(Rect toBounds) { public void scheduleFinishPipBoundsChange(Rect toBounds) { // Make updates to the internal state to reflect new bounds before updating any transitions // related state; transition state updates can trigger callbacks that use the cached bounds. onFinishingPipResize(toBounds); onFinishingPipBoundsChange(toBounds); mPipTransitionController.finishTransition(); } Loading Loading @@ -309,7 +309,7 @@ public class PipScheduler implements PipTransitionState.PipTransitionStateChange } } private void onFinishingPipResize(Rect newBounds) { private void onFinishingPipBoundsChange(Rect newBounds) { if (mPipBoundsState.getBounds().equals(newBounds)) { return; } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +3 −3 Original line number Diff line number Diff line Loading @@ -156,11 +156,11 @@ public abstract class PipTransitionController implements Transitions.TransitionH } /** * Called when the Shell wants to start resizing Pip transition/animation. * Called when the Shell wants to start changing the Pip bounds transition/animation. * * @param duration the suggested duration for resize animation. * @param duration the suggested duration for bounds change animation. */ public void startResizeTransition(WindowContainerTransaction wct, int duration) { public void startPipBoundsChangeTransition(WindowContainerTransaction wct, int duration) { // Default implementation does nothing. } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipDisplayTransferHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -86,6 +86,6 @@ public class PipDisplayTransferHandler implements if (startTx == null) return; startTx.apply(); mPipScheduler.scheduleFinishResizePip(destinationBounds); mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); } }
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java +5 −5 Original line number Diff line number Diff line Loading @@ -52,11 +52,11 @@ import com.android.wm.shell.protolog.ShellProtoLogGroup; import com.android.wm.shell.shared.animation.PhysicsAnimator; import com.android.wm.shell.shared.magnetictarget.MagnetizedObject; import java.util.Optional; import kotlin.Unit; import kotlin.jvm.functions.Function0; import java.util.Optional; /** * A helper to animate and manipulate the PiP. */ Loading Loading @@ -810,7 +810,7 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, cleanUpHighPerfSessionMaybe(); // Signal that the transition is done - should update transition state by default. mPipScheduler.scheduleFinishResizePip(destinationBounds); mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); } private void startResizeAnimation(SurfaceControl.Transaction startTx, Loading @@ -830,8 +830,8 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, settlePipBoundsAfterPhysicsAnimation(false /* animatingAfter */); cleanUpHighPerfSessionMaybe(); // Signal that we are done with resize transition mPipScheduler.scheduleFinishResizePip(destinationBounds); // Signal that we are done with bounds change transition mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); }); animator.start(); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipResizeGestureHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -530,8 +530,8 @@ public class PipResizeGestureHandler implements resetState(); cleanUpHighPerfSessionMaybe(); // Signal that we are done with resize transition mPipScheduler.scheduleFinishResizePip(destinationBounds); // Signal that we are done with bounds change transition mPipScheduler.scheduleFinishPipBoundsChange(destinationBounds); }); animator.start(); break; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipScheduler.java +6 −6 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ public class PipScheduler implements PipTransitionState.PipTransitionStateChange } } wct.setBounds(pipTaskToken, toBounds); mPipTransitionController.startResizeTransition(wct, duration); mPipTransitionController.startPipBoundsChangeTransition(wct, duration); } /** Loading Loading @@ -230,19 +230,19 @@ public class PipScheduler implements PipTransitionState.PipTransitionStateChange Rect newSampleBounds = new Rect(0, 0, (int) newWidth, (int) newHeight); wct.setBounds(pipTaskToken, newSampleBounds); mPipTransitionController.startResizeTransition(wct, DISPLAY_TRANSFER_DURATION_MS); mPipTransitionController.startPipBoundsChangeTransition(wct, DISPLAY_TRANSFER_DURATION_MS); } /** * Signals to Core to finish the PiP resize transition. * Signals to Core to finish the PiP bounds change transition. * Note that we do not allow any actual WM Core changes at this point. * * @param toBounds destination bounds used only for internal state updates - not sent to Core. */ public void scheduleFinishResizePip(Rect toBounds) { public void scheduleFinishPipBoundsChange(Rect toBounds) { // Make updates to the internal state to reflect new bounds before updating any transitions // related state; transition state updates can trigger callbacks that use the cached bounds. onFinishingPipResize(toBounds); onFinishingPipBoundsChange(toBounds); mPipTransitionController.finishTransition(); } Loading Loading @@ -309,7 +309,7 @@ public class PipScheduler implements PipTransitionState.PipTransitionStateChange } } private void onFinishingPipResize(Rect newBounds) { private void onFinishingPipBoundsChange(Rect newBounds) { if (mPipBoundsState.getBounds().equals(newBounds)) { return; } Loading