Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e5e8b2c authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "Don't crash apps on notification error" into pi-dev am: a73a2c34

am: f2cf4587

Change-Id: Ife91f5655b5ac846809922621db375d128cd1e02
parents 9c41f3a8 f2cf4587
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -782,18 +782,8 @@ public class NotificationManagerService extends SystemService {
        @Override
        public void onNotificationError(int callingUid, int callingPid, String pkg, String tag, int id,
                int uid, int initialPid, String message, int userId) {
            Slog.d(TAG, "onNotification error pkg=" + pkg + " tag=" + tag + " id=" + id
                    + "; will crashApplication(uid=" + uid + ", pid=" + initialPid + ")");
            cancelNotification(callingUid, callingPid, pkg, tag, id, 0, 0, false, userId,
                    REASON_ERROR, null);
            long ident = Binder.clearCallingIdentity();
            try {
                ActivityManager.getService().crashApplication(uid, initialPid, pkg, -1,
                        "Bad notification posted from package " + pkg
                        + ": " + message);
            } catch (RemoteException e) {
            }
            Binder.restoreCallingIdentity(ident);
        }

        @Override