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

Commit a20677f1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "New API to display cast device preference in Sound Settings"

parents 7bb20554 d37d70bb
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.
     *