Commit 3b5e997
committed
Replace PendingIntent.FLAG_UPDATE_CURRENT with PendingIntent.FLAG_CANCEL_CURRENT in InstrumentationActivityInvoker.
With FLAG_CANCEL_CURRENT, if a PendingIntent already exists with the same intent data, the previous PendingIntent is cancelled, thus removing any previous extras from the Intent.
FLAG_CANCEL_CURRENT solves the issue where the system caches the extras from the previous intent for the PendingIntent and thus the extras passed to the PendingIntent for the new Intent would be ignored. In theory, this would cause a very strange bug where the new intent would start the activity but with the previous extras.
PiperOrigin-RevId: 7890364491 parent 4d65832 commit 3b5e997
File tree
2 files changed
+3
-1
lines changed- core
- java/androidx/test/core/app
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
0 commit comments