Loading core/java/android/content/pm/ActivityInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ public class ActivityInfo extends ComponentInfo * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the font scaling factor. Set from the * {@link android.R.attr#configChanges} attribute. This is * not a core resource configutation, but a higher-level value, so its * not a core resource configuration, but a higher-level value, so its * constant starts at the high bits. */ public static final int CONFIG_FONT_SCALE = 0x40000000; Loading core/java/android/content/res/Resources.java +11 −8 Original line number Diff line number Diff line Loading @@ -1977,17 +1977,20 @@ public class Resources { } } private boolean verifyPreloadConfig(TypedValue value, String name) { if ((value.changingConfigurations&~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) != 0) { static private final int VARYING_CONFIGS = ActivityInfo.activityInfoConfigToNative( ActivityInfo.CONFIG_LAYOUT_DIRECTION); private boolean verifyPreloadConfig(int changingConfigurations, int resourceId, String name) { if (((changingConfigurations&~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) { String resName; try { resName = getResourceName(value.resourceId); resName = getResourceName(resourceId); } catch (NotFoundException e) { resName = "?"; } Log.w(TAG, "Preloaded " + name + " resource #0x" + Integer.toHexString(value.resourceId) + Integer.toHexString(resourceId) + " (" + resName + ") that varies with configuration!!"); return false; } Loading Loading @@ -2090,7 +2093,7 @@ public class Resources { cs = dr.getConstantState(); if (cs != null) { if (mPreloading) { if (verifyPreloadConfig(value, "drawable")) { if (verifyPreloadConfig(cs.getChangingConfigurations(), value.resourceId, "drawable")) { if (isColorDrawable) { sPreloadedColorDrawables.put(key, cs); } else { Loading Loading @@ -2160,7 +2163,7 @@ public class Resources { csl = ColorStateList.valueOf(value.data); if (mPreloading) { if (verifyPreloadConfig(value, "color")) { if (verifyPreloadConfig(value.changingConfigurations, value.resourceId, "color")) { sPreloadedColorStateLists.put(key, csl); } } Loading Loading @@ -2206,7 +2209,7 @@ public class Resources { if (csl != null) { if (mPreloading) { if (verifyPreloadConfig(value, "color")) { if (verifyPreloadConfig(value.changingConfigurations, value.resourceId, "color")) { sPreloadedColorStateLists.put(key, csl); } } else { Loading graphics/java/android/graphics/drawable/DrawableContainer.java +1 −1 Original line number Diff line number Diff line Loading @@ -512,7 +512,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { @Override public int getChangingConfigurations() { return mChangingConfigurations; return mChangingConfigurations | mChildrenChangingConfigurations; } public final int addChild(Drawable dr) { Loading Loading
core/java/android/content/pm/ActivityInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ public class ActivityInfo extends ComponentInfo * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the font scaling factor. Set from the * {@link android.R.attr#configChanges} attribute. This is * not a core resource configutation, but a higher-level value, so its * not a core resource configuration, but a higher-level value, so its * constant starts at the high bits. */ public static final int CONFIG_FONT_SCALE = 0x40000000; Loading
core/java/android/content/res/Resources.java +11 −8 Original line number Diff line number Diff line Loading @@ -1977,17 +1977,20 @@ public class Resources { } } private boolean verifyPreloadConfig(TypedValue value, String name) { if ((value.changingConfigurations&~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) != 0) { static private final int VARYING_CONFIGS = ActivityInfo.activityInfoConfigToNative( ActivityInfo.CONFIG_LAYOUT_DIRECTION); private boolean verifyPreloadConfig(int changingConfigurations, int resourceId, String name) { if (((changingConfigurations&~(ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_DENSITY)) & VARYING_CONFIGS) != 0) { String resName; try { resName = getResourceName(value.resourceId); resName = getResourceName(resourceId); } catch (NotFoundException e) { resName = "?"; } Log.w(TAG, "Preloaded " + name + " resource #0x" + Integer.toHexString(value.resourceId) + Integer.toHexString(resourceId) + " (" + resName + ") that varies with configuration!!"); return false; } Loading Loading @@ -2090,7 +2093,7 @@ public class Resources { cs = dr.getConstantState(); if (cs != null) { if (mPreloading) { if (verifyPreloadConfig(value, "drawable")) { if (verifyPreloadConfig(cs.getChangingConfigurations(), value.resourceId, "drawable")) { if (isColorDrawable) { sPreloadedColorDrawables.put(key, cs); } else { Loading Loading @@ -2160,7 +2163,7 @@ public class Resources { csl = ColorStateList.valueOf(value.data); if (mPreloading) { if (verifyPreloadConfig(value, "color")) { if (verifyPreloadConfig(value.changingConfigurations, value.resourceId, "color")) { sPreloadedColorStateLists.put(key, csl); } } Loading Loading @@ -2206,7 +2209,7 @@ public class Resources { if (csl != null) { if (mPreloading) { if (verifyPreloadConfig(value, "color")) { if (verifyPreloadConfig(value.changingConfigurations, value.resourceId, "color")) { sPreloadedColorStateLists.put(key, csl); } } else { Loading
graphics/java/android/graphics/drawable/DrawableContainer.java +1 −1 Original line number Diff line number Diff line Loading @@ -512,7 +512,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { @Override public int getChangingConfigurations() { return mChangingConfigurations; return mChangingConfigurations | mChildrenChangingConfigurations; } public final int addChild(Drawable dr) { Loading