Add IMMUTABLE flag to AccountManager pending intents.

Bug: 174189215,177931355
Test: none
Change-Id: I11c81ce4cfb0f51a2fabf92a45d8425647df2121
(cherry picked from commit 7e615a523c)
This commit is contained in:
Dmitry Dementyev
2020-12-09 16:21:32 -08:00
parent de3b7f1aea
commit 2cd616165c

View File

@@ -3071,7 +3071,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());
@@ -5293,7 +5294,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);