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

Commit 2fef0134 authored by SongFerng Wang's avatar SongFerng Wang Committed by Android (Google) Code Review
Browse files

Merge "Avoid NPE since getBluetoothClass is nullable"

parents 62ed8b4d 20943eb2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -275,6 +275,10 @@ public class LeAudioProfile implements LocalBluetoothProfile {
    }

    public int getDrawableResource(BluetoothClass btClass) {
        if (btClass == null) {
            Log.e(TAG, "No btClass.");
            return R.drawable.ic_bt_le_audio_speakers;
        }
        switch (btClass.getDeviceClass()) {
            case BluetoothClass.Device.AUDIO_VIDEO_UNCATEGORIZED:
            case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET: