Loading android/app/src/com/android/bluetooth/gatt/GattService.java +5 −6 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import android.bluetooth.le.IAdvertisingSetCallback; import android.bluetooth.le.IPeriodicAdvertisingCallback; import android.bluetooth.le.IScannerCallback; import android.bluetooth.le.PeriodicAdvertisingParameters; import android.bluetooth.le.ResultStorageDescriptor; import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanRecord; Loading Loading @@ -502,12 +501,12 @@ public class GattService extends ProfileService { @Override public void startScan(int scannerId, ScanSettings settings, List<ScanFilter> filters, List storages, String callingPackage, String callingFeatureId) { String callingPackage, String callingFeatureId) { GattService service = getService(); if (service == null) { return; } service.startScan(scannerId, settings, filters, storages, callingPackage, service.startScan(scannerId, settings, filters, callingPackage, callingFeatureId); } Loading Loading @@ -2136,7 +2135,7 @@ public class GattService extends ProfileService { } void startScan(int scannerId, ScanSettings settings, List<ScanFilter> filters, List<List<ResultStorageDescriptor>> storages, String callingPackage, String callingPackage, @Nullable String callingFeatureId) { if (DBG) { Log.d(TAG, "start scan with filters"); Loading @@ -2148,7 +2147,7 @@ public class GattService extends ProfileService { } settings = enforceReportDelayFloor(settings); enforcePrivilegedPermissionIfNeeded(filters); final ScanClient scanClient = new ScanClient(scannerId, settings, filters, storages); final ScanClient scanClient = new ScanClient(scannerId, settings, filters); scanClient.userHandle = Binder.getCallingUserHandle(); mAppOps.checkPackage(Binder.getCallingUid(), callingPackage); scanClient.eligibleForSanitizedExposureNotification = Loading Loading @@ -2246,7 +2245,7 @@ public class GattService extends ProfileService { void continuePiStartScan(int scannerId, ScannerMap.App app) { final PendingIntentInfo piInfo = app.info; final ScanClient scanClient = new ScanClient(scannerId, piInfo.settings, piInfo.filters, null); new ScanClient(scannerId, piInfo.settings, piInfo.filters); scanClient.hasLocationPermission = app.hasLocationPermission; scanClient.userHandle = app.mUserHandle; scanClient.isQApp = app.mIsQApp; Loading android/app/src/com/android/bluetooth/gatt/ScanClient.java +1 −9 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.bluetooth.gatt; import android.bluetooth.le.ResultStorageDescriptor; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanSettings; import android.os.Binder; Loading @@ -36,7 +35,6 @@ import java.util.Objects; public ScanSettings passiveSettings; public int appUid; public List<ScanFilter> filters; public List<List<ResultStorageDescriptor>> storages; // App associated with the scan client died. public boolean appDied; public boolean hasLocationPermission; Loading @@ -54,20 +52,14 @@ import java.util.Objects; new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build(); ScanClient(int scannerId) { this(scannerId, DEFAULT_SCAN_SETTINGS, null, null); this(scannerId, DEFAULT_SCAN_SETTINGS, null); } ScanClient(int scannerId, ScanSettings settings, List<ScanFilter> filters) { this(scannerId, settings, filters, null); } ScanClient(int scannerId, ScanSettings settings, List<ScanFilter> filters, List<List<ResultStorageDescriptor>> storages) { this.scannerId = scannerId; this.settings = settings; this.passiveSettings = null; this.filters = filters; this.storages = storages; this.appUid = Binder.getCallingUid(); } Loading Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +5 −6 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import android.bluetooth.le.IAdvertisingSetCallback; import android.bluetooth.le.IPeriodicAdvertisingCallback; import android.bluetooth.le.IScannerCallback; import android.bluetooth.le.PeriodicAdvertisingParameters; import android.bluetooth.le.ResultStorageDescriptor; import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanRecord; Loading Loading @@ -502,12 +501,12 @@ public class GattService extends ProfileService { @Override public void startScan(int scannerId, ScanSettings settings, List<ScanFilter> filters, List storages, String callingPackage, String callingFeatureId) { String callingPackage, String callingFeatureId) { GattService service = getService(); if (service == null) { return; } service.startScan(scannerId, settings, filters, storages, callingPackage, service.startScan(scannerId, settings, filters, callingPackage, callingFeatureId); } Loading Loading @@ -2136,7 +2135,7 @@ public class GattService extends ProfileService { } void startScan(int scannerId, ScanSettings settings, List<ScanFilter> filters, List<List<ResultStorageDescriptor>> storages, String callingPackage, String callingPackage, @Nullable String callingFeatureId) { if (DBG) { Log.d(TAG, "start scan with filters"); Loading @@ -2148,7 +2147,7 @@ public class GattService extends ProfileService { } settings = enforceReportDelayFloor(settings); enforcePrivilegedPermissionIfNeeded(filters); final ScanClient scanClient = new ScanClient(scannerId, settings, filters, storages); final ScanClient scanClient = new ScanClient(scannerId, settings, filters); scanClient.userHandle = Binder.getCallingUserHandle(); mAppOps.checkPackage(Binder.getCallingUid(), callingPackage); scanClient.eligibleForSanitizedExposureNotification = Loading Loading @@ -2246,7 +2245,7 @@ public class GattService extends ProfileService { void continuePiStartScan(int scannerId, ScannerMap.App app) { final PendingIntentInfo piInfo = app.info; final ScanClient scanClient = new ScanClient(scannerId, piInfo.settings, piInfo.filters, null); new ScanClient(scannerId, piInfo.settings, piInfo.filters); scanClient.hasLocationPermission = app.hasLocationPermission; scanClient.userHandle = app.mUserHandle; scanClient.isQApp = app.mIsQApp; Loading
android/app/src/com/android/bluetooth/gatt/ScanClient.java +1 −9 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.bluetooth.gatt; import android.bluetooth.le.ResultStorageDescriptor; import android.bluetooth.le.ScanFilter; import android.bluetooth.le.ScanSettings; import android.os.Binder; Loading @@ -36,7 +35,6 @@ import java.util.Objects; public ScanSettings passiveSettings; public int appUid; public List<ScanFilter> filters; public List<List<ResultStorageDescriptor>> storages; // App associated with the scan client died. public boolean appDied; public boolean hasLocationPermission; Loading @@ -54,20 +52,14 @@ import java.util.Objects; new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build(); ScanClient(int scannerId) { this(scannerId, DEFAULT_SCAN_SETTINGS, null, null); this(scannerId, DEFAULT_SCAN_SETTINGS, null); } ScanClient(int scannerId, ScanSettings settings, List<ScanFilter> filters) { this(scannerId, settings, filters, null); } ScanClient(int scannerId, ScanSettings settings, List<ScanFilter> filters, List<List<ResultStorageDescriptor>> storages) { this.scannerId = scannerId; this.settings = settings; this.passiveSettings = null; this.filters = filters; this.storages = storages; this.appUid = Binder.getCallingUid(); } Loading