From 7e615a523cd5dae44a7d2b949319f53e6480194e Mon Sep 17 00:00:00 2001 From: Dmitry Dementyev Date: Wed, 9 Dec 2020 16:21:32 -0800 Subject: [PATCH] Add IMMUTABLE flag to AccountManager pending intents. Bug: 174189215 Test: none Change-Id: I11c81ce4cfb0f51a2fabf92a45d8425647df2121 --- .../com/android/server/accounts/AccountManagerService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index 9a94e4efdfe31..15e31ba0f140d 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -3085,7 +3085,8 @@ public class AccountManagerService .setContentTitle(title) .setContentText(subtitle) .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0, intent, - PendingIntent.FLAG_CANCEL_CURRENT, null, user)) + PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE, + null, user)) .build(); installNotification(getCredentialPermissionNotificationId( account, authTokenType, uid), n, packageName, user.getIdentifier()); @@ -5307,7 +5308,8 @@ public class AccountManagerService .setContentTitle(String.format(notificationTitleFormat, account.name)) .setContentText(message) .setContentIntent(PendingIntent.getActivityAsUser( - mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT, + mContext, 0, intent, + PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE, null, new UserHandle(userId))) .build(); installNotification(id, n, packageName, userId);