diff options
author | John Wu <topjohnwu@google.com> | 2022-09-27 17:11:32 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-19 23:19:18 +0000 |
commit | 18cc8e142636c2c1fc21b7502ff48068ac16ddc9 (patch) | |
tree | e8e661fc1a04568f35b94b4463c468a632cebeb6 | |
parent | 5bb0b52009b87a54f74306230eca8bc30a24c681 (diff) | |
download | base-18cc8e142636c2c1fc21b7502ff48068ac16ddc9.tar.gz |
Use setIdentifier instead of dynamic categories
Change I27987301ebf393de6f781b17ed7bc789789c01ab introduced the usage of
dynamic categories to prevent the pending intent from being cached. This
is incompatible with the new T explicit intent filter enforcement, as a
dynamic category can never match any intent-filter.
Switch to use the PendingIntent#setIdentifier API introduced in API 29,
specifically designed for this use case.
Bug: 249043995
Test: m + manual
Change-Id: I2bbe4e554ef337299138f2a7691eeffc60e18e9d
(cherry picked from commit 8afc387eb1fe5061250e88d5666ae47c11ab5b07)
Merged-In: I2bbe4e554ef337299138f2a7691eeffc60e18e9d
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java index 59022c0ffbf2..6514d5b6f080 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java @@ -289,7 +289,7 @@ public class InstantAppNotifier extends CoreStartable .setComponent(aiaComponent) .setAction(Intent.ACTION_VIEW) .addCategory(Intent.CATEGORY_BROWSABLE) - .addCategory("unique:" + System.currentTimeMillis()) + .setIdentifier("unique:" + System.currentTimeMillis()) .putExtra(Intent.EXTRA_PACKAGE_NAME, appInfo.packageName) .putExtra( Intent.EXTRA_VERSION_CODE, |