summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/NotificationManagerService.java
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-06-04 16:08:02 -0400
committerJoe Onorato <joeo@android.com>2010-06-09 09:15:25 -0700
commit005847b03b2ebe3eb1a974a8a04ad51bca6636cd (patch)
tree1664f30f2320bddcf44b0af581b492589a38fcda /services/java/com/android/server/NotificationManagerService.java
parentd956ae8b813da893ab6a9357acfe287c529d6ac2 (diff)
downloadframeworks_base-005847b03b2ebe3eb1a974a8a04ad51bca6636cd.zip
frameworks_base-005847b03b2ebe3eb1a974a8a04ad51bca6636cd.tar.gz
frameworks_base-005847b03b2ebe3eb1a974a8a04ad51bca6636cd.tar.bz2
Handle errors inflating notifications (and their icons).
On an inflation error, the StatusBarService cleans up, removes / doesn't add the views, and calls into the StatusBarManagerService, which tells the NotificationManagerService to remove the notification. That then calls all the way back into the StatusBarService, but I think being extra careful is okay. Throughout the status bar, it's all keyed off of the IBinder key, so if the app comes in with a good notification while we're cleaning up, we won't lose the new notification or anything like that. Change-Id: Iea78a637495a8b67810c214b951d5ddb93becacb
Diffstat (limited to 'services/java/com/android/server/NotificationManagerService.java')
-rwxr-xr-xservices/java/com/android/server/NotificationManagerService.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index b5c2b1b..a51691c 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -303,6 +303,12 @@ class NotificationManagerService extends INotificationManager.Stub
updateLightsLocked();
}
}
+
+ public void onNotificationError(String pkg, String tag, int id, String message) {
+ Slog.d(TAG, "onNotification error pkg=" + pkg + " tag=" + tag + " id=" + id);
+ cancelNotification(pkg, tag, id, 0, 0);
+ // TODO: Tell the activity manager.
+ }
};
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {