Dispose of TransportClient in BMS#beginRestoreSession
(This CL was already merged into sc-v2-dev but has to be manually cherry-picked into master due to a conflict.) 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 (cherry picked from commit 4428e22d)
Loading
Please register or sign in to comment