DO NOT MERGE Fix BAL via notification.publicVersion am: 1896c2e706 am: 95f88ce4c9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23982977

Change-Id: I97c95cc203b7c47812bd5aeb3853836bb1940710
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Nan Wu
2023-08-10 16:49:15 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 3 deletions

View File

@@ -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();
}
}
/**

View File

@@ -4368,7 +4368,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(),