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

Commit 50b0245f authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

[PiP2] Update magnetized target on config change

We need to make sure dismiss and magnetized target
are properly updated on configuration changes.
Otherwise, any display changes for instance lead to
incorrect magnetized target location.

Bug: 380336325
Flag: com.android.wm.shell.enable_pip2
Test: enter PiP w/ fixed-rotation and drag-to-dismiss
Test: enter PiP, fold/unfold, then drag-to-dismiss
Change-Id: I8cfe243d82392425fb8b3b2e6da20bd3d8f111cd
parent 025f8b58
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@ public class PipController implements ConfigurationChangeListener,
    @Override
    public void onConfigurationChanged(Configuration newConfiguration) {
        mPipDisplayLayoutState.onConfigurationChanged();
        mPipTouchHandler.onConfigurationChanged();
    }

    @Override
+1 −3
Original line number Diff line number Diff line
@@ -363,12 +363,10 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
        mMotionHelper.synchronizePinnedStackBounds();
        reloadResources();

        /*
        if (mPipTaskOrganizer.isInPip()) {
        if (mPipTransitionState.isInPip()) {
            // Recreate the dismiss target for the new orientation.
            mPipDismissTargetHandler.createOrUpdateDismissTarget();
        }
         */
    }

    void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {