DO NOT MERGE Fix BAL via notification.publicVersion
We stripped the token that allows app to retrieve their own notification
and fire their own PI to launch activities from background. But we
forgot to strip the token from notification.publicVersion
Bug: 278558814
Test: NotificationManagerTest#testActivityStartFromRetrievedNotification_isBlocked
(cherry picked from commit cf851d81a9)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1896c2e7068c9ec1ab8355d863d7e8107d5d5706)
Merged-In: I8f25d7a5e47890a0496af023149717e1df482f98
Change-Id: I8f25d7a5e47890a0496af023149717e1df482f98
This commit is contained in:
@@ -3069,8 +3069,11 @@ public class Notification implements Parcelable
|
|||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void setAllowlistToken(@Nullable IBinder token) {
|
public void clearAllowlistToken() {
|
||||||
mWhitelistToken = token;
|
mWhitelistToken = null;
|
||||||
|
if (publicVersion != null) {
|
||||||
|
publicVersion.clearAllowlistToken();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3942,7 +3942,7 @@ public class NotificationManagerService extends SystemService {
|
|||||||
// Remove background token before returning notification to untrusted app, this
|
// Remove background token before returning notification to untrusted app, this
|
||||||
// ensures the app isn't able to perform background operations that are
|
// ensures the app isn't able to perform background operations that are
|
||||||
// associated with notification interactions.
|
// associated with notification interactions.
|
||||||
notification.setAllowlistToken(null);
|
notification.clearAllowlistToken();
|
||||||
return new StatusBarNotification(
|
return new StatusBarNotification(
|
||||||
sbn.getPackageName(),
|
sbn.getPackageName(),
|
||||||
sbn.getOpPkg(),
|
sbn.getOpPkg(),
|
||||||
|
|||||||
Reference in New Issue
Block a user