summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/res
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-31 18:26:45 -0700
committerDianne Hackborn <hackbod@google.com>2011-05-31 23:11:16 -0700
commit36f80f3a5a3de42d4e7ca4b53d4aa3e567f4df6f (patch)
tree9fc258a8787c90942d9f7a6deb85369c91fd755e /core/java/android/content/res
parentbade424fdd4110752081183290417145f8af05e8 (diff)
parent590ec479fd51e13d077212833e2ac4f848a49cc3 (diff)
downloadframeworks_base-36f80f3a5a3de42d4e7ca4b53d4aa3e567f4df6f.zip
frameworks_base-36f80f3a5a3de42d4e7ca4b53d4aa3e567f4df6f.tar.gz
frameworks_base-36f80f3a5a3de42d4e7ca4b53d4aa3e567f4df6f.tar.bz2
resolved conflicts for merge of 590ec479 to master
Change-Id: I30503da6a73b9cb15eee66a67c75d50ccdc4b9f0
Diffstat (limited to 'core/java/android/content/res')
-rw-r--r--core/java/android/content/res/CompatibilityInfo.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index 854d410..dca53a8 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -113,8 +113,13 @@ public class CompatibilityInfo implements Parcelable {
public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, boolean forceCompat) {
int compatFlags = 0;
+ // We can't rely on the application always setting
+ // FLAG_RESIZEABLE_FOR_SCREENS so will compute it based on various input.
+ boolean anyResizeable = false;
+
if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
compatFlags |= LARGE_SCREENS;
+ anyResizeable = true;
if (!forceCompat) {
// If we aren't forcing the app into compatibility mode, then
// assume if it supports large screens that we should allow it
@@ -123,9 +128,13 @@ public class CompatibilityInfo implements Parcelable {
}
}
if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS) != 0) {
- compatFlags |= XLARGE_SCREENS | EXPANDABLE;
+ anyResizeable = true;
+ if (!forceCompat) {
+ compatFlags |= XLARGE_SCREENS | EXPANDABLE;
+ }
}
if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
+ anyResizeable = true;
compatFlags |= EXPANDABLE;
}
@@ -160,7 +169,7 @@ public class CompatibilityInfo implements Parcelable {
if ((screenLayout&Configuration.SCREENLAYOUT_COMPAT_NEEDED) != 0) {
if ((compatFlags&EXPANDABLE) != 0) {
supportsScreen = true;
- } else if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) == 0) {
+ } else if (!anyResizeable) {
compatFlags |= ALWAYS_COMPAT;
}
}