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

Commit 90e8bed7 authored by Ajay Panicker's avatar Ajay Panicker Committed by Andre Eisenbach
Browse files

Properly label app as unregistered and add NPE protection

Bug: 28252914
Change-Id: I1e28a9af96bcf0d56914fcc676a8ff85400bc1c4
parent 6da15439
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -214,8 +214,8 @@ import com.android.bluetooth.btservice.BluetoothProto;
            }
        }

        if (isRegistered) {
        ContextMap.App appEntry = contextMap.getByName(appName);
        if (appEntry != null && isRegistered) {
            sb.append("  Application ID                     : " +
                      appEntry.id + "\n");
            sb.append("  UUID                               : " +
+2 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ import com.android.bluetooth.btservice.BluetoothProto;
                App entry = i.next();
                if (entry.id == id) {
                    entry.unlinkToDeath();
                    mAppScanStats.get(entry.name).isRegistered = false;
                    entry.appScanStats.isRegistered = false;
                    i.remove();
                    break;
                }
@@ -359,6 +359,7 @@ import com.android.bluetooth.btservice.BluetoothProto;
            while (i.hasNext()) {
                App entry = i.next();
                entry.unlinkToDeath();
                entry.appScanStats.isRegistered = false;
                i.remove();
            }
        }