Dispose of TransportClient in BMS#beginRestoreSession
Currently we create a new transport client in
UserBackupManagerService#beginRestoreSession but don't dispose of it
properly which leaves us bound to the transport service. The client can
eventually be garbage collected triggering the finalize() method which
will unbind the transport but there're no guarantees as to whne it will
happen.
Explicitly dispose of the transport client like it's done in other
places in the code.
Bug: 196377372
Test: 1. Manual:
1.1. Run restore for any package via 'adb shell bmgr'
1.2. Check logcat for TransportClientManager to make sure the
transport client created in beginRestoreSession() has been
cleaned up.
Change-Id: I9304768330ab796fccf67b544766d87461d977d7
1 file changed