diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-05-26 17:09:39 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-05-26 17:09:39 -0700 |
commit | 8fcbfb52607263754b6d3895a112f792c5c3a12e (patch) | |
tree | 476aee5f274bb2b028c0e9f12fa4d9192fde3f77 /services | |
parent | a33bb164b2ac792d5bba76ba198fb052197fd520 (diff) | |
parent | 94250ac69c6e07534e4781d3479dccb79d8c366c (diff) | |
download | frameworks_base-8fcbfb52607263754b6d3895a112f792c5c3a12e.zip frameworks_base-8fcbfb52607263754b6d3895a112f792c5c3a12e.tar.gz frameworks_base-8fcbfb52607263754b6d3895a112f792c5c3a12e.tar.bz2 |
am 94250ac6: Merge "Add new supports-screens attributes for declaring the compatible screens." into honeycomb-mr2
* commit '94250ac69c6e07534e4781d3479dccb79d8c366c':
Add new supports-screens attributes for declaring the compatible screens.
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/CompatModePackages.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/java/com/android/server/am/CompatModePackages.java b/services/java/com/android/server/am/CompatModePackages.java index 1277bca..221b59b 100644 --- a/services/java/com/android/server/am/CompatModePackages.java +++ b/services/java/com/android/server/am/CompatModePackages.java @@ -119,13 +119,15 @@ public class CompatModePackages { public CompatibilityInfo compatibilityInfoForPackageLocked(ApplicationInfo ai) { return new CompatibilityInfo(ai, mService.mConfiguration.screenLayout, + mService.mConfiguration.smallestScreenWidthDp, (getPackageFlags(ai.packageName)&COMPAT_FLAG_ENABLED) != 0); } public int computeCompatModeLocked(ApplicationInfo ai) { boolean enabled = (getPackageFlags(ai.packageName)&COMPAT_FLAG_ENABLED) != 0; CompatibilityInfo info = new CompatibilityInfo(ai, - mService.mConfiguration.screenLayout, enabled); + mService.mConfiguration.screenLayout, + mService.mConfiguration.smallestScreenWidthDp, enabled); if (info.alwaysSupportsScreen()) { return ActivityManager.COMPAT_MODE_NEVER; } @@ -315,6 +317,7 @@ public class CompatModePackages { final IPackageManager pm = AppGlobals.getPackageManager(); final int screenLayout = mService.mConfiguration.screenLayout; + final int smallestScreenWidthDp = mService.mConfiguration.smallestScreenWidthDp; final Iterator<Map.Entry<String, Integer>> it = pkgs.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String, Integer> entry = it.next(); @@ -331,7 +334,8 @@ public class CompatModePackages { if (ai == null) { continue; } - CompatibilityInfo info = new CompatibilityInfo(ai, screenLayout, false); + CompatibilityInfo info = new CompatibilityInfo(ai, screenLayout, + smallestScreenWidthDp, false); if (info.alwaysSupportsScreen()) { continue; } |