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

Commit d37d70bb authored by timhypeng's avatar timhypeng Committed by Raff Tsai
Browse files

New API to display cast device preference in Sound Settings

Bug: 147395289
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I20f2347654cff86ff34bad67c13d939ac8292636
parent a812e889
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -226,6 +226,22 @@ public class LocalMediaManager implements BluetoothCallback {
        return null;
    }

    /**
     * Find the MediaDevice from all media devices by id.
     *
     * @param id the unique id of MediaDevice
     * @return MediaDevice
     */
    public MediaDevice getMediaDeviceById(String id) {
        for (MediaDevice mediaDevice : mMediaDevices) {
            if (mediaDevice.getId().equals(id)) {
                return mediaDevice;
            }
        }
        Log.i(TAG, "Unable to find device " + id);
        return null;
    }

    /**
     * Find the current connected MediaDevice.
     *