diff options
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/service/notification/NotificationListenerService.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index bfea9ca..2e0e59b 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -164,11 +164,19 @@ public abstract class NotificationListenerService extends Service { private class INotificationListenerWrapper extends INotificationListener.Stub { @Override public void onNotificationPosted(StatusBarNotification sbn) { - NotificationListenerService.this.onNotificationPosted(sbn); + try { + NotificationListenerService.this.onNotificationPosted(sbn); + } catch (Throwable t) { + Log.w(TAG, "Error running onNotificationPosted", t); + } } @Override public void onNotificationRemoved(StatusBarNotification sbn) { - NotificationListenerService.this.onNotificationRemoved(sbn); + try { + NotificationListenerService.this.onNotificationRemoved(sbn); + } catch (Throwable t) { + Log.w(TAG, "Error running onNotificationRemoved", t); + } } } } |