[automerge] [RESTRICT AUTOMERGE] Always set last report configuration for starting window. 2p: b6b5861513

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

Bug: 276356396
Change-Id: I241d59a2bbd1590750b0240f6f50042803d9a46c
This commit is contained in:
Presubmit Automerger Backend
2023-04-28 01:51:24 +00:00

View File

@@ -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();