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

Commit dff8afc7 authored by Jacqueline Bronger's avatar Jacqueline Bronger
Browse files

Add MediaDevice getter for route type

TV needs to differentiate between outputs that are all grouped under
MediaDeviceType.TYPE_USB_C_AUDIO_DEVICE and TYPE_3POINT5_MM_AUDIO_DEVICE
to show some additional settings in the audio output switcher.

Bug: 360215561
Test: builds successfully
Flag: EXEMPT bugfix

Change-Id: I91251bbbfd069d65968b5499d87e6c9fb952f590
parent e5d7a587
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -389,6 +389,16 @@ public abstract class MediaDevice implements Comparable<MediaDevice> {
        return mType;
    }

    /**
     * Get the {@link MediaRoute2Info.Type} of the device.
     */
    public int getRouteType() {
        if (mRouteInfo == null) {
            return TYPE_UNKNOWN;
        }
        return mRouteInfo.getType();
    }

    /**
     * Checks if route's volume is fixed, if true, we should disable volume control for the device.
     *