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

Skip to content
Commit bdda3040 authored by Shenqiu Zhang's avatar Shenqiu Zhang
Browse files

Fix the IndexOutOfBoundsException when creating output media item list

The current implementation of building the output media item list
keeps all media items in a single list. They try to mark the position
of the original divider items and insert them back to the original
position. However, the list of media devices might change due to
various reasons. So inserting the original divider items back to the
same position as the original media item list could cause the
IndexOutOfBoundsException. To fix this issue, we create three separated
media item lists to store selected media items, suggested media items,
and other speakers and displays media items correspondingly. Then we
insert the divider items when creating the output media item list.

Flag: com.android.media.flags.fix_output_media_item_list_index_out_of_bounds_exception
Bug: b/400241830
Test: manual test and presubmit
Change-Id: I05026adaaae974e8271cb6d74d026da8c3593a4f
parent 383cebaf
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