Merge "Catch double unbind of dead service"

This commit is contained in:
Treehugger Robot
2018-04-20 17:14:39 +00:00
committed by Gerrit Code Review

View File

@@ -844,7 +844,11 @@ abstract public class ManagedServices {
Slog.v(TAG, " disconnecting old " + getCaption() + ": " + info.service);
removeServiceLocked(i);
if (info.connection != null) {
mContext.unbindService(info.connection);
try {
mContext.unbindService(info.connection);
} catch (IllegalArgumentException e) {
Slog.e(TAG, "failed to unbind " + name, e);
}
}
}
}