From 15f4e51d571fe0f6957c2474fd392995162a0edf Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Thu, 13 Apr 2023 16:00:43 +0000 Subject: [PATCH] Add FLAG_UPDATE_CURRENT flag when creating app bubble pending intent Test: manually 1. open Google Keep in a bubble via stylus button click. 2. confirm the Google Keep drawing activity is shown. 3. close the bubble 4. open Google Keep in a bubble via the keyboard shortcut. 5. confirm the Google Keep text input activity is shown. Bug: 277925593 Change-Id: I6da71fd976d3739355e2de63f88466ba8350d948 --- .../src/com/android/wm/shell/bubbles/BubbleExpandedView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java index a317c449621bc..684a23a198c2f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java @@ -246,7 +246,7 @@ public class BubbleExpandedView extends LinearLayout { mBubble.getAppBubbleIntent() .addFlags(FLAG_ACTIVITY_NEW_DOCUMENT) .addFlags(FLAG_ACTIVITY_MULTIPLE_TASK), - PendingIntent.FLAG_IMMUTABLE, + PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT, /* options= */ null); mTaskView.startActivity(pi, /* fillInIntent= */ null, options, launchBounds);