Loading core/java/android/content/pm/ActivityInfo.java +23 −21 Original line number Diff line number Diff line Loading @@ -281,6 +281,29 @@ public class ActivityInfo extends ComponentInfo * {@see android.app.Activity#setVrMode(boolean)}. */ public static final int FLAG_ENABLE_VR_MODE = 0x8000; /** * Bit in {@link #flags} indicating if the activity is resizeable to any dimension. * See {@link android.R.attr#resizeableActivity}. * @hide */ public static final int FLAG_RESIZEABLE = 0x10000; /** * Bit in {@link #flags} indicating if the activity is supports picture-in-picture form of * multi-window mode. See {@link android.R.attr#supportsPictureInPicture}. * @hide */ public static final int FLAG_SUPPORTS_PICTURE_IN_PICTURE = 0x20000; /** * Bit in {@link #flags} indicating if the activity is always focusable regardless of if it is * in a task/stack whose activities are normally not focusable. * See android.R.attr#alwaysFocusable. * @hide */ public static final int FLAG_ALWAYS_FOCUSABLE = 0x40000; /** * @hide Bit in {@link #flags}: If set, this component will only be seen * by the system user. Only works with broadcast receivers. Set from the Loading Loading @@ -670,20 +693,6 @@ public class ActivityInfo extends ComponentInfo */ public String parentActivityName; /** * Value indicating if the activity is resizeable to any dimension. * See {@link android.R.attr#resizeableActivity}. * @hide */ public boolean resizeable; /** * Value indicating if the activity is supports picture-in-picture form of multi-window mode. * See {@link android.R.attr#supportsPictureInPicture}. * @hide */ public boolean supportsPip; /** @hide */ public static final int LOCK_TASK_LAUNCH_MODE_DEFAULT = 0; /** @hide */ Loading Loading @@ -735,8 +744,6 @@ public class ActivityInfo extends ComponentInfo uiOptions = orig.uiOptions; parentActivityName = orig.parentActivityName; maxRecents = orig.maxRecents; resizeable = orig.resizeable; supportsPip = orig.supportsPip; lockTaskLaunchMode = orig.lockTaskLaunchMode; layout = orig.layout; } Loading Loading @@ -791,7 +798,6 @@ public class ActivityInfo extends ComponentInfo pw.println(prefix + " uiOptions=0x" + Integer.toHexString(uiOptions)); } if ((flags&DUMP_FLAG_DETAILS) != 0) { pw.println(prefix + "resizeable=" + resizeable + " supportsPip=" + supportsPip); pw.println(prefix + "lockTaskLaunchMode=" + lockTaskLaunchModeToString(lockTaskLaunchMode)); } Loading Loading @@ -829,8 +835,6 @@ public class ActivityInfo extends ComponentInfo dest.writeString(parentActivityName); dest.writeInt(persistableMode); dest.writeInt(maxRecents); dest.writeInt(resizeable ? 1 : 0); dest.writeInt(supportsPip ? 1 : 0); dest.writeInt(lockTaskLaunchMode); if (layout != null) { dest.writeInt(1); Loading Loading @@ -871,8 +875,6 @@ public class ActivityInfo extends ComponentInfo parentActivityName = source.readString(); persistableMode = source.readInt(); maxRecents = source.readInt(); resizeable = (source.readInt() == 1); supportsPip = (source.readInt() == 1); lockTaskLaunchMode = source.readInt(); if (source.readInt() == 1) { layout = new Layout(source); Loading core/java/android/content/pm/PackageParser.java +12 −5 Original line number Diff line number Diff line Loading @@ -3223,12 +3223,19 @@ public class PackageParser { a.info.flags |= ActivityInfo.FLAG_RESUME_WHILE_PAUSING; } a.info.resizeable = sa.getBoolean( R.styleable.AndroidManifestActivity_resizeableActivity, owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.N); if (sa.getBoolean(R.styleable.AndroidManifestActivity_resizeableActivity, owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.N)) { a.info.flags |= ActivityInfo.FLAG_RESIZEABLE; a.info.supportsPip = a.info.resizeable ? sa.getBoolean( R.styleable.AndroidManifestActivity_supportsPictureInPicture, false) : false; if (sa.getBoolean(R.styleable.AndroidManifestActivity_supportsPictureInPicture, false)) { a.info.flags |= ActivityInfo.FLAG_SUPPORTS_PICTURE_IN_PICTURE; } } if (sa.getBoolean(R.styleable.AndroidManifestActivity_alwaysFocusable, false)) { a.info.flags |= ActivityInfo.FLAG_ALWAYS_FOCUSABLE; } a.info.screenOrientation = sa.getInt( R.styleable.AndroidManifestActivity_screenOrientation, Loading core/java/android/view/IWindowManager.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -101,11 +101,14 @@ interface IWindowManager * the task doesn't exist yet. * @param configuration Configuration that is being used with this task. * @param cropWindowsToStack True if the app windows should be cropped to the stack bounds. * @param alwaysFocusable True if the app windows are always focusable regardless of the stack * they are in. */ void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, in Rect taskBounds, in Configuration configuration, boolean cropWindowsToStack); in Rect taskBounds, in Configuration configuration, boolean cropWindowsToStack, boolean alwaysFocusable); /** * * @param token The token we are adding to the input task Id. Loading core/res/res/values/attrs_manifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -1857,6 +1857,11 @@ <attr name="lockTaskMode" /> <attr name="showForAllUsers" /> <attr name="encryptionAware" /> <!-- @hide This activity is always focusable regardless of if it is in a task/stack whose activities are normally not focusable. For example, {@link android.R.attr#supportsPictureInPicture} activities are placed in a task/stack that isn't focusable. This flag allows them to be focusable.--> <attr name="alwaysFocusable" format="boolean" /> </declare-styleable> <!-- The <code>activity-alias</code> tag declares a new Loading services/core/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7274,7 +7274,7 @@ public final class ActivityManagerService extends ActivityManagerNative + "Can't find activity for token=" + token); } if (!r.info.supportsPip) { if (!r.supportsPictureInPicture()) { throw new IllegalArgumentException("enterPictureInPictureMode: " + "Picture-In-Picture not supported for r=" + r); } Loading Loading
core/java/android/content/pm/ActivityInfo.java +23 −21 Original line number Diff line number Diff line Loading @@ -281,6 +281,29 @@ public class ActivityInfo extends ComponentInfo * {@see android.app.Activity#setVrMode(boolean)}. */ public static final int FLAG_ENABLE_VR_MODE = 0x8000; /** * Bit in {@link #flags} indicating if the activity is resizeable to any dimension. * See {@link android.R.attr#resizeableActivity}. * @hide */ public static final int FLAG_RESIZEABLE = 0x10000; /** * Bit in {@link #flags} indicating if the activity is supports picture-in-picture form of * multi-window mode. See {@link android.R.attr#supportsPictureInPicture}. * @hide */ public static final int FLAG_SUPPORTS_PICTURE_IN_PICTURE = 0x20000; /** * Bit in {@link #flags} indicating if the activity is always focusable regardless of if it is * in a task/stack whose activities are normally not focusable. * See android.R.attr#alwaysFocusable. * @hide */ public static final int FLAG_ALWAYS_FOCUSABLE = 0x40000; /** * @hide Bit in {@link #flags}: If set, this component will only be seen * by the system user. Only works with broadcast receivers. Set from the Loading Loading @@ -670,20 +693,6 @@ public class ActivityInfo extends ComponentInfo */ public String parentActivityName; /** * Value indicating if the activity is resizeable to any dimension. * See {@link android.R.attr#resizeableActivity}. * @hide */ public boolean resizeable; /** * Value indicating if the activity is supports picture-in-picture form of multi-window mode. * See {@link android.R.attr#supportsPictureInPicture}. * @hide */ public boolean supportsPip; /** @hide */ public static final int LOCK_TASK_LAUNCH_MODE_DEFAULT = 0; /** @hide */ Loading Loading @@ -735,8 +744,6 @@ public class ActivityInfo extends ComponentInfo uiOptions = orig.uiOptions; parentActivityName = orig.parentActivityName; maxRecents = orig.maxRecents; resizeable = orig.resizeable; supportsPip = orig.supportsPip; lockTaskLaunchMode = orig.lockTaskLaunchMode; layout = orig.layout; } Loading Loading @@ -791,7 +798,6 @@ public class ActivityInfo extends ComponentInfo pw.println(prefix + " uiOptions=0x" + Integer.toHexString(uiOptions)); } if ((flags&DUMP_FLAG_DETAILS) != 0) { pw.println(prefix + "resizeable=" + resizeable + " supportsPip=" + supportsPip); pw.println(prefix + "lockTaskLaunchMode=" + lockTaskLaunchModeToString(lockTaskLaunchMode)); } Loading Loading @@ -829,8 +835,6 @@ public class ActivityInfo extends ComponentInfo dest.writeString(parentActivityName); dest.writeInt(persistableMode); dest.writeInt(maxRecents); dest.writeInt(resizeable ? 1 : 0); dest.writeInt(supportsPip ? 1 : 0); dest.writeInt(lockTaskLaunchMode); if (layout != null) { dest.writeInt(1); Loading Loading @@ -871,8 +875,6 @@ public class ActivityInfo extends ComponentInfo parentActivityName = source.readString(); persistableMode = source.readInt(); maxRecents = source.readInt(); resizeable = (source.readInt() == 1); supportsPip = (source.readInt() == 1); lockTaskLaunchMode = source.readInt(); if (source.readInt() == 1) { layout = new Layout(source); Loading
core/java/android/content/pm/PackageParser.java +12 −5 Original line number Diff line number Diff line Loading @@ -3223,12 +3223,19 @@ public class PackageParser { a.info.flags |= ActivityInfo.FLAG_RESUME_WHILE_PAUSING; } a.info.resizeable = sa.getBoolean( R.styleable.AndroidManifestActivity_resizeableActivity, owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.N); if (sa.getBoolean(R.styleable.AndroidManifestActivity_resizeableActivity, owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.N)) { a.info.flags |= ActivityInfo.FLAG_RESIZEABLE; a.info.supportsPip = a.info.resizeable ? sa.getBoolean( R.styleable.AndroidManifestActivity_supportsPictureInPicture, false) : false; if (sa.getBoolean(R.styleable.AndroidManifestActivity_supportsPictureInPicture, false)) { a.info.flags |= ActivityInfo.FLAG_SUPPORTS_PICTURE_IN_PICTURE; } } if (sa.getBoolean(R.styleable.AndroidManifestActivity_alwaysFocusable, false)) { a.info.flags |= ActivityInfo.FLAG_ALWAYS_FOCUSABLE; } a.info.screenOrientation = sa.getInt( R.styleable.AndroidManifestActivity_screenOrientation, Loading
core/java/android/view/IWindowManager.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -101,11 +101,14 @@ interface IWindowManager * the task doesn't exist yet. * @param configuration Configuration that is being used with this task. * @param cropWindowsToStack True if the app windows should be cropped to the stack bounds. * @param alwaysFocusable True if the app windows are always focusable regardless of the stack * they are in. */ void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, in Rect taskBounds, in Configuration configuration, boolean cropWindowsToStack); in Rect taskBounds, in Configuration configuration, boolean cropWindowsToStack, boolean alwaysFocusable); /** * * @param token The token we are adding to the input task Id. Loading
core/res/res/values/attrs_manifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -1857,6 +1857,11 @@ <attr name="lockTaskMode" /> <attr name="showForAllUsers" /> <attr name="encryptionAware" /> <!-- @hide This activity is always focusable regardless of if it is in a task/stack whose activities are normally not focusable. For example, {@link android.R.attr#supportsPictureInPicture} activities are placed in a task/stack that isn't focusable. This flag allows them to be focusable.--> <attr name="alwaysFocusable" format="boolean" /> </declare-styleable> <!-- The <code>activity-alias</code> tag declares a new Loading
services/core/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7274,7 +7274,7 @@ public final class ActivityManagerService extends ActivityManagerNative + "Can't find activity for token=" + token); } if (!r.info.supportsPip) { if (!r.supportsPictureInPicture()) { throw new IllegalArgumentException("enterPictureInPictureMode: " + "Picture-In-Picture not supported for r=" + r); } Loading