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

Commit 7e9ac0d8 authored by Alex Shabalin's avatar Alex Shabalin
Browse files

Remove unused method MediaSwitchingController#isActiveItem.

The usage was removed in ag/31157085

Bug: 387570618
Flag: EXEMPT removing dead code
Test: atest MediaSwitchingControllerTest
Change-Id: I4aee8f053296c0ef492261626cf2a631fcb3e981
parent cdd7c766
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -525,15 +525,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 =