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

Commit 9bcda48f authored by dongguanjun1's avatar dongguanjun1 Committed by 董冠军
Browse files

Bluetooth: fix NullPointerException during bluetooth turning off



Tag: #bugfix
Bug: 295761095
Test: manual

Change-Id: I5ca0d42ccdf2e9fe5798c3aaa925f6151bbdba61
Signed-off-by: default avatardongguanjun1 <dongguanjun1@xiaomi.com>
parent a6fac5d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -294,8 +294,8 @@ public class BluetoothUtils {
     */
    public static boolean isDeviceClassMatched(@NonNull BluetoothDevice bluetoothDevice,
            int device) {
        return bluetoothDevice.getBluetoothClass() != null
                && bluetoothDevice.getBluetoothClass().getDeviceClass() == device;
        final BluetoothClass bluetoothClass = bluetoothDevice.getBluetoothClass();
        return bluetoothClass != null && bluetoothClass.getDeviceClass() == device;
    }

    private static boolean isAdvancedHeaderEnabled() {