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

Commit 951d289c authored by Abhishek Aggarwal's avatar Abhishek Aggarwal
Browse files

LineageParts: BluetoothTriggerFragment: Add null checks

parent 9e86a96e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -81,7 +81,8 @@ public class BluetoothTriggerFragment extends AbstractTriggerListFragment {
            return true;
        }
        BluetoothDevice dev = mBluetoothAdapter.getRemoteDevice(info.id);
        return dev.getBluetoothClass().doesClassMatch(BluetoothClass.PROFILE_A2DP);
        return dev != null && dev.getBluetoothClass() != null
               && dev.getBluetoothClass().doesClassMatch(BluetoothClass.PROFILE_A2DP);
    }

    @Override