Loading core/java/android/content/pm/ActivityInfo.java +10 −0 Original line number Diff line number Diff line Loading @@ -765,6 +765,16 @@ public class ActivityInfo extends ComponentInfo * constant starts at the high bits. */ public static final int CONFIG_FONT_SCALE = 0x40000000; /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the rotation. Set from the * {@link android.R.attr#configChanges} attribute. This is * not a core resource configuration, but a higher-level value, so its * constant starts at the high bits. * @hide We do not want apps to handle this. It will eventually be moved out of * {@link Configuration}. */ public static final int CONFIG_ROTATION = 0x20000000; /** @hide * Unfortunately the constants for config changes in native code are Loading core/java/android/content/res/Configuration.java +1 −1 Original line number Diff line number Diff line Loading @@ -1395,7 +1395,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration } if ((compareUndefined || delta.mRotation != ROTATION_UNDEFINED) && mRotation != delta.mRotation) { changed |= ActivityInfo.CONFIG_ORIENTATION; changed |= ActivityInfo.CONFIG_ROTATION; } if ((compareUndefined || getScreenLayoutNoDirection(delta.screenLayout) != (SCREENLAYOUT_SIZE_UNDEFINED | SCREENLAYOUT_LONG_UNDEFINED)) Loading services/core/java/com/android/server/am/ActivityRecord.java +5 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import static android.content.Intent.CATEGORY_LAUNCHER; import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY; import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION; import static android.content.pm.ActivityInfo.CONFIG_ROTATION; import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT; import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE; import static android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE; Loading Loading @@ -2596,6 +2597,10 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo changes &= ~CONFIG_SMALLEST_SCREEN_SIZE; } } // We don't want rotation to cause relaunches. if ((changes & CONFIG_ROTATION) != 0) { changes &= ~CONFIG_ROTATION; } return changes; } Loading Loading
core/java/android/content/pm/ActivityInfo.java +10 −0 Original line number Diff line number Diff line Loading @@ -765,6 +765,16 @@ public class ActivityInfo extends ComponentInfo * constant starts at the high bits. */ public static final int CONFIG_FONT_SCALE = 0x40000000; /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle changes to the rotation. Set from the * {@link android.R.attr#configChanges} attribute. This is * not a core resource configuration, but a higher-level value, so its * constant starts at the high bits. * @hide We do not want apps to handle this. It will eventually be moved out of * {@link Configuration}. */ public static final int CONFIG_ROTATION = 0x20000000; /** @hide * Unfortunately the constants for config changes in native code are Loading
core/java/android/content/res/Configuration.java +1 −1 Original line number Diff line number Diff line Loading @@ -1395,7 +1395,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration } if ((compareUndefined || delta.mRotation != ROTATION_UNDEFINED) && mRotation != delta.mRotation) { changed |= ActivityInfo.CONFIG_ORIENTATION; changed |= ActivityInfo.CONFIG_ROTATION; } if ((compareUndefined || getScreenLayoutNoDirection(delta.screenLayout) != (SCREENLAYOUT_SIZE_UNDEFINED | SCREENLAYOUT_LONG_UNDEFINED)) Loading
services/core/java/com/android/server/am/ActivityRecord.java +5 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import static android.content.Intent.CATEGORY_LAUNCHER; import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY; import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION; import static android.content.pm.ActivityInfo.CONFIG_ROTATION; import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT; import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE; import static android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE; Loading Loading @@ -2596,6 +2597,10 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo changes &= ~CONFIG_SMALLEST_SCREEN_SIZE; } } // We don't want rotation to cause relaunches. if ((changes & CONFIG_ROTATION) != 0) { changes &= ~CONFIG_ROTATION; } return changes; } Loading