Merge "Handle Context#unbindService exception" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
06e29c96fc
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user