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

Commit 4bf30171 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Remove unnecessary calculation of display configuration" into...

Merge "Remove unnecessary calculation of display configuration" into tm-qpr-dev am: 9fefe95b am: ad4e58bb

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



Change-Id: I6b4fe73b32443ded4e6c6e148de60c73984e22f2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 54b16b09 ad4e58bb
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -1618,24 +1618,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            }
            config = new Configuration();
            computeScreenConfiguration(config);
        } else if (!(mTransitionController.isCollecting(this)
                // If waiting for a remote display change, don't prematurely update configuration.
                || mRemoteDisplayChangeController.isWaitingForRemoteDisplayChange())) {
            // No obvious action we need to take, but if our current state mismatches the
            // activity manager's, update it, disregarding font scale, which should remain set
            // to the value of the previous configuration.
            // Here we're calling Configuration#unset() instead of setToDefaults() because we
            // need to keep override configs clear of non-empty values (e.g. fontSize).
            final Configuration currentConfig = getRequestedOverrideConfiguration();
            mTmpConfiguration.unset();
            mTmpConfiguration.updateFrom(currentConfig);
            computeScreenConfiguration(mTmpConfiguration);
            if (currentConfig.diff(mTmpConfiguration) != 0) {
                mWaitingForConfig = true;
                setLayoutNeeded();
                mDisplayRotation.prepareNormalRotationAnimation();
                config = new Configuration(mTmpConfiguration);
            }
        }

        return config;
+1 −0
Original line number Diff line number Diff line
@@ -2991,6 +2991,7 @@ public class ActivityRecordTests extends WindowTestsBase {
        // Add a decor insets provider window.
        final WindowState navbar = createNavBarWithProvidedInsets(squareDisplay);
        squareDisplay.getDisplayPolicy().updateDecorInsetsInfoIfNeeded(navbar);
        squareDisplay.sendNewConfiguration();
        final Task task = new TaskBuilder(mSupervisor).setDisplay(squareDisplay).build();

        // create a fixed portrait activity
+1 −4
Original line number Diff line number Diff line
@@ -220,10 +220,7 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase {
        // Check that changes are reported
        Configuration c = new Configuration(newDisp1.getRequestedOverrideConfiguration());
        c.windowConfiguration.setBounds(new Rect(0, 0, 1000, 1300));
        newDisp1.onRequestedOverrideConfigurationChanged(c);
        mAtm.mRootWindowContainer.ensureVisibilityAndConfig(null /* starting */,
                newDisp1.mDisplayId, false /* markFrozenIfConfigChanged */,
                false /* deferResume */);
        newDisp1.performDisplayOverrideConfigUpdate(c);
        assertEquals(0, added.size());
        assertEquals(1, changed.size());
        assertEquals(0, removed.size());