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

Commit 4207033f authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android (Google) Code Review
Browse files

Merge "Calculate KCA Rect once PiP consistent" into main

parents f450ef06 4ddb740a
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -376,6 +376,7 @@ public class PipController implements ConfigurationChangeListener,
    private void setLauncherKeepClearAreaHeight(boolean visible, int height) {
        ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                "setLauncherKeepClearAreaHeight: visible=%b, height=%d", visible, height);
        mPipTransitionState.setOnIdlePipTransitionStateRunnable(() -> {
            if (visible) {
                Rect rect = new Rect(
                        0, mPipDisplayLayoutState.getDisplayBounds().bottom - height,
@@ -388,6 +389,7 @@ public class PipController implements ConfigurationChangeListener,
                        PipBoundsState.NAMED_KCA_LAUNCHER_SHELF, null);
            }
            mPipTouchHandler.onShelfVisibilityChanged(visible, height);
        });
    }

    @Override
+8 −10
Original line number Diff line number Diff line
@@ -231,7 +231,6 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
                // KCA triggered movement to wait for other transitions (e.g. due to IME changes).
                return;
            }
            mPipTransitionState.setOnIdlePipTransitionStateRunnable(() -> {
            boolean hasUserInteracted = (mPipBoundsState.hasUserMovedPip()
                    || mPipBoundsState.hasUserResizedPip());
            int delta = mPipBoundsAlgorithm.getEntryDestinationBounds().top
@@ -241,7 +240,6 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
                // If the user hasn't interacted with PiP, we respect the keep clear areas
                mMotionHelper.animateToOffset(mPipBoundsState.getBounds(), delta);
            }
            });
        };

        if (PipUtils.isPip2ExperimentEnabled()) {