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

Commit 85bd3be9 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Resolve NPE with AudioManager#getCommunicationDevice

AudioManager#getCommunicationDevice was returning null which was causing
Telecom to crash. Resolve the NPE on the reference.

Bug: 371895991
Flag: EXEMPT NPE fix
Test: Manual
Change-Id: I15cfa547f30e0657ee7234afd0241f1a25698072
parent d17d306c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -759,7 +759,7 @@ public class BluetoothDeviceManager {
            Log.w(this, "setCommunicationDeviceForAddress: Device %s not found.", address);
            return false;
        }
        if (mAudioManager.getCommunicationDevice().equals(deviceInfo)) {
        if (deviceInfo.equals(mAudioManager.getCommunicationDevice())) {
            Log.i(this, "setCommunicationDeviceForAddress: Device %s already active.", address);
            return true;
        }