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

Commit cf58d6b4 authored by Alexandr Shabalin's avatar Alexandr Shabalin Committed by Android (Google) Code Review
Browse files

Merge "Remove unused method MediaSwitchingController#isActiveItem." into main

parents 4c709a6d 7e9ac0d8
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -531,15 +531,6 @@ public class MediaSwitchingController
        return mIsGroupListCollapsed;
    }

    boolean isActiveItem(MediaDevice device) {
        boolean isConnected = mLocalMediaManager.getCurrentConnectedDevice().getId().equals(
                device.getId());
        boolean isSelectedDeviceInGroup = getSelectedMediaDevice().size() > 1
                && getSelectedMediaDevice().contains(device);
        return (!hasAdjustVolumeUserRestriction() && isConnected && !isAnyDeviceTransferring())
                || isSelectedDeviceInGroup;
    }

    IconCompat getNotificationSmallIcon() {
        if (TextUtils.isEmpty(mPackageName)) {
            return null;
+0 −7
Original line number Diff line number Diff line
@@ -798,13 +798,6 @@ public class MediaSwitchingControllerTest extends SysuiTestCase {
        assertThat(testMediaSwitchingController.getAppSourceName()).isNull();
    }

    @Test
    public void isActiveItem_deviceNotConnected_returnsFalse() {
        when(mLocalMediaManager.getCurrentConnectedDevice()).thenReturn(mMediaDevice2);

        assertThat(mMediaSwitchingController.isActiveItem(mMediaDevice1)).isFalse();
    }

    @Test
    public void getNotificationSmallIcon_packageNameIsNull_returnsNull() {
        MediaSwitchingController testMediaSwitchingController =