Merge "Fix Maps PiP entrance to not bounce down and up" into udc-dev

This commit is contained in:
Mateusz Cicheński
2023-05-13 00:11:08 +00:00
committed by Android (Google) Code Review

View File

@@ -946,10 +946,15 @@ public class PipController implements PipTransitionController.PipTransitionCallb
mPipBoundsState.getDisplayBounds().right, mPipBoundsState.getDisplayBounds().right,
mPipBoundsState.getDisplayBounds().bottom); mPipBoundsState.getDisplayBounds().bottom);
mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect); mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
updatePipPositionForKeepClearAreas();
} else { } else {
mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG); mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
// postpone moving in response to hide of Launcher in case there's another change
mMainExecutor.removeCallbacks(mMovePipInResponseToKeepClearAreasChangeCallback);
mMainExecutor.executeDelayed(
mMovePipInResponseToKeepClearAreasChangeCallback,
PIP_KEEP_CLEAR_AREAS_DELAY);
} }
updatePipPositionForKeepClearAreas();
} }
private void setLauncherAppIconSize(int iconSizePx) { private void setLauncherAppIconSize(int iconSizePx) {