Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11723,6 +11723,7 @@ package android.content.pm { field public static final int FLAG_STATE_NOT_NEEDED = 16; // 0x10 field public static final int LAUNCH_MULTIPLE = 0; // 0x0 field public static final int LAUNCH_SINGLE_INSTANCE = 3; // 0x3 field public static final int LAUNCH_SINGLE_INSTANCE_PER_TASK = 4; // 0x4 field public static final int LAUNCH_SINGLE_TASK = 2; // 0x2 field public static final int LAUNCH_SINGLE_TOP = 1; // 0x1 field public static final int PERSIST_ACROSS_REBOOTS = 2; // 0x2 core/java/android/content/pm/ActivityInfo.java +20 −4 Original line number Diff line number Diff line Loading @@ -73,13 +73,29 @@ public class ActivityInfo extends ComponentInfo implements Parcelable { * the {@link android.R.attr#launchMode} attribute. */ public static final int LAUNCH_SINGLE_INSTANCE = 3; /** * Constant corresponding to <code>singleInstancePerTask</code> in * the {@link android.R.attr#launchMode} attribute. */ public static final int LAUNCH_SINGLE_INSTANCE_PER_TASK = 4; /** @hide */ @IntDef(prefix = "LAUNCH_", value = { LAUNCH_MULTIPLE, LAUNCH_SINGLE_TOP, LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE, LAUNCH_SINGLE_INSTANCE_PER_TASK }) @Retention(RetentionPolicy.SOURCE) public @interface LaunchMode { } /** * The launch mode style requested by the activity. From the * {@link android.R.attr#launchMode} attribute, one of * {@link #LAUNCH_MULTIPLE}, * {@link #LAUNCH_SINGLE_TOP}, {@link #LAUNCH_SINGLE_TASK}, or * {@link #LAUNCH_SINGLE_INSTANCE}. * {@link android.R.attr#launchMode} attribute. */ @LaunchMode public int launchMode; /** Loading core/java/android/content/pm/PackageParser.java +1 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,7 @@ public class PackageParser { public static final String METADATA_SUPPORTS_SIZE_CHANGES = "android.supports_size_changes"; public static final String METADATA_ACTIVITY_WINDOW_LAYOUT_AFFINITY = "android.activity_window_layout_affinity"; public static final String METADATA_ACTIVITY_LAUNCH_MODE = "android.activity.launch_mode"; /** * Bit mask of all the valid bits that can be set in recreateOnConfigChanges. Loading core/java/android/content/pm/parsing/component/ParsedActivityUtils.java +12 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.content.pm.parsing.component; import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_INSTANCE_PER_TASK; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.content.pm.parsing.component.ComponentParseUtils.flag; Loading @@ -23,6 +24,7 @@ import android.annotation.NonNull; import android.app.ActivityTaskManager; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageParser; import android.content.pm.parsing.ParsingPackage; import android.content.pm.parsing.ParsingPackageUtils; import android.content.pm.parsing.ParsingUtils; Loading Loading @@ -402,6 +404,16 @@ public class ParsedActivityUtils { } } if (!isAlias && activity.launchMode != LAUNCH_SINGLE_INSTANCE_PER_TASK && activity.metaData != null && activity.metaData.containsKey( PackageParser.METADATA_ACTIVITY_LAUNCH_MODE)) { final String launchMode = activity.metaData.getString( PackageParser.METADATA_ACTIVITY_LAUNCH_MODE); if (launchMode != null && launchMode.equals("singleInstancePerTask")) { activity.launchMode = LAUNCH_SINGLE_INSTANCE_PER_TASK; } } ParseResult<ActivityInfo.WindowLayout> layoutResult = resolveActivityWindowLayout(activity, input); if (layoutResult.isError()) { Loading core/res/res/values/attrs_manifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -822,6 +822,12 @@ <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a> document for more details about tasks.--> <enum name="singleInstance" value="3" /> <!-- The activity can only be running as the root activity of the task, the first activity that created the task, and therefore there will only be one instance of this activity in a task. In constrast to the {@code singleTask} launch mode, this activity can be started in multiple instances in different tasks if the {@code FLAG_ACTIVITY_MULTIPLE_TASK} is set.--> <enum name="singleInstancePerTask" value="4" /> </attr> <!-- Specify the orientation an activity should be run in. If not Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11723,6 +11723,7 @@ package android.content.pm { field public static final int FLAG_STATE_NOT_NEEDED = 16; // 0x10 field public static final int LAUNCH_MULTIPLE = 0; // 0x0 field public static final int LAUNCH_SINGLE_INSTANCE = 3; // 0x3 field public static final int LAUNCH_SINGLE_INSTANCE_PER_TASK = 4; // 0x4 field public static final int LAUNCH_SINGLE_TASK = 2; // 0x2 field public static final int LAUNCH_SINGLE_TOP = 1; // 0x1 field public static final int PERSIST_ACROSS_REBOOTS = 2; // 0x2
core/java/android/content/pm/ActivityInfo.java +20 −4 Original line number Diff line number Diff line Loading @@ -73,13 +73,29 @@ public class ActivityInfo extends ComponentInfo implements Parcelable { * the {@link android.R.attr#launchMode} attribute. */ public static final int LAUNCH_SINGLE_INSTANCE = 3; /** * Constant corresponding to <code>singleInstancePerTask</code> in * the {@link android.R.attr#launchMode} attribute. */ public static final int LAUNCH_SINGLE_INSTANCE_PER_TASK = 4; /** @hide */ @IntDef(prefix = "LAUNCH_", value = { LAUNCH_MULTIPLE, LAUNCH_SINGLE_TOP, LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE, LAUNCH_SINGLE_INSTANCE_PER_TASK }) @Retention(RetentionPolicy.SOURCE) public @interface LaunchMode { } /** * The launch mode style requested by the activity. From the * {@link android.R.attr#launchMode} attribute, one of * {@link #LAUNCH_MULTIPLE}, * {@link #LAUNCH_SINGLE_TOP}, {@link #LAUNCH_SINGLE_TASK}, or * {@link #LAUNCH_SINGLE_INSTANCE}. * {@link android.R.attr#launchMode} attribute. */ @LaunchMode public int launchMode; /** Loading
core/java/android/content/pm/PackageParser.java +1 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,7 @@ public class PackageParser { public static final String METADATA_SUPPORTS_SIZE_CHANGES = "android.supports_size_changes"; public static final String METADATA_ACTIVITY_WINDOW_LAYOUT_AFFINITY = "android.activity_window_layout_affinity"; public static final String METADATA_ACTIVITY_LAUNCH_MODE = "android.activity.launch_mode"; /** * Bit mask of all the valid bits that can be set in recreateOnConfigChanges. Loading
core/java/android/content/pm/parsing/component/ParsedActivityUtils.java +12 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.content.pm.parsing.component; import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_INSTANCE_PER_TASK; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.content.pm.parsing.component.ComponentParseUtils.flag; Loading @@ -23,6 +24,7 @@ import android.annotation.NonNull; import android.app.ActivityTaskManager; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageParser; import android.content.pm.parsing.ParsingPackage; import android.content.pm.parsing.ParsingPackageUtils; import android.content.pm.parsing.ParsingUtils; Loading Loading @@ -402,6 +404,16 @@ public class ParsedActivityUtils { } } if (!isAlias && activity.launchMode != LAUNCH_SINGLE_INSTANCE_PER_TASK && activity.metaData != null && activity.metaData.containsKey( PackageParser.METADATA_ACTIVITY_LAUNCH_MODE)) { final String launchMode = activity.metaData.getString( PackageParser.METADATA_ACTIVITY_LAUNCH_MODE); if (launchMode != null && launchMode.equals("singleInstancePerTask")) { activity.launchMode = LAUNCH_SINGLE_INSTANCE_PER_TASK; } } ParseResult<ActivityInfo.WindowLayout> layoutResult = resolveActivityWindowLayout(activity, input); if (layoutResult.isError()) { Loading
core/res/res/values/attrs_manifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -822,6 +822,12 @@ <a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a> document for more details about tasks.--> <enum name="singleInstance" value="3" /> <!-- The activity can only be running as the root activity of the task, the first activity that created the task, and therefore there will only be one instance of this activity in a task. In constrast to the {@code singleTask} launch mode, this activity can be started in multiple instances in different tasks if the {@code FLAG_ACTIVITY_MULTIPLE_TASK} is set.--> <enum name="singleInstancePerTask" value="4" /> </attr> <!-- Specify the orientation an activity should be run in. If not Loading