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

Commit fb638d11 authored by William Escande's avatar William Escande
Browse files

CompanionManager: null check in metadata listener

Bug: 361454787
Fix: 361454787
Test: m Bluetooth
Flag: Exempt null pointer check
Change-Id: I7f6850c824c11bd743fa4fdf16800ca78f65edfd
parent 57e1f1e5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -248,6 +248,10 @@ public class CompanionManager {
            new BluetoothAdapter.OnMetadataChangedListener() {
                @Override
                public void onMetadataChanged(BluetoothDevice device, int key, byte[] value) {
                    if (value == null) {
                        Log.d(TAG, "onMetadataChanged(device, " + key + ", null)");
                        return;
                    }
                    String valueStr = new String(value);
                    Log.d(TAG, "Metadata updated in " + device + ": " + key + "=" + valueStr);
                    if (key == BluetoothDevice.METADATA_SOFTWARE_VERSION