OSDN Git Service

Merge \"Make sure fontScale in configuration sent to app is equal to global\" into...
authorChong Zhang <chz@google.com>
Mon, 20 Jun 2016 18:10:39 +0000 (18:10 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Mon, 20 Jun 2016 18:10:39 +0000 (18:10 +0000)
am: 7c6692646c

Change-Id: I6b0cbd28de6108bd938d6e620e10b06cfaa86c45

services/core/java/com/android/server/am/ActivityRecord.java

index 37d7c33..6510cb4 100755 (executable)
@@ -444,10 +444,17 @@ final class ActivityRecord {
             return;
         }
         try {
+            // Make sure fontScale is always equal to global. For fullscreen apps, config is
+            // the shared EMPTY config, which has default fontScale of 1.0. We don't want it
+            // to be applied as an override config.
+            Configuration overrideConfig = new Configuration(config);
+            overrideConfig.fontScale = service.mConfiguration.fontScale;
+
             if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending new config to " + this + " " +
-                    "reportToActivity=" + reportToActivity + " and config: " + config);
+                    "reportToActivity=" + reportToActivity + " and config: " + overrideConfig);
+
             app.thread.scheduleActivityConfigurationChanged(
-                    appToken, new Configuration(config), reportToActivity);
+                    appToken, overrideConfig, reportToActivity);
         } catch (RemoteException e) {
             // If process died, whatever.
         }