Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6f22333 authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android Build Coastguard Worker
Browse files

Avoid fullscreen bounds check while exiting pip

Temporarily remove the check for fullscreen end bounds
while exiting pip in PipTransition, and always set
the bounds to be inherited from parent bounds.

This helps avoid getting stuck in an inconsistent state
while exiting pip via clicking app icon.

The flicker still appears, however, and will have to be fixed
in a later release by running auto-enter-pip in a single transition.

Bug: 286346098
Test: Repeat enter auto-pip and exit by launching from icon
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:96712e6b3abff915831311244a20777036820f4e)
Merged-In: Ie5d5fb1b1249a16ec20d05b2eec4590869251277
Change-Id: Ie5d5fb1b1249a16ec20d05b2eec4590869251277
parent e5ce8365
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -567,7 +567,16 @@ public class PipTransition extends PipTransitionController {
                mPipBoundsState.getDisplayBounds());
        mFinishCallback = (wct, wctCB) -> {
            mPipOrganizer.onExitPipFinished(taskInfo);
            if (!Transitions.SHELL_TRANSITIONS_ROTATION && toFullscreen) {

            // TODO(b/286346098): remove the OPEN app flicker completely
            // not checking if we go to fullscreen helps avoid getting pip into an inconsistent
            // state after the flicker occurs. This is a temp solution until flicker is removed.
            if (!Transitions.SHELL_TRANSITIONS_ROTATION) {
                // will help to debug the case when we are not exiting to fullscreen
                if (!toFullscreen) {
                    ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                            "%s: startExitAnimation() not exiting to fullscreen", TAG);
                }
                wct = wct != null ? wct : new WindowContainerTransaction();
                wct.setBounds(pipTaskToken, null);
                mPipOrganizer.applyWindowingModeChangeOnExit(wct, TRANSITION_DIRECTION_LEAVE_PIP);