diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-11-01 21:16:59 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-11-01 21:16:59 -0800 |
commit | 553399518f39cd9f31f2bb6f502866c3c9d6d1a5 (patch) | |
tree | 0142f759466336e32bccab5ba2fe7c7341ef5318 | |
parent | 824838d74eb0316f6987a1d98d2d9e9fa8d4e15b (diff) | |
download | frameworks_base-553399518f39cd9f31f2bb6f502866c3c9d6d1a5.zip frameworks_base-553399518f39cd9f31f2bb6f502866c3c9d6d1a5.tar.gz frameworks_base-553399518f39cd9f31f2bb6f502866c3c9d6d1a5.tar.bz2 |
Fix issue #2226370: Resource versions match with equality
Also fixed turned-around increment of version number for resources. :(
Change-Id: I604137272da984bcd69cee4f174e6b7f2c786e46
-rw-r--r-- | core/java/android/content/res/Resources.java | 2 | ||||
-rw-r--r-- | include/utils/ResourceTypes.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index 00ab7de..1c0ed36 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -54,7 +54,7 @@ public class Resources { // Use the current SDK version code. If we are a development build, // also allow the previous SDK version + 1. private static final int sSdkVersion = Build.VERSION.SDK_INT - + ("REL".equals(Build.VERSION.CODENAME) ? 1 : 0); + + ("REL".equals(Build.VERSION.CODENAME) ? 0 : 1); private static final Object mSync = new Object(); private static Resources mSystem = null; diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h index 17ccad6..49145e8 100644 --- a/include/utils/ResourceTypes.h +++ b/include/utils/ResourceTypes.h @@ -1272,7 +1272,7 @@ struct ResTable_config if (version || o.version) { if ((sdkVersion != o.sdkVersion) && requested->sdkVersion) { - return (sdkVersion); + return (sdkVersion > o.sdkVersion); } if ((minorVersion != o.minorVersion) && @@ -1384,7 +1384,7 @@ struct ResTable_config } if (version != 0) { if (settings.sdkVersion != 0 && sdkVersion != 0 - && sdkVersion != settings.sdkVersion) { + && sdkVersion > settings.sdkVersion) { return false; } if (settings.minorVersion != 0 && minorVersion != 0 |