Loading core/java/android/content/pm/ActivityInfo.java +10 −1 Original line number Diff line number Diff line Loading @@ -177,6 +177,11 @@ public class ActivityInfo extends ComponentInfo * @hide */ public static final int RESIZE_MODE_RESIZEABLE_AND_PIPABLE = 3; /** * Activity is does not support resizing, but we are forcing it to be resizeable. * @hide */ public static final int RESIZE_MODE_FORCE_RESIZEABLE = 4; /** * Value indicating if the resizing mode the activity supports. * See {@link android.R.attr#resizeableActivity}. Loading Loading @@ -786,7 +791,9 @@ public class ActivityInfo extends ComponentInfo /** @hide */ public static boolean isResizeableMode(int mode) { return mode == RESIZE_MODE_RESIZEABLE || mode == RESIZE_MODE_RESIZEABLE_AND_PIPABLE; return mode == RESIZE_MODE_RESIZEABLE || mode == RESIZE_MODE_RESIZEABLE_AND_PIPABLE || mode == RESIZE_MODE_FORCE_RESIZEABLE; } /** @hide */ Loading @@ -800,6 +807,8 @@ public class ActivityInfo extends ComponentInfo return "RESIZE_MODE_RESIZEABLE"; case RESIZE_MODE_RESIZEABLE_AND_PIPABLE: return "RESIZE_MODE_RESIZEABLE_AND_PIPABLE"; case RESIZE_MODE_FORCE_RESIZEABLE: return "RESIZE_MODE_FORCE_RESIZEABLE"; default: return "unknown=" + mode; } Loading core/java/android/content/pm/PackageParser.java +2 −1 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import libcore.io.IoUtils; import static android.content.pm.ActivityInfo.FLAG_ALWAYS_FOCUSABLE; import static android.content.pm.ActivityInfo.FLAG_IMMERSIVE; import static android.content.pm.ActivityInfo.RESIZE_MODE_CROP_WINDOWS; import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_AND_PIPABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; Loading Loading @@ -3448,7 +3449,7 @@ public class PackageParser { a.info.resizeMode = RESIZE_MODE_UNRESIZEABLE; } else if (a.info.screenOrientation == SCREEN_ORIENTATION_UNSPECIFIED && (a.info.flags & FLAG_IMMERSIVE) == 0) { a.info.resizeMode = RESIZE_MODE_CROP_WINDOWS; a.info.resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; } if (sa.getBoolean(R.styleable.AndroidManifestActivity_alwaysFocusable, false)) { Loading services/core/java/com/android/server/am/TaskRecord.java +4 −7 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_DEFAULT; import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_IF_WHITELISTED; import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_NEVER; import static android.content.pm.ActivityInfo.RESIZE_MODE_CROP_WINDOWS; import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED; Loading Loading @@ -122,9 +123,6 @@ final class TaskRecord { private static final String ATTR_TASK_AFFILIATION_COLOR = "task_affiliation_color"; private static final String ATTR_CALLING_UID = "calling_uid"; private static final String ATTR_CALLING_PACKAGE = "calling_package"; // TODO(b/26847884): Currently needed while migrating to resize_mode. // Can be removed at some later point. private static final String ATTR_RESIZEABLE = "resizeable"; private static final String ATTR_RESIZE_MODE = "resize_mode"; private static final String ATTR_PRIVILEGED = "privileged"; private static final String ATTR_NON_FULLSCREEN_BOUNDS = "non_fullscreen_bounds"; Loading Loading @@ -1169,7 +1167,7 @@ final class TaskRecord { int nextTaskId = INVALID_TASK_ID; int callingUid = -1; String callingPackage = ""; int resizeMode = RESIZE_MODE_UNRESIZEABLE; int resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; boolean privileged = false; Rect bounds = null; Loading Loading @@ -1231,11 +1229,10 @@ final class TaskRecord { callingUid = Integer.valueOf(attrValue); } else if (ATTR_CALLING_PACKAGE.equals(attrName)) { callingPackage = attrValue; } else if (ATTR_RESIZEABLE.equals(attrName)) { resizeMode = Boolean.valueOf(attrValue) ? RESIZE_MODE_RESIZEABLE : RESIZE_MODE_CROP_WINDOWS; } else if (ATTR_RESIZE_MODE.equals(attrName)) { resizeMode = Integer.valueOf(attrValue); resizeMode = (resizeMode == RESIZE_MODE_CROP_WINDOWS) ? RESIZE_MODE_FORCE_RESIZEABLE : resizeMode; } else if (ATTR_PRIVILEGED.equals(attrName)) { privileged = Boolean.valueOf(attrValue); } else if (ATTR_NON_FULLSCREEN_BOUNDS.equals(attrName)) { Loading Loading
core/java/android/content/pm/ActivityInfo.java +10 −1 Original line number Diff line number Diff line Loading @@ -177,6 +177,11 @@ public class ActivityInfo extends ComponentInfo * @hide */ public static final int RESIZE_MODE_RESIZEABLE_AND_PIPABLE = 3; /** * Activity is does not support resizing, but we are forcing it to be resizeable. * @hide */ public static final int RESIZE_MODE_FORCE_RESIZEABLE = 4; /** * Value indicating if the resizing mode the activity supports. * See {@link android.R.attr#resizeableActivity}. Loading Loading @@ -786,7 +791,9 @@ public class ActivityInfo extends ComponentInfo /** @hide */ public static boolean isResizeableMode(int mode) { return mode == RESIZE_MODE_RESIZEABLE || mode == RESIZE_MODE_RESIZEABLE_AND_PIPABLE; return mode == RESIZE_MODE_RESIZEABLE || mode == RESIZE_MODE_RESIZEABLE_AND_PIPABLE || mode == RESIZE_MODE_FORCE_RESIZEABLE; } /** @hide */ Loading @@ -800,6 +807,8 @@ public class ActivityInfo extends ComponentInfo return "RESIZE_MODE_RESIZEABLE"; case RESIZE_MODE_RESIZEABLE_AND_PIPABLE: return "RESIZE_MODE_RESIZEABLE_AND_PIPABLE"; case RESIZE_MODE_FORCE_RESIZEABLE: return "RESIZE_MODE_FORCE_RESIZEABLE"; default: return "unknown=" + mode; } Loading
core/java/android/content/pm/PackageParser.java +2 −1 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import libcore.io.IoUtils; import static android.content.pm.ActivityInfo.FLAG_ALWAYS_FOCUSABLE; import static android.content.pm.ActivityInfo.FLAG_IMMERSIVE; import static android.content.pm.ActivityInfo.RESIZE_MODE_CROP_WINDOWS; import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_AND_PIPABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; Loading Loading @@ -3448,7 +3449,7 @@ public class PackageParser { a.info.resizeMode = RESIZE_MODE_UNRESIZEABLE; } else if (a.info.screenOrientation == SCREEN_ORIENTATION_UNSPECIFIED && (a.info.flags & FLAG_IMMERSIVE) == 0) { a.info.resizeMode = RESIZE_MODE_CROP_WINDOWS; a.info.resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; } if (sa.getBoolean(R.styleable.AndroidManifestActivity_alwaysFocusable, false)) { Loading
services/core/java/com/android/server/am/TaskRecord.java +4 −7 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_DEFAULT; import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_IF_WHITELISTED; import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_NEVER; import static android.content.pm.ActivityInfo.RESIZE_MODE_CROP_WINDOWS; import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED; Loading Loading @@ -122,9 +123,6 @@ final class TaskRecord { private static final String ATTR_TASK_AFFILIATION_COLOR = "task_affiliation_color"; private static final String ATTR_CALLING_UID = "calling_uid"; private static final String ATTR_CALLING_PACKAGE = "calling_package"; // TODO(b/26847884): Currently needed while migrating to resize_mode. // Can be removed at some later point. private static final String ATTR_RESIZEABLE = "resizeable"; private static final String ATTR_RESIZE_MODE = "resize_mode"; private static final String ATTR_PRIVILEGED = "privileged"; private static final String ATTR_NON_FULLSCREEN_BOUNDS = "non_fullscreen_bounds"; Loading Loading @@ -1169,7 +1167,7 @@ final class TaskRecord { int nextTaskId = INVALID_TASK_ID; int callingUid = -1; String callingPackage = ""; int resizeMode = RESIZE_MODE_UNRESIZEABLE; int resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; boolean privileged = false; Rect bounds = null; Loading Loading @@ -1231,11 +1229,10 @@ final class TaskRecord { callingUid = Integer.valueOf(attrValue); } else if (ATTR_CALLING_PACKAGE.equals(attrName)) { callingPackage = attrValue; } else if (ATTR_RESIZEABLE.equals(attrName)) { resizeMode = Boolean.valueOf(attrValue) ? RESIZE_MODE_RESIZEABLE : RESIZE_MODE_CROP_WINDOWS; } else if (ATTR_RESIZE_MODE.equals(attrName)) { resizeMode = Integer.valueOf(attrValue); resizeMode = (resizeMode == RESIZE_MODE_CROP_WINDOWS) ? RESIZE_MODE_FORCE_RESIZEABLE : resizeMode; } else if (ATTR_PRIVILEGED.equals(attrName)) { privileged = Boolean.valueOf(attrValue); } else if (ATTR_NON_FULLSCREEN_BOUNDS.equals(attrName)) { Loading