Merge "Handle Context#unbindService exception" into rvc-dev

This commit is contained in:
Zimuzo Ezeozue
2020-04-30 14:26:14 +00:00
committed by Android (Google) Code Review

View File

@@ -242,7 +242,13 @@ public final class StorageUserConnection {
} }
if (oldConnection != null) { if (oldConnection != null) {
mContext.unbindService(oldConnection); try {
mContext.unbindService(oldConnection);
} catch (Exception e) {
// Handle IllegalArgumentException that may be thrown if the user is already
// stopped when we try to unbind
Slog.w(TAG, "Failed to unbind service", e);
}
} }
} }