From 911123acdd2cda20c6d85f9c0f7bf5510559891d Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Mon, 26 Apr 2021 17:39:47 +0800 Subject: [PATCH] Update documentation for activity flags. 1. LAUNCHED_FROM_HISTORY, remove the out of date sentence. 2. NEW_DOCUMENT,add information about documentLaunchMode="never" 3. SINGLE_TOP, refer to launch modes for more information. Bug: 123083574 Test: build Change-Id: Id4da7be9993aaf1140c1c709a23ae7ed6d1718f5 --- core/java/android/content/Intent.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index f8d407db07a52..c4495d5ef0f6e 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -6413,7 +6413,9 @@ public class Intent implements Parcelable, Cloneable { public static final int FLAG_ACTIVITY_NO_HISTORY = 0x40000000; /** * If set, the activity will not be launched if it is already running - * at the top of the history stack. + * at the top of the history stack. See + * + * Tasks and Back Stack for more information. */ public static final int FLAG_ACTIVITY_SINGLE_TOP = 0x20000000; /** @@ -6553,8 +6555,7 @@ public class Intent implements Parcelable, Cloneable { public static final int FLAG_ACTIVITY_RESET_TASK_IF_NEEDED = 0x00200000; /** * This flag is not normally set by application code, but set for you by - * the system if this activity is being launched from history - * (longpress home key). + * the system if this activity is being launched from history. */ public static final int FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY = 0x00100000; /** @@ -6587,7 +6588,9 @@ public class Intent implements Parcelable, Cloneable { * equivalent of the Activity manifest specifying {@link * android.R.attr#documentLaunchMode}="intoExisting". When used with * FLAG_ACTIVITY_MULTIPLE_TASK it is the equivalent of the Activity manifest specifying - * {@link android.R.attr#documentLaunchMode}="always". + * {@link android.R.attr#documentLaunchMode}="always". The flag is ignored even in + * conjunction with {@link #FLAG_ACTIVITY_MULTIPLE_TASK} when the Activity manifest specifies + * {@link android.R.attr#documentLaunchMode}="never". * * Refer to {@link android.R.attr#documentLaunchMode} for more information. *