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

Commit d8a0b498 authored by Robin Lee's avatar Robin Lee Committed by Automerger Merge Worker
Browse files

Merge "Global scale must always be updated when size compat scale is changed"...

Merge "Global scale must always be updated when size compat scale is changed" into main am: 7b5463ab am: 42ee836e am: e5315e34 am: 3c971c3b am: ea489edf

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2750502



Change-Id: I480e71b63fcf35bf8a0260dd32899fbc4fd459c5
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 40d768fd ea489edf
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -8264,7 +8264,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    private void clearSizeCompatModeAttributes() {
        mInSizeCompatModeForBounds = false;
        final float lastSizeCompatScale = mSizeCompatScale;
        mSizeCompatScale = 1f;
        if (mSizeCompatScale != lastSizeCompatScale) {
            forAllWindows(WindowState::updateGlobalScale, false /* traverseTopToBottom */);
        }
        mSizeCompatBounds = null;
        mCompatDisplayInsets = null;
        mLetterboxUiController.clearInheritedCompatDisplayInsets();
@@ -8272,11 +8276,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

    @VisibleForTesting
    void clearSizeCompatMode() {
        final float lastSizeCompatScale = mSizeCompatScale;
        clearSizeCompatModeAttributes();
        if (mSizeCompatScale != lastSizeCompatScale) {
            forAllWindows(WindowState::updateGlobalScale, false /* traverseTopToBottom */);
        }
        // Clear config override in #updateCompatDisplayInsets().
        final int activityType = getActivityType();
        final Configuration overrideConfig = getRequestedOverrideConfiguration();