diff options
author | Winson Chung <winsonc@google.com> | 2023-04-19 07:24:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-04-19 07:24:18 +0000 |
commit | a082fd92a4b91180078b2f98cb79728cdd5ff1f4 (patch) | |
tree | 9e62556b120918caebbea8b8927ee80d07e3d934 | |
parent | ba8c9b4f2de29be14b5648fb1b437a747fcc445d (diff) | |
parent | c62d2e1021a030f4f0ae5fcfc8fe8e0875fa669f (diff) | |
download | base-a082fd92a4b91180078b2f98cb79728cdd5ff1f4.tar.gz |
Merge "Only allow NEW_TASK flag when adjusting pending intents" into qt-dev
-rw-r--r-- | core/java/android/app/ActivityOptions.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java index 926044bffdd0..f32a21be3a8e 100644 --- a/core/java/android/app/ActivityOptions.java +++ b/core/java/android/app/ActivityOptions.java @@ -20,6 +20,8 @@ import static android.Manifest.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIO import static android.app.ActivityTaskManager.SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT; import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; +import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; +import static android.content.Intent.FLAG_RECEIVER_FOREGROUND; import static android.view.Display.INVALID_DISPLAY; import android.annotation.Nullable; @@ -1263,7 +1265,9 @@ public class ActivityOptions { * @hide */ public int getPendingIntentLaunchFlags() { - return mPendingIntentLaunchFlags; + // b/243794108: Ignore all flags except the new task flag, to be reconsidered in b/254490217 + return mPendingIntentLaunchFlags & + (FLAG_ACTIVITY_NEW_TASK | FLAG_RECEIVER_FOREGROUND); } /** |