Fix the connecting state for the device suggesting chip.
The changes in the suggested device chip state management: - The matching between `MediaDevice` and `SuggestedDeviceInfo` is performed by route ID instead of `MediaDevice#id` since the latter might be not equal to route id in some scenarios. - If `CONNECTING` or `CONNECTING_FAILED` set as a result of the event, they are not replaced by the `DISCONNECTED` state. - A `CONNECTING` state set as a result of the user interaction event expires in 20 seconds. - A `CONNECTING_FAILED` state set as a result of a failed request expires in 10 seconds. Upon expiration, the suggestion is cleared until the new suggestion is provided. - `CONNECTING` state is set before scan starts. That shows the spinner as soon as a user clicks on a button. Bug: 431423375 Test: atest SuggestedDeviceManagerTest MediaDeviceManagerTest Test: On a physical device Flag: com.android.media.flags.enable_suggested_device_api Change-Id: I716cd921c68c5f4ec9f4667b8aad673c6774a23d
Loading
Please register or sign in to comment