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

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

Merge "Delay insets updates similar to KCA updates" into main

parents a7c5f0b0 4db00fb2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2033,7 +2033,10 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        tx.apply();
    }

    private void cancelCurrentAnimator() {
    /**
     * Cancels the currently running animator if there is one and removes an overlay if present.
     */
    public void cancelCurrentAnimator() {
        final PipAnimationController.PipTransitionAnimator<?> animator =
                mPipAnimationController.getCurrentAnimator();
        // remove any overlays if present
+7 −5
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
                        return;
                    }
                    onDisplayChanged(mDisplayController.getDisplayLayout(displayId),
                            false /* saveRestoreSnapFraction */);
                            true /* saveRestoreSnapFraction */);
                }

                @Override
@@ -652,9 +652,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb
                            // there's a keyguard present
                            return;
                        }
                        onDisplayChangedUncheck(mDisplayController
                                        .getDisplayLayout(mPipDisplayLayoutState.getDisplayId()),
                        mMainExecutor.executeDelayed(() -> {
                            onDisplayChangedUncheck(mDisplayController.getDisplayLayout(
                                    mPipDisplayLayoutState.getDisplayId()),
                                    false /* saveRestoreSnapFraction */);
                        }, PIP_KEEP_CLEAR_AREAS_DELAY);
                    }
                });

@@ -800,7 +802,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
            }
        };

        if (mPipTaskOrganizer.isInPip() && saveRestoreSnapFraction) {
        if (mPipTransitionState.hasEnteredPip() && saveRestoreSnapFraction) {
            mMenuController.attachPipMenuView();
            // Calculate the snap fraction of the current stack along the old movement bounds
            final PipSnapAlgorithm pipSnapAlgorithm = mPipBoundsAlgorithm.getSnapAlgorithm();
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ public class PipControllerTest extends ShellTestCase {
        when(mMockPipDisplayLayoutState.getDisplayLayout()).thenReturn(mMockDisplayLayout1);
        when(mMockDisplayController.getDisplayLayout(displayId)).thenReturn(mMockDisplayLayout2);

        when(mMockPipTaskOrganizer.isInPip()).thenReturn(true);
        when(mMockPipTransitionState.hasEnteredPip()).thenReturn(true);
        mPipController.mDisplaysChangedListener.onDisplayConfigurationChanged(
                displayId, new Configuration());