Loading core/java/android/animation/Animator.java +7 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.animation; import android.content.pm.ActivityInfo.Config; import android.content.res.ConstantState; import java.util.ArrayList; Loading Loading @@ -50,7 +51,7 @@ public abstract class Animator implements Cloneable { * A set of flags which identify the type of configuration changes that can affect this * Animator. Used by the Animator cache. */ int mChangingConfigurations = 0; @Config int mChangingConfigurations = 0; /** * If this animator is inflated from a constant state, keep a reference to it so that Loading Loading @@ -344,7 +345,7 @@ public abstract class Animator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConfigurations; } Loading @@ -358,7 +359,7 @@ public abstract class Animator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public void setChangingConfigurations(int configs) { public void setChangingConfigurations(@Config int configs) { mChangingConfigurations = configs; } Loading @@ -368,7 +369,7 @@ public abstract class Animator implements Cloneable { * This method is called while loading the animator. * @hide */ public void appendChangingConfigurations(int configs) { public void appendChangingConfigurations(@Config int configs) { mChangingConfigurations |= configs; } Loading Loading @@ -564,7 +565,7 @@ public abstract class Animator implements Cloneable { private static class AnimatorConstantState extends ConstantState<Animator> { final Animator mAnimator; int mChangingConf; @Config int mChangingConf; public AnimatorConstantState(Animator animator) { mAnimator = animator; Loading @@ -574,7 +575,7 @@ public abstract class Animator implements Cloneable { } @Override public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConf; } Loading core/java/android/animation/AnimatorInflater.java +4 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,10 @@ package android.animation; import android.annotation.AnimatorRes; import android.annotation.AnyRes; import android.annotation.NonNull; import android.content.Context; import android.content.pm.ActivityInfo.Config; import android.content.res.ConfigurationBoundResourceCache; import android.content.res.ConstantState; import android.content.res.Resources; Loading Loading @@ -1062,7 +1065,7 @@ public class AnimatorInflater { return anim; } private static int getChangingConfigs(Resources resources, int id) { private static @Config int getChangingConfigs(@NonNull Resources resources, @AnyRes int id) { synchronized (sTmpTypedValue) { resources.getValue(id, sTmpTypedValue, true); return sTmpTypedValue.changingConfigurations; Loading core/java/android/animation/StateListAnimator.java +7 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.animation; import android.content.pm.ActivityInfo.Config; import android.content.res.ConstantState; import android.util.StateSet; import android.view.View; Loading Loading @@ -53,7 +54,7 @@ public class StateListAnimator implements Cloneable { private WeakReference<View> mViewRef; private StateListAnimatorConstantState mConstantState; private AnimatorListenerAdapter mAnimatorListener; private int mChangingConfigurations; private @Config int mChangingConfigurations; public StateListAnimator() { initAnimatorListener(); Loading Loading @@ -223,7 +224,7 @@ public class StateListAnimator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConfigurations; } Loading @@ -237,7 +238,7 @@ public class StateListAnimator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public void setChangingConfigurations(int configs) { public void setChangingConfigurations(@Config int configs) { mChangingConfigurations = configs; } Loading @@ -247,7 +248,7 @@ public class StateListAnimator implements Cloneable { * This method is called while loading the animator. * @hide */ public void appendChangingConfigurations(int configs) { public void appendChangingConfigurations(@Config int configs) { mChangingConfigurations |= configs; } Loading Loading @@ -309,7 +310,7 @@ public class StateListAnimator implements Cloneable { final StateListAnimator mAnimator; int mChangingConf; @Config int mChangingConf; public StateListAnimatorConstantState(StateListAnimator animator) { mAnimator = animator; Loading @@ -318,7 +319,7 @@ public class StateListAnimator implements Cloneable { } @Override public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConf; } Loading core/java/android/content/pm/ActivityInfo.java +25 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.content.pm; import android.annotation.IntDef; import android.content.res.Configuration; import android.content.res.Configuration.NativeConfig; import android.os.Parcel; import android.os.Parcelable; import android.util.Printer; Loading Loading @@ -495,6 +496,28 @@ public class ActivityInfo extends ComponentInfo @ScreenOrientation public int screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED; /** @hide */ @IntDef(flag = true, value = { CONFIG_MCC, CONFIG_MNC, CONFIG_LOCALE, CONFIG_TOUCHSCREEN, CONFIG_KEYBOARD, CONFIG_KEYBOARD_HIDDEN, CONFIG_NAVIGATION, CONFIG_ORIENTATION, CONFIG_SCREEN_LAYOUT, CONFIG_UI_MODE, CONFIG_SCREEN_SIZE, CONFIG_SMALLEST_SCREEN_SIZE, CONFIG_DENSITY, CONFIG_LAYOUT_DIRECTION, CONFIG_FONT_SCALE, }) @Retention(RetentionPolicy.SOURCE) public @interface Config {} /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the IMSI MCC. Set from the Loading Loading @@ -629,7 +652,7 @@ public class ActivityInfo extends ComponentInfo * * @hide */ public static int activityInfoConfigToNative(int input) { public static @NativeConfig int activityInfoConfigJavaToNative(@Config int input) { int output = 0; for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) { if ((input & (1 << i)) != 0) { Loading @@ -644,7 +667,7 @@ public class ActivityInfo extends ComponentInfo * * @hide */ public static int activityInfoConfigNativeToJava(int input) { public static @Config int activityInfoConfigNativeToJava(@NativeConfig int input) { int output = 0; for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) { if ((input & CONFIG_NATIVE_BITS[i]) != 0) { Loading core/java/android/content/res/AssetManager.java +6 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.ArrayRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StringRes; import android.content.res.Configuration.NativeConfig; import android.os.ParcelFileDescriptor; import android.util.Log; import android.util.SparseArray; Loading Loading @@ -796,7 +797,10 @@ public final class AssetManager implements AutoCloseable { /*package*/ static final int STYLE_DATA = 1; /*package*/ static final int STYLE_ASSET_COOKIE = 2; /*package*/ static final int STYLE_RESOURCE_ID = 3; /*package*/ static final int STYLE_CHANGING_CONFIGURATIONS = 4; /* Offset within typed data array for native changingConfigurations. */ static final int STYLE_CHANGING_CONFIGURATIONS = 4; /*package*/ static final int STYLE_DENSITY = 5; /*package*/ native static final boolean applyStyle(long theme, int defStyleAttr, int defStyleRes, long xmlParser, Loading Loading @@ -845,7 +849,7 @@ public final class AssetManager implements AutoCloseable { TypedValue outValue, boolean resolve); /*package*/ native static final void dumpTheme(long theme, int priority, String tag, String prefix); /*package*/ native static final int getThemeChangingConfigurations(long theme); /*package*/ native static final @NativeConfig int getThemeChangingConfigurations(long theme); private native final long openXmlAssetNative(int cookie, String fileName); Loading Loading
core/java/android/animation/Animator.java +7 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.animation; import android.content.pm.ActivityInfo.Config; import android.content.res.ConstantState; import java.util.ArrayList; Loading Loading @@ -50,7 +51,7 @@ public abstract class Animator implements Cloneable { * A set of flags which identify the type of configuration changes that can affect this * Animator. Used by the Animator cache. */ int mChangingConfigurations = 0; @Config int mChangingConfigurations = 0; /** * If this animator is inflated from a constant state, keep a reference to it so that Loading Loading @@ -344,7 +345,7 @@ public abstract class Animator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConfigurations; } Loading @@ -358,7 +359,7 @@ public abstract class Animator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public void setChangingConfigurations(int configs) { public void setChangingConfigurations(@Config int configs) { mChangingConfigurations = configs; } Loading @@ -368,7 +369,7 @@ public abstract class Animator implements Cloneable { * This method is called while loading the animator. * @hide */ public void appendChangingConfigurations(int configs) { public void appendChangingConfigurations(@Config int configs) { mChangingConfigurations |= configs; } Loading Loading @@ -564,7 +565,7 @@ public abstract class Animator implements Cloneable { private static class AnimatorConstantState extends ConstantState<Animator> { final Animator mAnimator; int mChangingConf; @Config int mChangingConf; public AnimatorConstantState(Animator animator) { mAnimator = animator; Loading @@ -574,7 +575,7 @@ public abstract class Animator implements Cloneable { } @Override public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConf; } Loading
core/java/android/animation/AnimatorInflater.java +4 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,10 @@ package android.animation; import android.annotation.AnimatorRes; import android.annotation.AnyRes; import android.annotation.NonNull; import android.content.Context; import android.content.pm.ActivityInfo.Config; import android.content.res.ConfigurationBoundResourceCache; import android.content.res.ConstantState; import android.content.res.Resources; Loading Loading @@ -1062,7 +1065,7 @@ public class AnimatorInflater { return anim; } private static int getChangingConfigs(Resources resources, int id) { private static @Config int getChangingConfigs(@NonNull Resources resources, @AnyRes int id) { synchronized (sTmpTypedValue) { resources.getValue(id, sTmpTypedValue, true); return sTmpTypedValue.changingConfigurations; Loading
core/java/android/animation/StateListAnimator.java +7 −6 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.animation; import android.content.pm.ActivityInfo.Config; import android.content.res.ConstantState; import android.util.StateSet; import android.view.View; Loading Loading @@ -53,7 +54,7 @@ public class StateListAnimator implements Cloneable { private WeakReference<View> mViewRef; private StateListAnimatorConstantState mConstantState; private AnimatorListenerAdapter mAnimatorListener; private int mChangingConfigurations; private @Config int mChangingConfigurations; public StateListAnimator() { initAnimatorListener(); Loading Loading @@ -223,7 +224,7 @@ public class StateListAnimator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConfigurations; } Loading @@ -237,7 +238,7 @@ public class StateListAnimator implements Cloneable { * @see android.content.pm.ActivityInfo * @hide */ public void setChangingConfigurations(int configs) { public void setChangingConfigurations(@Config int configs) { mChangingConfigurations = configs; } Loading @@ -247,7 +248,7 @@ public class StateListAnimator implements Cloneable { * This method is called while loading the animator. * @hide */ public void appendChangingConfigurations(int configs) { public void appendChangingConfigurations(@Config int configs) { mChangingConfigurations |= configs; } Loading Loading @@ -309,7 +310,7 @@ public class StateListAnimator implements Cloneable { final StateListAnimator mAnimator; int mChangingConf; @Config int mChangingConf; public StateListAnimatorConstantState(StateListAnimator animator) { mAnimator = animator; Loading @@ -318,7 +319,7 @@ public class StateListAnimator implements Cloneable { } @Override public int getChangingConfigurations() { public @Config int getChangingConfigurations() { return mChangingConf; } Loading
core/java/android/content/pm/ActivityInfo.java +25 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.content.pm; import android.annotation.IntDef; import android.content.res.Configuration; import android.content.res.Configuration.NativeConfig; import android.os.Parcel; import android.os.Parcelable; import android.util.Printer; Loading Loading @@ -495,6 +496,28 @@ public class ActivityInfo extends ComponentInfo @ScreenOrientation public int screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED; /** @hide */ @IntDef(flag = true, value = { CONFIG_MCC, CONFIG_MNC, CONFIG_LOCALE, CONFIG_TOUCHSCREEN, CONFIG_KEYBOARD, CONFIG_KEYBOARD_HIDDEN, CONFIG_NAVIGATION, CONFIG_ORIENTATION, CONFIG_SCREEN_LAYOUT, CONFIG_UI_MODE, CONFIG_SCREEN_SIZE, CONFIG_SMALLEST_SCREEN_SIZE, CONFIG_DENSITY, CONFIG_LAYOUT_DIRECTION, CONFIG_FONT_SCALE, }) @Retention(RetentionPolicy.SOURCE) public @interface Config {} /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the IMSI MCC. Set from the Loading Loading @@ -629,7 +652,7 @@ public class ActivityInfo extends ComponentInfo * * @hide */ public static int activityInfoConfigToNative(int input) { public static @NativeConfig int activityInfoConfigJavaToNative(@Config int input) { int output = 0; for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) { if ((input & (1 << i)) != 0) { Loading @@ -644,7 +667,7 @@ public class ActivityInfo extends ComponentInfo * * @hide */ public static int activityInfoConfigNativeToJava(int input) { public static @Config int activityInfoConfigNativeToJava(@NativeConfig int input) { int output = 0; for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) { if ((input & CONFIG_NATIVE_BITS[i]) != 0) { Loading
core/java/android/content/res/AssetManager.java +6 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.ArrayRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StringRes; import android.content.res.Configuration.NativeConfig; import android.os.ParcelFileDescriptor; import android.util.Log; import android.util.SparseArray; Loading Loading @@ -796,7 +797,10 @@ public final class AssetManager implements AutoCloseable { /*package*/ static final int STYLE_DATA = 1; /*package*/ static final int STYLE_ASSET_COOKIE = 2; /*package*/ static final int STYLE_RESOURCE_ID = 3; /*package*/ static final int STYLE_CHANGING_CONFIGURATIONS = 4; /* Offset within typed data array for native changingConfigurations. */ static final int STYLE_CHANGING_CONFIGURATIONS = 4; /*package*/ static final int STYLE_DENSITY = 5; /*package*/ native static final boolean applyStyle(long theme, int defStyleAttr, int defStyleRes, long xmlParser, Loading Loading @@ -845,7 +849,7 @@ public final class AssetManager implements AutoCloseable { TypedValue outValue, boolean resolve); /*package*/ native static final void dumpTheme(long theme, int priority, String tag, String prefix); /*package*/ native static final int getThemeChangingConfigurations(long theme); /*package*/ native static final @NativeConfig int getThemeChangingConfigurations(long theme); private native final long openXmlAssetNative(int cookie, String fileName); Loading