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
This commit is contained in:
Steven Ng
2023-04-13 16:00:43 +00:00
parent 844c5aec48
commit 15f4e51d57

View File

@@ -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);