DO NOT MERGE Crash invalid FGS notifications am: b6b2906ea6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17864291 Change-Id: I57b968cab49f7d3eef8028ea92d571d5b68489e4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -4836,8 +4836,11 @@ public class NotificationManagerService extends SystemService {
|
|||||||
try {
|
try {
|
||||||
fixNotification(notification, pkg, userId);
|
fixNotification(notification, pkg, userId);
|
||||||
|
|
||||||
} catch (NameNotFoundException e) {
|
} catch (Exception e) {
|
||||||
Slog.e(TAG, "Cannot create a context for sending app", e);
|
if (notification.isForegroundService()) {
|
||||||
|
throw new SecurityException("Invalid FGS notification", e);
|
||||||
|
}
|
||||||
|
Slog.e(TAG, "Cannot fix notification", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user