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

Commit b6b58615 authored by wilsonshih's avatar wilsonshih Committed by Wei Sheng Shih
Browse files

[RESTRICT AUTOMERGE] Always set last report configuration for starting window.

The windows of an activity can be request to resize if the last report
configration didn't set during relayout window before activity request
visible. So there should excludes starting window since the starting
window won't restart activity from configuration change.

Bug: 276356396
Test: manual do quick switch on large screen device.
Change-Id: Ie12843d00c5336e5a472624205e4e4b9ec881cc5
parent 5add7499
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3867,7 +3867,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        // configuration update when the window has requested to be hidden. Doing so can lead to
        // the client erroneously accepting a configuration that would have otherwise caused an
        // activity restart. We instead hand back the last reported {@link MergedConfiguration}.
        // Also note since starting window isn't a window of activity, it won't make activity
        // restart, so here should allow starting window to set the last reported configuration
        // during relayout, which could happen before activity request visible.
        if (useLatestConfig || (relayoutVisible && (mActivityRecord == null
                || mAttrs.type == TYPE_APPLICATION_STARTING
                || mActivityRecord.isVisibleRequested()))) {
            final Configuration globalConfig = getProcessGlobalConfiguration();
            final Configuration overrideConfig = getMergedOverrideConfiguration();