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

Commit 161673f8 authored by Yiyi Shen's avatar Yiyi Shen
Browse files

[OutputSwitcher] notifyDataSetChanged when onGroupActionTriggered

This will update the UI to show loading indicator when select a route

Test: atest
Bug: 385672684
Flag: com.android.media.flags.enable_output_switcher_personal_audio_sharing
Change-Id: I575c2c5185ce9f4e349abfe0a871ed40f717a9b2
parent 68da9a90
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -315,10 +315,13 @@ public abstract class MediaOutputAdapterBase extends RecyclerView.Adapter<Recycl
            disableSeekBar();
            if (isChecked && isDeviceIncluded(mController.getSelectableMediaDevice(), device)) {
                mController.addDeviceToPlayMedia(device);
            } else if (!isChecked && isDeviceIncluded(mController.getDeselectableMediaDevice(),
                    device)) {
            } else if (!isChecked
                    && isDeviceIncluded(mController.getDeselectableMediaDevice(), device)) {
                mController.removeDeviceFromPlayMedia(device);
            }
            if (Flags.enableOutputSwitcherPersonalAudioSharing()) {
                notifyDataSetChanged();
            }
        }

        private void onItemClick(View view, MediaDevice device) {