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

Commit 86cfb387 authored by Rahul Sabnis's avatar Rahul Sabnis
Browse files

Verify BluetoothDevice is not null before calling BluetoothHearingAid

System APIs

Bug: 149238489
Test: Manual
Merged-In: Ic6de2ccd81dc66ce79afcd91f18e92e959c8b12b
Change-Id: Ic6de2ccd81dc66ce79afcd91f18e92e959c8b12b
parent c305df94
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -171,7 +171,8 @@ public class HandsFreeProfileOutputPreferenceController extends AudioSwitchPrefe
        if (hapProfile != null && hfpProfile != null && device == null) {
            hfpProfile.setActiveDevice(null);
            hapProfile.setActiveDevice(null);
        } else if (hapProfile != null && hapProfile.getHiSyncId(device) != HI_SYNC_ID_INVALID) {
        } else if (hapProfile != null && device != null
                && hapProfile.getHiSyncId(device) != HI_SYNC_ID_INVALID) {
            hapProfile.setActiveDevice(device);
        } else if (hfpProfile != null) {
            hfpProfile.setActiveDevice(device);