Merge "Avoid applying window config from updating persistent config" into sc-v2-dev am: caa65e4a70 am: c1ed1f92c0

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

Change-Id: I4a582e076c653117b6ec218501ccbb8de3346bb0
This commit is contained in:
TreeHugger Robot
2021-09-08 21:28:15 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 1 deletions

View File

@@ -4065,6 +4065,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
final long origId = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
// Window configuration is unrelated to persistent configuration (e.g. font scale,
// locale). Unset it to avoid affecting the current display configuration.
values.windowConfiguration.setToDefaults();
updateConfigurationLocked(values, null, false, true, userId,
false /* deferResume */);
}

View File

@@ -5689,7 +5689,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
final Configuration currOverrideConfig = getRequestedOverrideConfiguration();
final int currRotation = currOverrideConfig.windowConfiguration.getRotation();
final int overrideRotation = overrideConfiguration.windowConfiguration.getRotation();
if (currRotation != ROTATION_UNDEFINED && currRotation != overrideRotation) {
if (currRotation != ROTATION_UNDEFINED && overrideRotation != ROTATION_UNDEFINED
&& currRotation != overrideRotation) {
applyRotationAndFinishFixedRotation(currRotation, overrideRotation);
}
mCurrentOverrideConfigurationChanges = currOverrideConfig.diff(overrideConfiguration);