am 60ac308e: Merge "Defend against a system server crash." into jb-mr2-dev

* commit '60ac308e1da302716fd6c5d805c513221039bac2':
  Defend against a system server crash.
This commit is contained in:
Daniel Sandler
2013-05-09 10:31:51 -07:00
committed by Android Git Automerger

View File

@@ -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);
}
}
}
}