Loading libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayLayout.java +2 −4 Original line number Diff line number Diff line Loading @@ -96,8 +96,7 @@ public class DisplayLayout { /** * Different from {@link #equals(Object)}, this method compares the basic geometry properties * of two {@link DisplayLayout} objects including width, height, rotation, density, cutout and * insets. * of two {@link DisplayLayout} objects including width, height, rotation, density, cutout. * @return {@code true} if the given {@link DisplayLayout} is identical geometry wise. */ public boolean isSameGeometry(@NonNull DisplayLayout other) { Loading @@ -105,8 +104,7 @@ public class DisplayLayout { && mHeight == other.mHeight && mRotation == other.mRotation && mDensityDpi == other.mDensityDpi && Objects.equals(mCutout, other.mCutout) && Objects.equals(mStableInsets, other.mStableInsets); && Objects.equals(mCutout, other.mCutout); } @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +6 −3 Original line number Diff line number Diff line Loading @@ -616,7 +616,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb return; } int oldMaxMovementBound = mPipBoundsState.getMovementBounds().bottom; onDisplayChanged( onDisplayChangedUncheck( mDisplayController.getDisplayLayout(mPipBoundsState.getDisplayId()), false /* saveRestoreSnapFraction */); int newMaxMovementBound = mPipBoundsState.getMovementBounds().bottom; Loading Loading @@ -702,9 +702,12 @@ public class PipController implements PipTransitionController.PipTransitionCallb } private void onDisplayChanged(DisplayLayout layout, boolean saveRestoreSnapFraction) { if (mPipBoundsState.getDisplayLayout().isSameGeometry(layout)) { return; if (!mPipBoundsState.getDisplayLayout().isSameGeometry(layout)) { onDisplayChangedUncheck(layout, saveRestoreSnapFraction); } } private void onDisplayChangedUncheck(DisplayLayout layout, boolean saveRestoreSnapFraction) { Runnable updateDisplayLayout = () -> { final boolean fromRotation = Transitions.ENABLE_SHELL_TRANSITIONS && mPipBoundsState.getDisplayLayout().rotation() != layout.rotation(); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayLayout.java +2 −4 Original line number Diff line number Diff line Loading @@ -96,8 +96,7 @@ public class DisplayLayout { /** * Different from {@link #equals(Object)}, this method compares the basic geometry properties * of two {@link DisplayLayout} objects including width, height, rotation, density, cutout and * insets. * of two {@link DisplayLayout} objects including width, height, rotation, density, cutout. * @return {@code true} if the given {@link DisplayLayout} is identical geometry wise. */ public boolean isSameGeometry(@NonNull DisplayLayout other) { Loading @@ -105,8 +104,7 @@ public class DisplayLayout { && mHeight == other.mHeight && mRotation == other.mRotation && mDensityDpi == other.mDensityDpi && Objects.equals(mCutout, other.mCutout) && Objects.equals(mStableInsets, other.mStableInsets); && Objects.equals(mCutout, other.mCutout); } @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +6 −3 Original line number Diff line number Diff line Loading @@ -616,7 +616,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb return; } int oldMaxMovementBound = mPipBoundsState.getMovementBounds().bottom; onDisplayChanged( onDisplayChangedUncheck( mDisplayController.getDisplayLayout(mPipBoundsState.getDisplayId()), false /* saveRestoreSnapFraction */); int newMaxMovementBound = mPipBoundsState.getMovementBounds().bottom; Loading Loading @@ -702,9 +702,12 @@ public class PipController implements PipTransitionController.PipTransitionCallb } private void onDisplayChanged(DisplayLayout layout, boolean saveRestoreSnapFraction) { if (mPipBoundsState.getDisplayLayout().isSameGeometry(layout)) { return; if (!mPipBoundsState.getDisplayLayout().isSameGeometry(layout)) { onDisplayChangedUncheck(layout, saveRestoreSnapFraction); } } private void onDisplayChangedUncheck(DisplayLayout layout, boolean saveRestoreSnapFraction) { Runnable updateDisplayLayout = () -> { final boolean fromRotation = Transitions.ENABLE_SHELL_TRANSITIONS && mPipBoundsState.getDisplayLayout().rotation() != layout.rotation(); Loading