Merge "Dispose of TransportClient in BMS#beginRestoreSession" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fb7c9dfb81
@@ -4068,14 +4068,20 @@ public class UserBackupManagerService {
|
||||
}
|
||||
|
||||
int operationType;
|
||||
TransportClient transportClient = null;
|
||||
try {
|
||||
operationType = getOperationTypeFromTransport(
|
||||
mTransportManager.getTransportClientOrThrow(transport, /* caller */
|
||||
"BMS.beginRestoreSession"));
|
||||
transportClient = mTransportManager.getTransportClientOrThrow(
|
||||
transport, /* caller */"BMS.beginRestoreSession");
|
||||
operationType = getOperationTypeFromTransport(transportClient);
|
||||
} catch (TransportNotAvailableException | TransportNotRegisteredException
|
||||
| RemoteException e) {
|
||||
Slog.w(TAG, "Failed to get operation type from transport: " + e);
|
||||
return null;
|
||||
} finally {
|
||||
if (transportClient != null) {
|
||||
mTransportManager.disposeOfTransportClient(transportClient,
|
||||
/* caller */"BMS.beginRestoreSession");
|
||||
}
|
||||
}
|
||||
|
||||
synchronized (this) {
|
||||
|
||||
Reference in New Issue
Block a user