Merge "Defend against a system server crash." into jb-mr2-dev

This commit is contained in:
Daniel Sandler
2013-05-09 17:29:04 +00:00
committed by Android (Google) Code Review

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