diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-21 11:37:27 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-21 11:37:27 -0700 |
commit | 2c25fac23e5daafd62238f4c3dd031e3f4cd76f1 (patch) | |
tree | daed0682327838a78cfed58aba7089346fe6fdab /core/java/android | |
parent | 6fb608ee67c3ad82baf2253b87b63fff8907992a (diff) | |
parent | 69fff4a72d4dfc9208db79d773ef3ca23350287e (diff) | |
download | frameworks_base-2c25fac23e5daafd62238f4c3dd031e3f4cd76f1.zip frameworks_base-2c25fac23e5daafd62238f4c3dd031e3f4cd76f1.tar.gz frameworks_base-2c25fac23e5daafd62238f4c3dd031e3f4cd76f1.tar.bz2 |
Merge change 8036 into donut
* changes:
* Disable compatibility mode for all cases.
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 3 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 0d00f21..28a77a5 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -399,7 +399,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * @hide */ public void disableCompatibilityMode() { - flags |= FLAG_SUPPORTS_LARGE_SCREENS; + flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS | + FLAG_SUPPORTS_SMALL_SCREENS); supportsDensities = ANY_DENSITIES_ARRAY; } } diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index cebb696..39c27aa 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -92,6 +92,8 @@ public class PackageParser { private static final Object mSync = new Object(); private static WeakReference<byte[]> mReadBuffer; + private static boolean sCompatibilityModeEnabled = true; + static class ParsePackageItemArgs { final Package owner; final String[] outError; @@ -2629,6 +2631,11 @@ public class PackageParser { public static ApplicationInfo generateApplicationInfo(Package p, int flags) { if (p == null) return null; if (!copyNeeded(flags, p, null)) { + // CompatibilityMode is global state. It's safe to modify the instance + // of the package. + if (!sCompatibilityModeEnabled) { + p.applicationInfo.disableCompatibilityMode(); + } return p.applicationInfo; } @@ -2643,6 +2650,9 @@ public class PackageParser { if ((flags & PackageManager.GET_SUPPORTS_DENSITIES) != 0) { ai.supportsDensities = p.supportsDensities; } + if (!sCompatibilityModeEnabled) { + ai.disableCompatibilityMode(); + } return ai; } @@ -2827,4 +2837,11 @@ public class PackageParser { + " " + service.info.name + "}"; } } + + /** + * @hide + */ + public static void setCompatibilityModeEnabled(boolean compatibilityModeEnabled) { + sCompatibilityModeEnabled = compatibilityModeEnabled; + } } |