Loading services/core/java/com/android/server/notification/NotificationManagerService.java +26 −24 Original line number Original line Diff line number Diff line Loading @@ -3071,17 +3071,22 @@ public class NotificationManagerService extends SystemService { public void removeForegroundServiceFlagFromNotification(String pkg, int notificationId, public void removeForegroundServiceFlagFromNotification(String pkg, int notificationId, int userId) { int userId) { checkCallerIsSystem(); checkCallerIsSystem(); synchronized (mNotificationLock) { mHandler.post(new Runnable() { mHandler.post(new Runnable() { @Override @Override public void run() { public void run() { synchronized (mNotificationLock) { removeForegroundServiceFlagByListLocked(mEnqueuedNotifications, pkg, notificationId, userId); removeForegroundServiceFlagByListLocked(mNotificationList, pkg, notificationId, userId); } } }); } private void removeForegroundServiceFlagByListLocked( ArrayList<NotificationRecord> notificationList, String pkg, int notificationId, int userId) { NotificationRecord r = NotificationRecord r = findNotificationLocked(pkg, null, notificationId, userId); findNotificationByListLocked(notificationList, pkg, null, notificationId, userId); if (r == null) { if (r == null) { Log.d(TAG, "stripForegroundServiceFlag: Could not find notification with " + "pkg=" + pkg + " / id=" + notificationId + " / userId=" + userId); return; return; } } StatusBarNotification sbn = r.sbn; StatusBarNotification sbn = r.sbn; Loading @@ -3095,9 +3100,6 @@ public class NotificationManagerService extends SystemService { mListeners.notifyPostedLocked(sbn, sbn /* oldSbn */); mListeners.notifyPostedLocked(sbn, sbn /* oldSbn */); mGroupHelper.onNotificationPosted(sbn); mGroupHelper.onNotificationPosted(sbn); } } }); } } }; }; void enqueueNotificationInternal(final String pkg, final String opPkg, final int callingUid, void enqueueNotificationInternal(final String pkg, final String opPkg, final int callingUid, Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +26 −24 Original line number Original line Diff line number Diff line Loading @@ -3071,17 +3071,22 @@ public class NotificationManagerService extends SystemService { public void removeForegroundServiceFlagFromNotification(String pkg, int notificationId, public void removeForegroundServiceFlagFromNotification(String pkg, int notificationId, int userId) { int userId) { checkCallerIsSystem(); checkCallerIsSystem(); synchronized (mNotificationLock) { mHandler.post(new Runnable() { mHandler.post(new Runnable() { @Override @Override public void run() { public void run() { synchronized (mNotificationLock) { removeForegroundServiceFlagByListLocked(mEnqueuedNotifications, pkg, notificationId, userId); removeForegroundServiceFlagByListLocked(mNotificationList, pkg, notificationId, userId); } } }); } private void removeForegroundServiceFlagByListLocked( ArrayList<NotificationRecord> notificationList, String pkg, int notificationId, int userId) { NotificationRecord r = NotificationRecord r = findNotificationLocked(pkg, null, notificationId, userId); findNotificationByListLocked(notificationList, pkg, null, notificationId, userId); if (r == null) { if (r == null) { Log.d(TAG, "stripForegroundServiceFlag: Could not find notification with " + "pkg=" + pkg + " / id=" + notificationId + " / userId=" + userId); return; return; } } StatusBarNotification sbn = r.sbn; StatusBarNotification sbn = r.sbn; Loading @@ -3095,9 +3100,6 @@ public class NotificationManagerService extends SystemService { mListeners.notifyPostedLocked(sbn, sbn /* oldSbn */); mListeners.notifyPostedLocked(sbn, sbn /* oldSbn */); mGroupHelper.onNotificationPosted(sbn); mGroupHelper.onNotificationPosted(sbn); } } }); } } }; }; void enqueueNotificationInternal(final String pkg, final String opPkg, final int callingUid, void enqueueNotificationInternal(final String pkg, final String opPkg, final int callingUid, Loading