Loading services/core/java/com/android/server/wm/TransitionController.java +17 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,23 @@ class TransitionController { return null; } /** * @return The playing transition that is transiently-hiding the given {@param container}, or * null if there isn't one * @param container A participant of a transient-hide transition */ @Nullable Transition getTransientHideTransitionForContainer( @NonNull WindowContainer container) { for (int i = mPlayingTransitions.size() - 1; i >= 0; --i) { final Transition transition = mPlayingTransitions.get(i); if (transition.isInTransientHide(container)) { return transition; } } return null; } /** Returns {@code true} if the display contains a transient-launch transition. */ boolean hasTransientLaunch(@NonNull DisplayContent dc) { if (mCollectingTransition != null && mCollectingTransition.hasTransientLaunch() Loading services/core/java/com/android/server/wm/WindowOrganizerController.java +17 −3 Original line number Diff line number Diff line Loading @@ -702,11 +702,25 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub if ((entry.getValue().getChangeMask() & WindowContainerTransaction.Change.CHANGE_FORCE_NO_PIP) != 0) { if (com.android.wm.shell.Flags.enableRecentsBookendTransition()) { // If we are using a bookend transition, then the transition that we need // to disable pip on finish is the original transient transition, not the // bookend transition final Transition transientHideTransition = mTransitionController.getTransientHideTransitionForContainer(wc); if (transientHideTransition != null) { transientHideTransition.setCanPipOnFinish(false); } else { ProtoLog.v(WmProtoLogGroups.WM_DEBUG_WINDOW_TRANSITIONS, "Set do-not-pip: no task"); } } else { // Disable entering pip (eg. when recents pretends to finish itself) if (chain.mTransition != null) { chain.mTransition.setCanPipOnFinish(false /* canPipOnFinish */); } } } // A bit hacky, but we need to detect "remove PiP" so that we can "wrap" the // setWindowingMode call in force-hidden. boolean forceHiddenForPip = false; Loading Loading
services/core/java/com/android/server/wm/TransitionController.java +17 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,23 @@ class TransitionController { return null; } /** * @return The playing transition that is transiently-hiding the given {@param container}, or * null if there isn't one * @param container A participant of a transient-hide transition */ @Nullable Transition getTransientHideTransitionForContainer( @NonNull WindowContainer container) { for (int i = mPlayingTransitions.size() - 1; i >= 0; --i) { final Transition transition = mPlayingTransitions.get(i); if (transition.isInTransientHide(container)) { return transition; } } return null; } /** Returns {@code true} if the display contains a transient-launch transition. */ boolean hasTransientLaunch(@NonNull DisplayContent dc) { if (mCollectingTransition != null && mCollectingTransition.hasTransientLaunch() Loading
services/core/java/com/android/server/wm/WindowOrganizerController.java +17 −3 Original line number Diff line number Diff line Loading @@ -702,11 +702,25 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub if ((entry.getValue().getChangeMask() & WindowContainerTransaction.Change.CHANGE_FORCE_NO_PIP) != 0) { if (com.android.wm.shell.Flags.enableRecentsBookendTransition()) { // If we are using a bookend transition, then the transition that we need // to disable pip on finish is the original transient transition, not the // bookend transition final Transition transientHideTransition = mTransitionController.getTransientHideTransitionForContainer(wc); if (transientHideTransition != null) { transientHideTransition.setCanPipOnFinish(false); } else { ProtoLog.v(WmProtoLogGroups.WM_DEBUG_WINDOW_TRANSITIONS, "Set do-not-pip: no task"); } } else { // Disable entering pip (eg. when recents pretends to finish itself) if (chain.mTransition != null) { chain.mTransition.setCanPipOnFinish(false /* canPipOnFinish */); } } } // A bit hacky, but we need to detect "remove PiP" so that we can "wrap" the // setWindowingMode call in force-hidden. boolean forceHiddenForPip = false; Loading