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

Commit 5bb867d9 authored by shaoweishen's avatar shaoweishen Committed by Shaowei Shen
Browse files

[Output Switcher] Bring back "Pair new device" item

revert miss-delete section for adding "Pair new device" item

Test: verified on device
Bug: 213251197
Change-Id: I392bc32d0574f7a4fa94b3e52204414f7d02fed8
parent 7ade3e1c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -77,6 +77,10 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {

    @Override
    public int getItemCount() {
        if (mController.isZeroMode()) {
            // Add extra one for "pair new" or dynamic group
            return mController.getMediaDevices().size() + 1;
        }
        return mController.getMediaDevices().size();
    }

+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ public class MediaOutputAdapterTest extends SysuiTestCase {
    public void getItemCount_zeroMode_containExtraOneForPairNew() {
        when(mMediaOutputController.isZeroMode()).thenReturn(true);

        assertThat(mMediaOutputAdapter.getItemCount()).isEqualTo(mMediaDevices.size());
        assertThat(mMediaOutputAdapter.getItemCount()).isEqualTo(mMediaDevices.size() + 1);
    }

    @Test