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

Commit c129e33d authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "AudioManager: relax exceptions for setCommunicationDevice" into...

Merge "AudioManager: relax exceptions for setCommunicationDevice" into tm-qpr-dev am: 04e08686 am: f95482ef

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21096324



Change-Id: I0db4d8e11f3d8236d64f64d531f32871dee4718e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 806ee500 f95482ef
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8329,7 +8329,8 @@ public class AudioManager {
        Objects.requireNonNull(device);
        try {
            if (device.getId() == 0) {
                throw new IllegalArgumentException("In valid device: " + device);
                Log.w(TAG, "setCommunicationDevice: device not found: " + device);
                return false;
            }
            return getService().setCommunicationDevice(mICallBack, device.getId());
        } catch (RemoteException e) {
+2 −1
Original line number Diff line number Diff line
@@ -6118,7 +6118,8 @@ public class AudioService extends IAudioService.Stub
        if (portId != 0) {
            device = AudioManager.getDeviceForPortId(portId, AudioManager.GET_DEVICES_OUTPUTS);
            if (device == null) {
                throw new IllegalArgumentException("invalid portID " + portId);
                Log.w(TAG, "setCommunicationDevice: invalid portID " + portId);
                return false;
            }
            if (!isValidCommunicationDevice(device)) {
                if (!device.isSink()) {