Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/IPipAnimationListener.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,9 @@ oneway interface IPipAnimationListener { * Notifies the listener that user leaves PiP by tapping on the expand button. */ void onExpandPip(); /** * Notifies the listener that the PiP has exited. */ void onExitPip(); } libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +10 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb * Notifies the listener that user leaves PiP by tapping on the expand button. */ void onExpandPip(); /** * Notifies the listener that the PiP has exited. */ void onExitPip(); } /** Loading Loading @@ -1305,6 +1310,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb public void onExpandPip() { mListener.call(l -> l.onExpandPip()); } @Override public void onExitPip() { mListener.call(l -> l.onExitPip()); } }; IPipImpl(PipController controller) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java +13 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,11 @@ public class PipController implements ConfigurationChangeListener, * Notifies the listener that user leaves PiP by tapping on the expand button. */ void onExpandPip(); /** * Notifies the listener that the PiP has exited. */ void onExitPip(); } private PipController(Context context, Loading Loading @@ -622,6 +627,9 @@ public class PipController implements ConfigurationChangeListener, for (Consumer<Boolean> listener : mOnIsInPipStateChangedListeners) { listener.accept(false /* inPip */); } if (mPipRecentsAnimationListener != null) { mPipRecentsAnimationListener.onExitPip(); } break; case PipTransitionState.SCHEDULED_BOUNDS_CHANGE: mWaitingToPlayDisplayChangeBoundsUpdate = Loading Loading @@ -774,6 +782,11 @@ public class PipController implements ConfigurationChangeListener, public void onExpandPip() { mListener.call(l -> l.onExpandPip()); } @Override public void onExitPip() { mListener.call(l -> l.onExitPip()); } }; IPipImpl(PipController controller) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java +11 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import static com.android.wm.shell.recents.RecentsTransitionStateListener.TRANSI import static com.android.wm.shell.shared.ShellSharedConstants.KEY_EXTRA_SHELL_CAN_HAND_OFF_ANIMATION; import static com.android.wm.shell.shared.split.SplitBounds.KEY_EXTRA_SPLIT_BOUNDS; import static com.android.wm.shell.transition.Transitions.TRANSIT_END_RECENTS_TRANSITION; import static com.android.wm.shell.transition.Transitions.TRANSIT_REMOVE_PIP; import static com.android.wm.shell.transition.Transitions.TRANSIT_START_RECENTS_TRANSITION; import android.annotation.Nullable; Loading Loading @@ -987,6 +988,16 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler, cancel("transit_sleep"); return; } if (info.getType() == TRANSIT_REMOVE_PIP && PipFlags.isPip2ExperimentEnabled()) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION, "[%d] RecentsController.merge: transit_remove_pip", mInstanceId); // Cancel the merge if transition is removing PiP; PiP is on top of everything else. cancel(mWillFinishToHome /* toHome */, mWillFinishToHome /* withScreenshots */, "transit_remove_pip"); return; } if (mKeyguardLocked || (info.getFlags() & KEYGUARD_VISIBILITY_TRANSIT_FLAGS) != 0) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION, "[%d] RecentsController.merge: keyguard is locked", mInstanceId); Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ public class PipControllerTest extends ShellTestCase { public void onPipResourceDimensionsChanged(int cornerRadius, int shadowRadius) {} @Override public void onExpandPip() {} @Override public void onExitPip() {} }); assertTrue(mPipController.hasPinnedStackAnimationListener()); // Create initial interface Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/IPipAnimationListener.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,9 @@ oneway interface IPipAnimationListener { * Notifies the listener that user leaves PiP by tapping on the expand button. */ void onExpandPip(); /** * Notifies the listener that the PiP has exited. */ void onExitPip(); }
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +10 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb * Notifies the listener that user leaves PiP by tapping on the expand button. */ void onExpandPip(); /** * Notifies the listener that the PiP has exited. */ void onExitPip(); } /** Loading Loading @@ -1305,6 +1310,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb public void onExpandPip() { mListener.call(l -> l.onExpandPip()); } @Override public void onExitPip() { mListener.call(l -> l.onExitPip()); } }; IPipImpl(PipController controller) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java +13 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,11 @@ public class PipController implements ConfigurationChangeListener, * Notifies the listener that user leaves PiP by tapping on the expand button. */ void onExpandPip(); /** * Notifies the listener that the PiP has exited. */ void onExitPip(); } private PipController(Context context, Loading Loading @@ -622,6 +627,9 @@ public class PipController implements ConfigurationChangeListener, for (Consumer<Boolean> listener : mOnIsInPipStateChangedListeners) { listener.accept(false /* inPip */); } if (mPipRecentsAnimationListener != null) { mPipRecentsAnimationListener.onExitPip(); } break; case PipTransitionState.SCHEDULED_BOUNDS_CHANGE: mWaitingToPlayDisplayChangeBoundsUpdate = Loading Loading @@ -774,6 +782,11 @@ public class PipController implements ConfigurationChangeListener, public void onExpandPip() { mListener.call(l -> l.onExpandPip()); } @Override public void onExitPip() { mListener.call(l -> l.onExitPip()); } }; IPipImpl(PipController controller) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java +11 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import static com.android.wm.shell.recents.RecentsTransitionStateListener.TRANSI import static com.android.wm.shell.shared.ShellSharedConstants.KEY_EXTRA_SHELL_CAN_HAND_OFF_ANIMATION; import static com.android.wm.shell.shared.split.SplitBounds.KEY_EXTRA_SPLIT_BOUNDS; import static com.android.wm.shell.transition.Transitions.TRANSIT_END_RECENTS_TRANSITION; import static com.android.wm.shell.transition.Transitions.TRANSIT_REMOVE_PIP; import static com.android.wm.shell.transition.Transitions.TRANSIT_START_RECENTS_TRANSITION; import android.annotation.Nullable; Loading Loading @@ -987,6 +988,16 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler, cancel("transit_sleep"); return; } if (info.getType() == TRANSIT_REMOVE_PIP && PipFlags.isPip2ExperimentEnabled()) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION, "[%d] RecentsController.merge: transit_remove_pip", mInstanceId); // Cancel the merge if transition is removing PiP; PiP is on top of everything else. cancel(mWillFinishToHome /* toHome */, mWillFinishToHome /* withScreenshots */, "transit_remove_pip"); return; } if (mKeyguardLocked || (info.getFlags() & KEYGUARD_VISIBILITY_TRANSIT_FLAGS) != 0) { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION, "[%d] RecentsController.merge: keyguard is locked", mInstanceId); Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/PipControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,8 @@ public class PipControllerTest extends ShellTestCase { public void onPipResourceDimensionsChanged(int cornerRadius, int shadowRadius) {} @Override public void onExpandPip() {} @Override public void onExitPip() {} }); assertTrue(mPipController.hasPinnedStackAnimationListener()); // Create initial interface Loading