Use Kotlin coroutines for SuggestedDeviceConnectionManager.
The improvements are: - Scan and connection are 2 sequential suspend functions with a limited scope. - Reduce to a minimum mutable state within the class. - Having a separate 10 second timeout for scan and 20 second timeout for connection. - Ability to cleanup resources with the `cancel` method. Bug: 443107229 Bug: 442856281 Test: atest SuggestedDeviceConnectionManagerTest Test: atest SuggestedDeviceManagerTest Test: On a physical device Flag: com.android.media.flags.use_suggested_device_connection_manager Change-Id: I77b11d64d1125ba55376002615d0fe29949c5f06
Loading
Please register or sign in to comment