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

Commit 9ad4326b authored by Junho's avatar Junho
Browse files

Add null check for old active bluetooth device

Add null check to prevent exception

bug: 263348153
Test: make oriole-userdebug
Change-Id: I14ea9d9e7b8350c480fd636f811ce4d196984e9a
parent 99319b3b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -280,6 +280,12 @@ public class CallEndpointController extends CallsManagerListenerBase {
            return true;
        }
        if (newState.getRoute() == CallAudioState.ROUTE_BLUETOOTH) {
            if (oldState.getActiveBluetoothDevice() == null) {
                if (newState.getActiveBluetoothDevice() == null) {
                    return false;
                }
                return true;
            }
            return !oldState.getActiveBluetoothDevice().equals(newState.getActiveBluetoothDevice());
        }
        return false;