summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/res
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-08-20 12:29:14 -0700
committerd34d <clark@cyngn.com>2015-10-27 18:23:59 -0700
commit25d58dfed52ca96e11cf879d7d9f99eb34e14037 (patch)
tree8051fe362c6edeb758eeb145d7dfcb8c5a15994e /core/java/android/content/res
parente05ffea4ea55a4eb6b40436a864a570509eb33ac (diff)
downloadframeworks_base-25d58dfed52ca96e11cf879d7d9f99eb34e14037.zip
frameworks_base-25d58dfed52ca96e11cf879d7d9f99eb34e14037.tar.gz
frameworks_base-25d58dfed52ca96e11cf879d7d9f99eb34e14037.tar.bz2
Themes: Allow packages to be set as non-themeable
This patch allows for specific packages to be declared as non themeable. Packages that are non themeable will not have theme resources attached to their assets when their Resources object is created. This patch also removes isThemeable from CompatibilityInfo as this object did not correctly reflect that the package is not themeable. Change-Id: Id34c63ec0c3ef7c69df083da63559e0720ce0018
Diffstat (limited to 'core/java/android/content/res')
-rw-r--r--core/java/android/content/res/CompatibilityInfo.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index 47d5d05..2b8951e 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -92,15 +92,9 @@ public class CompatibilityInfo implements Parcelable {
*/
public final float applicationInvertedScale;
- /**
- * Whether the application supports third-party theming.
- */
- public final boolean isThemeable;
-
public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw,
boolean forceCompat) {
int compatFlags = 0;
- isThemeable = appInfo.isThemeable;
if (appInfo.requiresSmallestWidthDp != 0 || appInfo.compatibleWidthLimitDp != 0
|| appInfo.largestWidthLimitDp != 0) {
@@ -247,20 +241,17 @@ public class CompatibilityInfo implements Parcelable {
mCompatibilityFlags = compatFlags;
}
- private CompatibilityInfo(int compFlags,
- int dens, float scale, float invertedScale, boolean isThemeable) {
+ private CompatibilityInfo(int compFlags, int dens, float scale, float invertedScale) {
mCompatibilityFlags = compFlags;
applicationDensity = dens;
applicationScale = scale;
applicationInvertedScale = invertedScale;
- this.isThemeable = isThemeable;
}
private CompatibilityInfo() {
this(NEVER_NEEDS_COMPAT, DisplayMetrics.DENSITY_DEVICE,
1.0f,
- 1.0f,
- true);
+ 1.0f);
}
/**
@@ -534,7 +525,6 @@ public class CompatibilityInfo implements Parcelable {
if (applicationDensity != oc.applicationDensity) return false;
if (applicationScale != oc.applicationScale) return false;
if (applicationInvertedScale != oc.applicationInvertedScale) return false;
- if (isThemeable != oc.isThemeable) return false;
return true;
} catch (ClassCastException e) {
return false;
@@ -572,7 +562,6 @@ public class CompatibilityInfo implements Parcelable {
result = 31 * result + applicationDensity;
result = 31 * result + Float.floatToIntBits(applicationScale);
result = 31 * result + Float.floatToIntBits(applicationInvertedScale);
- result = 31 * result + (isThemeable ? 1 : 0);
return result;
}
@@ -587,7 +576,6 @@ public class CompatibilityInfo implements Parcelable {
dest.writeInt(applicationDensity);
dest.writeFloat(applicationScale);
dest.writeFloat(applicationInvertedScale);
- dest.writeInt(isThemeable ? 1 : 0);
}
public static final Parcelable.Creator<CompatibilityInfo> CREATOR
@@ -608,6 +596,5 @@ public class CompatibilityInfo implements Parcelable {
applicationDensity = source.readInt();
applicationScale = source.readFloat();
applicationInvertedScale = source.readFloat();
- isThemeable = source.readInt() == 1 ? true : false;
}
}