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

Commit 2d0b926c authored by shaoweishen's avatar shaoweishen
Browse files

[Output switcher] Check current device

Bug: 222020988
Test: N/A
Change-Id: Idc1677e6c25ac596edd880e15f70f4cdca9df241
parent dd14aed4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -88,8 +88,11 @@ public class MediaOutputDialog extends MediaOutputBaseDialog {

    @Override
    int getStopButtonVisibility() {
        boolean isActiveRemoteDevice = mMediaOutputController.isActiveRemoteDevice(
        boolean isActiveRemoteDevice = false;
        if (mMediaOutputController.getCurrentConnectedMediaDevice() != null) {
            isActiveRemoteDevice = mMediaOutputController.isActiveRemoteDevice(
                    mMediaOutputController.getCurrentConnectedMediaDevice());
        }
        boolean isBroadCastSupported = isBroadcastSupported();

        return (isActiveRemoteDevice || isBroadCastSupported) ? View.VISIBLE : View.GONE;