Merge "Dispose of TransportClient in BMS#beginRestoreSession" into sc-v2-dev am: fb7c9dfb81
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16343958 Change-Id: I33cc7660367057f5cea9fd74878152e1750acacb
This commit is contained in:
@@ -4068,14 +4068,20 @@ public class UserBackupManagerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int operationType;
|
int operationType;
|
||||||
|
TransportClient transportClient = null;
|
||||||
try {
|
try {
|
||||||
operationType = getOperationTypeFromTransport(
|
transportClient = mTransportManager.getTransportClientOrThrow(
|
||||||
mTransportManager.getTransportClientOrThrow(transport, /* caller */
|
transport, /* caller */"BMS.beginRestoreSession");
|
||||||
"BMS.beginRestoreSession"));
|
operationType = getOperationTypeFromTransport(transportClient);
|
||||||
} catch (TransportNotAvailableException | TransportNotRegisteredException
|
} catch (TransportNotAvailableException | TransportNotRegisteredException
|
||||||
| RemoteException e) {
|
| RemoteException e) {
|
||||||
Slog.w(TAG, "Failed to get operation type from transport: " + e);
|
Slog.w(TAG, "Failed to get operation type from transport: " + e);
|
||||||
return null;
|
return null;
|
||||||
|
} finally {
|
||||||
|
if (transportClient != null) {
|
||||||
|
mTransportManager.disposeOfTransportClient(transportClient,
|
||||||
|
/* caller */"BMS.beginRestoreSession");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
|||||||
Reference in New Issue
Block a user