OSDN Git Service

DO NOT MERGE: Fix screen size compatibility mode.
authorDianne Hackborn <hackbod@google.com>
Sat, 29 Jan 2011 21:22:02 +0000 (13:22 -0800)
committerDianne Hackborn <hackbod@google.com>
Sun, 30 Jan 2011 02:02:18 +0000 (18:02 -0800)
Cherry-picked from HC.

Change-Id: Icce2a64f187a56deefcddc3d9b22fa94effce431

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

index f28bae0..efd0bb4 100644 (file)
@@ -5029,13 +5029,13 @@ public class WindowManagerService extends IWindowManager.Stub
                     mScreenLayout = Configuration.SCREENLAYOUT_SIZE_LARGE;
                 } else {
                     mScreenLayout = Configuration.SCREENLAYOUT_SIZE_NORMAL;
-
-                    // If this screen is wider than normal HVGA, or taller
-                    // than FWVGA, then for old apps we want to run in size
-                    // compatibility mode.
-                    if (shortSize > 321 || longSize > 570) {
-                        mScreenLayout |= Configuration.SCREENLAYOUT_COMPAT_NEEDED;
-                    }
+                }
+                
+                // If this screen is wider than normal HVGA, or taller
+                // than FWVGA, then for old apps we want to run in size
+                // compatibility mode.
+                if (shortSize > 321 || longSize > 570) {
+                    mScreenLayout |= Configuration.SCREENLAYOUT_COMPAT_NEEDED;
                 }
 
                 // Is this a long screen?