+2
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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