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

Commit f3b99eee authored by Tiger Huang's avatar Tiger Huang
Browse files

Don't perform config change if relayoutAsync

mPendingMergedConfiguration wouldn't be updated if we didn't call
IWindowSession#relayout.

Bug: 244003094
Test: atest ToggleDarkThemeMicrobenchmark#testToggle
Change-Id: Ibc2f40dd986136d9b54f3a7f491f7517489e05af
parent 40b4880d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3064,7 +3064,8 @@ public final class ViewRootImpl implements ViewParent,
                // WindowManagerService has reported back a frame from a configuration not yet
                // handled by the client. In this case, we need to accept the configuration so we
                // do not lay out and draw with the wrong configuration.
                if (!mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) {
                if (mRelayoutRequested
                        && !mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) {
                    if (DEBUG_CONFIGURATION) Log.v(mTag, "Visible with new config: "
                            + mPendingMergedConfiguration.getMergedConfiguration());
                    performConfigurationChange(new MergedConfiguration(mPendingMergedConfiguration),