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
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user