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

Commit 79ea2bf9 authored by Hsin-yu Chao's avatar Hsin-yu Chao Committed by Android (Google) Code Review
Browse files

Merge "AudioDeviceInventory: reset SCO active device upon restore failure" into main

parents 2e2df9dd ab562210
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -793,6 +793,7 @@ public class AudioDeviceInventory {
     * (see AudioService.onAudioServerDied() method)
     */
    // Always executed on AudioDeviceBroker message queue
    @GuardedBy("mDeviceBroker.mDeviceStateLock")
    /*package*/ void onRestoreDevices() {
        synchronized (mDevicesLock) {
            int res;
@@ -815,6 +816,9 @@ public class AudioDeviceInventory {
                            "Device inventory restore failed to reconnect " + di,
                            EventLogger.Event.ALOGE, TAG);
                    mConnectedDevices.remove(di.getKey(), di);
                    if (AudioSystem.isBluetoothScoDevice(di.mDeviceType)) {
                        mDeviceBroker.onSetBtScoActiveDevice(null);
                    }
                }
            }
            mAppliedStrategyRolesInt.clear();