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

Commit a09b1995 authored by hieudz's avatar hieudz Committed by Hieu Dang
Browse files

Fix NullPointerException in BluetoothOppPereference

Bug: 255682982
Bug: 255694106
Tag: #refactor
Test: atest BluetoothOppUtilityTest
Change-Id: Ibdfbde86f6b58b5ba3cc2981b7c07735a99e1d24
parent 9e292d6d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -102,7 +102,8 @@ public class BluetoothOppPreference {
    }

    public String getName(BluetoothDevice remoteDevice) {
        if (remoteDevice.getIdentityAddress().equals("FF:FF:FF:00:00:00")) {
        String identityAddress = remoteDevice.getIdentityAddress();
        if (identityAddress != null && identityAddress.equals("FF:FF:FF:00:00:00")) {
            return "localhost";
        }
        if (!mNames.isEmpty()) {