OSDN Git Service

Fixing font scale in WindowManagerService.
authorCasey Burkhardt <caseyburkhardt@google.com>
Tue, 3 Aug 2010 19:04:19 +0000 (12:04 -0700)
committerCharles Chen <clchen@google.com>
Tue, 3 Aug 2010 19:22:47 +0000 (12:22 -0700)
There was a bug that causes WindowManagerService to lose
the fontScale setting.

This fix submitted on behalf of Casey Burkhardt.

Change-Id: I3a76de15adf13badc5efca8d620d14c972a96ec4

services/java/com/android/server/WindowManagerService.java

index 353dfcb..b50f0ba 100644 (file)
@@ -3093,8 +3093,11 @@ public class WindowManagerService extends IWindowManager.Stub
                 
             } else if (currentConfig != null) {
                 // No obvious action we need to take, but if our current
-                // state mismatches the activity maanager's, update it
+                // state mismatches the activity manager's, update it,
+                // disregarding font scale, which should remain set to
+                // the value of the previous configuration.
                 mTempConfiguration.setToDefaults();
+                mTempConfiguration.fontScale = currentConfig.fontScale;
                 if (computeNewConfigurationLocked(mTempConfiguration)) {
                     if (currentConfig.diff(mTempConfiguration) != 0) {
                         mWaitingForConfig = true;