Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -1096,11 +1096,13 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, * Handles all changes to the PictureInPictureParams. * Handles all changes to the PictureInPictureParams. */ */ protected void applyNewPictureInPictureParams(@NonNull PictureInPictureParams params) { protected void applyNewPictureInPictureParams(@NonNull PictureInPictureParams params) { if (PipUtils.aspectRatioChanged(params.getAspectRatioFloat(), if (mDeferredTaskInfo != null || PipUtils.aspectRatioChanged(params.getAspectRatioFloat(), mPictureInPictureParams.getAspectRatioFloat())) { mPictureInPictureParams.getAspectRatioFloat())) { mPipParamsChangedForwarder.notifyAspectRatioChanged(params.getAspectRatioFloat()); mPipParamsChangedForwarder.notifyAspectRatioChanged(params.getAspectRatioFloat()); } } if (PipUtils.remoteActionsChanged(params.getActions(), mPictureInPictureParams.getActions()) if (mDeferredTaskInfo != null || PipUtils.remoteActionsChanged(params.getActions(), mPictureInPictureParams.getActions()) || !PipUtils.remoteActionsMatch(params.getCloseAction(), || !PipUtils.remoteActionsMatch(params.getCloseAction(), mPictureInPictureParams.getCloseAction())) { mPictureInPictureParams.getCloseAction())) { mPipParamsChangedForwarder.notifyActionsChanged(params.getActions(), mPipParamsChangedForwarder.notifyActionsChanged(params.getActions(), Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt +12 −0 Original line number Original line Diff line number Diff line Loading @@ -123,6 +123,18 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition } } } } @Presubmit @Test fun pipSameAspectRatio() { val layerName = pipApp.component.toLayerName() testSpec.assertLayers { val pipLayerList = this.layers { it.name.contains(layerName) && it.isVisible } pipLayerList.zipWithNext { previous, current -> current.visibleRegion.isSameAspectRatio(previous.visibleRegion) } } } /** /** * Checks [pipApp] window remains pinned throughout the animation * Checks [pipApp] window remains pinned throughout the animation */ */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -1096,11 +1096,13 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, * Handles all changes to the PictureInPictureParams. * Handles all changes to the PictureInPictureParams. */ */ protected void applyNewPictureInPictureParams(@NonNull PictureInPictureParams params) { protected void applyNewPictureInPictureParams(@NonNull PictureInPictureParams params) { if (PipUtils.aspectRatioChanged(params.getAspectRatioFloat(), if (mDeferredTaskInfo != null || PipUtils.aspectRatioChanged(params.getAspectRatioFloat(), mPictureInPictureParams.getAspectRatioFloat())) { mPictureInPictureParams.getAspectRatioFloat())) { mPipParamsChangedForwarder.notifyAspectRatioChanged(params.getAspectRatioFloat()); mPipParamsChangedForwarder.notifyAspectRatioChanged(params.getAspectRatioFloat()); } } if (PipUtils.remoteActionsChanged(params.getActions(), mPictureInPictureParams.getActions()) if (mDeferredTaskInfo != null || PipUtils.remoteActionsChanged(params.getActions(), mPictureInPictureParams.getActions()) || !PipUtils.remoteActionsMatch(params.getCloseAction(), || !PipUtils.remoteActionsMatch(params.getCloseAction(), mPictureInPictureParams.getCloseAction())) { mPictureInPictureParams.getCloseAction())) { mPipParamsChangedForwarder.notifyActionsChanged(params.getActions(), mPipParamsChangedForwarder.notifyActionsChanged(params.getActions(), Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt +12 −0 Original line number Original line Diff line number Diff line Loading @@ -123,6 +123,18 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition } } } } @Presubmit @Test fun pipSameAspectRatio() { val layerName = pipApp.component.toLayerName() testSpec.assertLayers { val pipLayerList = this.layers { it.name.contains(layerName) && it.isVisible } pipLayerList.zipWithNext { previous, current -> current.visibleRegion.isSameAspectRatio(previous.visibleRegion) } } } /** /** * Checks [pipApp] window remains pinned throughout the animation * Checks [pipApp] window remains pinned throughout the animation */ */ Loading