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

Commit 5bf39fd0 authored by Patty Huang's avatar Patty Huang
Browse files

Fix crash in BluetoothDeviceManager

Bug: 255696504
Test: BluetoothDeviceManagerTest
Change-Id: I932f328243fb4f03b004d0ba7e0e421e0ad2deae
parent 3b3d7f39
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -434,8 +434,9 @@ public class BluetoothDeviceManager {
            Log.i(this, "clearLeAudioCommunicationDevice: mAudioManager is null");
            return;
        }
        if (mAudioManager.getCommunicationDevice() != null
                && mAudioManager.getCommunicationDevice().getType()

        AudioDeviceInfo audioDeviceInfo = mAudioManager.getCommunicationDevice();
        if (audioDeviceInfo != null && audioDeviceInfo.getType()
                == AudioDeviceInfo.TYPE_BLE_HEADSET) {
            mAudioManager.clearCommunicationDevice();
        }