summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nan Wu <wnan@google.com> 2023-08-10 16:06:42 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-08-10 16:06:42 +0000
commit95f88ce4c9df9be74707242643d39b2da3d34d1c (patch)
tree5ee1d4a915a385a67780e80edb5cb26df41e2431
parent8251c1850a15f48e8dee53810c214901a335cce6 (diff)
parent1896c2e7068c9ec1ab8355d863d7e8107d5d5706 (diff)
DO NOT MERGE Fix BAL via notification.publicVersion am: 1896c2e706
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23982977 Change-Id: Iaa889e005cba27f20072f5d6673c0f02fecf9638 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/java/android/app/Notification.java7
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 1ecbed49c61f..dbbea3690930 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3413,8 +3413,11 @@ public class Notification implements Parcelable
*
* @hide
*/
- public void setAllowlistToken(@Nullable IBinder token) {
- mAllowlistToken = token;
+ public void clearAllowlistToken() {
+ mAllowlistToken = null;
+ if (publicVersion != null) {
+ publicVersion.clearAllowlistToken();
+ }
}
/**
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 1d5aa8e5d72a..c68fb98582c0 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -4341,7 +4341,7 @@ public class NotificationManagerService extends SystemService {
// Remove background token before returning notification to untrusted app, this
// ensures the app isn't able to perform background operations that are
// associated with notification interactions.
- notification.setAllowlistToken(null);
+ notification.clearAllowlistToken();
return new StatusBarNotification(
sbn.getPackageName(),
sbn.getOpPkg(),