summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@android.com> 2013-05-07 13:53:47 -0400
committer Daniel Sandler <dsandler@android.com> 2013-05-07 13:55:07 -0400
commitc1b49bd26b2d306854f8392693a7c980172bc507 (patch)
treed9e4a7ad1d467b2e3bac2871a464930fcc18afc0
parent4c95c5377a75a3d6c5f3ed8b09a56071d51fadb1 (diff)
Defend against a system server crash.
Bug: 8575629 Change-Id: Iafc8ab2f7460c8eacc37fc077cf5a3df16cf2911
-rw-r--r--services/java/com/android/server/NotificationManagerService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index cc74b9202014..6b38f89f3879 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -727,7 +727,13 @@ public class NotificationManagerService extends INotificationManager.Stub
&& info.userid == userid) {
mListeners.remove(i);
if (info.connection != null) {
- mContext.unbindService(info.connection);
+ try {
+ mContext.unbindService(info.connection);
+ } catch (IllegalArgumentException ex) {
+ // something happened to the service: we think we have a connection
+ // but it's bogus.
+ Slog.e(TAG, "Listener " + name + " could not be unbound: " + ex);
+ }
}
}
}