Merge "fix recursion for config change" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3279050c25
@@ -3625,8 +3625,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// disregarding font scale, which should remain set to
|
// disregarding font scale, which should remain set to
|
||||||
// the value of the previous configuration.
|
// the value of the previous configuration.
|
||||||
mTempConfiguration.setToDefaults();
|
mTempConfiguration.setToDefaults();
|
||||||
mTempConfiguration.fontScale = currentConfig.fontScale;
|
mTempConfiguration.updateFrom(currentConfig);
|
||||||
mTempConfiguration.uiMode = currentConfig.uiMode;
|
|
||||||
computeScreenConfigurationLocked(mTempConfiguration);
|
computeScreenConfigurationLocked(mTempConfiguration);
|
||||||
if (currentConfig.diff(mTempConfiguration) != 0) {
|
if (currentConfig.diff(mTempConfiguration) != 0) {
|
||||||
mWaitingForConfig = true;
|
mWaitingForConfig = true;
|
||||||
@@ -3689,11 +3688,15 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
synchronized(mWindowMap) {
|
synchronized(mWindowMap) {
|
||||||
mCurConfiguration = new Configuration(config);
|
|
||||||
if (mWaitingForConfig) {
|
if (mWaitingForConfig) {
|
||||||
mWaitingForConfig = false;
|
mWaitingForConfig = false;
|
||||||
mLastFinishedFreezeSource = "new-config";
|
mLastFinishedFreezeSource = "new-config";
|
||||||
}
|
}
|
||||||
|
boolean configChanged = mCurConfiguration.diff(config) != 0;
|
||||||
|
if (!configChanged) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
mCurConfiguration = new Configuration(config);
|
||||||
return onConfigurationChanged();
|
return onConfigurationChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8877,8 +8880,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
boolean configChanged = updateOrientationFromAppTokensLocked(false);
|
boolean configChanged = updateOrientationFromAppTokensLocked(false);
|
||||||
mTempConfiguration.setToDefaults();
|
mTempConfiguration.setToDefaults();
|
||||||
mTempConfiguration.fontScale = mCurConfiguration.fontScale;
|
mTempConfiguration.updateFrom(mCurConfiguration);
|
||||||
mTempConfiguration.uiMode = mCurConfiguration.uiMode;
|
|
||||||
computeScreenConfigurationLocked(mTempConfiguration);
|
computeScreenConfigurationLocked(mTempConfiguration);
|
||||||
configChanged |= mCurConfiguration.diff(mTempConfiguration) != 0;
|
configChanged |= mCurConfiguration.diff(mTempConfiguration) != 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user