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

Commit 298f3b7c authored by Wei Wang's avatar Wei Wang
Browse files

Fix crashes when calling numHwTrackFiltersAvailable.

Initialize curUsedTrackableAdvertisements in constructor. Also remove
BLUETOOTH_PRIVILEGED permission check on onFound/onLost APIs.

Bug:20643021

Change-Id: I2de6afd31d7af6cb927bc532f6cd855e1a7f46a4
parent 277ecfa9
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2082,10 +2082,6 @@ public class GattService extends ProfileService {
        if (settings == null) {
            return false;
        }
        // Hidden API for onLost/onFound
        if (settings.getCallbackType() != ScanSettings.CALLBACK_TYPE_ALL_MATCHES) {
            return true;
        }
        // Regular scan, no special permission.
        if (settings.getReportDelayMillis() == 0) {
            return false;
+1 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ public class ScanManager {
        mBatchClients = new HashSet<ScanClient>();
        mService = service;
        mScanNative = new ScanNative();
        curUsedTrackableAdvertisements = 0;
    }

    void start() {