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

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

Allow the device list to be changed within 2 seconds after dialog opens.

Normally, the Output Switcher sets device order and categories in the
list on its first render i.e. when it's just opened. However, there are
MediaRouter callbacks that are called slightly after the data is
requested, and that results in the following behavior:
- Any new items added by these callback are added to the end of the
list.
- Any changes to the existing items that suppose to change the order
of items don't affect the order. For example, setting an "isSuggested"
attribute doesn't move the element to the top of the list and neither
creates a "Suggested" section in the list.

As a workaround, this change gives 2 seconds for the full list
rearrangement right after the dialog opens. After that period, the
device list is open only for append.

Fix: 425986844
Flag:
com.android.media.flags.allow_output_switcher_list_rearrangement_within_timeout
Test: atest MediaSwitchingControllerTest, on a device.

Change-Id: I9257bcaa11006e4893c3eb5125e4ed3c5ce31ffb
parent 2ce08837
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