summaryrefslogtreecommitdiff
path: root/core/java/android/app
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/Presentation.java6
-rw-r--r--core/java/android/app/ResourcesManager.java15
2 files changed, 12 insertions, 9 deletions
diff --git a/core/java/android/app/Presentation.java b/core/java/android/app/Presentation.java
index bae6ab5ea80c..7a18b8120d7e 100644
--- a/core/java/android/app/Presentation.java
+++ b/core/java/android/app/Presentation.java
@@ -236,7 +236,7 @@ public class Presentation extends Dialog {
// to be rare but surprising, so we'll write a log message about it.
if (!isConfigurationStillValid()) {
Log.i(TAG, "Presentation is being dismissed because the "
- + "display metrics have changed since it was created while onStart.");
+ + "display metrics have changed since it was created.");
mHandler.sendEmptyMessage(MSG_CANCEL);
}
}
@@ -296,8 +296,8 @@ public class Presentation extends Dialog {
// is invalid and the application must recreate the presentation to get
// a new context.
if (!isConfigurationStillValid()) {
- Log.i(TAG, "Presentation is being dismissed because the display metrics have changed "
- + "since it was created while handleDisplayChanged.");
+ Log.i(TAG, "Presentation is being dismissed because the "
+ + "display metrics have changed since it was created.");
cancel();
}
}
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index c2caa40ba950..47ccc2f0badb 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -1111,6 +1111,7 @@ public class ResourcesManager {
}
int displayId = key.mDisplayId;
final boolean hasOverrideConfiguration = key.hasOverrideConfiguration();
+ tmpConfig.setTo(config);
// Get new DisplayMetrics based on the DisplayAdjustments given to the ResourcesImpl. Update
// a copy if the CompatibilityInfo changed, because the ResourcesImpl object will handle the
@@ -1120,15 +1121,17 @@ public class ResourcesManager {
daj = new DisplayAdjustments(daj);
daj.setCompatibilityInfo(compat);
}
- tmpConfig.setTo(config);
- if (hasOverrideConfiguration) {
- tmpConfig.updateFrom(key.mOverrideConfiguration);
- }
- // Only apply for default display
if (displayId == Display.DEFAULT_DISPLAY) {
- daj.setConfiguration(tmpConfig);
+ daj.setConfiguration(config);
}
DisplayMetrics dm = getDisplayMetrics(displayId, daj);
+ if (displayId != Display.DEFAULT_DISPLAY) {
+ applyNonDefaultDisplayMetricsToConfiguration(dm, tmpConfig);
+ }
+
+ if (hasOverrideConfiguration) {
+ tmpConfig.updateFrom(key.mOverrideConfiguration);
+ }
resourcesImpl.updateConfiguration(tmpConfig, dm, compat);
}