Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5fcac15 authored by Alex Shabalin's avatar Alex Shabalin Committed by Alexandr Shabalin
Browse files

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
parent 10179b0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment