Loading core/java/android/content/pm/ActivityInfo.java +16 −0 Original line number Diff line number Diff line Loading @@ -789,6 +789,22 @@ public class ActivityInfo extends ComponentInfo } } /** * Returns true if the activity's orientation is fixed. * @hide */ boolean isFixedOrientation() { return screenOrientation == SCREEN_ORIENTATION_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_SENSOR_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_SENSOR_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_REVERSE_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_REVERSE_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_USER_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_USER_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_LOCKED; } /** @hide */ public static boolean isResizeableMode(int mode) { return mode == RESIZE_MODE_RESIZEABLE Loading core/java/android/content/pm/PackageParser.java +1 −2 Original line number Diff line number Diff line Loading @@ -3449,8 +3449,7 @@ public class PackageParser { } } else if (owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.N) { a.info.resizeMode = RESIZE_MODE_UNRESIZEABLE; } else if (a.info.screenOrientation == SCREEN_ORIENTATION_UNSPECIFIED && (a.info.flags & FLAG_IMMERSIVE) == 0) { } else if (!a.info.isFixedOrientation() && (a.info.flags & FLAG_IMMERSIVE) == 0) { a.info.resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; } Loading Loading
core/java/android/content/pm/ActivityInfo.java +16 −0 Original line number Diff line number Diff line Loading @@ -789,6 +789,22 @@ public class ActivityInfo extends ComponentInfo } } /** * Returns true if the activity's orientation is fixed. * @hide */ boolean isFixedOrientation() { return screenOrientation == SCREEN_ORIENTATION_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_SENSOR_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_SENSOR_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_REVERSE_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_REVERSE_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_USER_LANDSCAPE || screenOrientation == SCREEN_ORIENTATION_USER_PORTRAIT || screenOrientation == SCREEN_ORIENTATION_LOCKED; } /** @hide */ public static boolean isResizeableMode(int mode) { return mode == RESIZE_MODE_RESIZEABLE Loading
core/java/android/content/pm/PackageParser.java +1 −2 Original line number Diff line number Diff line Loading @@ -3449,8 +3449,7 @@ public class PackageParser { } } else if (owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.N) { a.info.resizeMode = RESIZE_MODE_UNRESIZEABLE; } else if (a.info.screenOrientation == SCREEN_ORIENTATION_UNSPECIFIED && (a.info.flags & FLAG_IMMERSIVE) == 0) { } else if (!a.info.isFixedOrientation() && (a.info.flags & FLAG_IMMERSIVE) == 0) { a.info.resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; } Loading