Revert "Merge "Dispose of TransportClient in BMS#beginRestoreSession" into sc-v2-dev am: fb7c9dfb81 am: 87921ea2d1"

This reverts commit 92910d8bdb.

Reason for revert: Breaking the build due to a conflict with ag/16338778

Change-Id: Ieb054a4ee0670008248aa8b7d47c43ac51b526b5
This commit is contained in:
Ruslan Tkhakokhov
2021-12-07 21:10:03 +00:00
parent 92910d8bdb
commit 7084974c2c

View File

@@ -4068,20 +4068,14 @@ public class UserBackupManagerService {
}
int operationType;
TransportClient transportClient = null;
try {
transportClient = mTransportManager.getTransportClientOrThrow(
transport, /* caller */"BMS.beginRestoreSession");
operationType = getOperationTypeFromTransport(transportClient);
operationType = getOperationTypeFromTransport(
mTransportManager.getTransportClientOrThrow(transport, /* caller */
"BMS.beginRestoreSession"));
} 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) {