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

Commit e5e42892 authored by Guojing Yuan's avatar Guojing Yuan Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE during restartBleScan() when scanner is null" into sc-v2-dev

parents fdf6eedb 6e7bf257
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1451,8 +1451,12 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
    }

    void restartBleScan() {
        if (mBluetoothAdapter.getBluetoothLeScanner() != null) {
            mBluetoothAdapter.getBluetoothLeScanner().stopScan(mBleScanCallback);
            startBleScan();
        } else {
            Slog.w(LOG_TAG, "BluetoothLeScanner is null (likely BLE isn't ON yet).");
        }
    }

    private List<ScanFilter> getBleScanFilters() {