summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-26 17:07:52 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-26 17:07:52 -0700
commit94250ac69c6e07534e4781d3479dccb79d8c366c (patch)
tree0002c4ca6a9cf1b7d5ac087199fa11b879ccdbc2 /services/java
parent4686fb8ac8c88eb1f0d76fc4157be4cb5949e98e (diff)
parentdf6e980e3f63eb0f6f9eb437fa925d5009cd9c44 (diff)
downloadframeworks_base-94250ac69c6e07534e4781d3479dccb79d8c366c.zip
frameworks_base-94250ac69c6e07534e4781d3479dccb79d8c366c.tar.gz
frameworks_base-94250ac69c6e07534e4781d3479dccb79d8c366c.tar.bz2
Merge "Add new supports-screens attributes for declaring the compatible screens." into honeycomb-mr2
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/am/CompatModePackages.java8
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;
}