interface IBluetoothGatt {
List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
- void registerScanner(in IScannerCallback callback);
+ void registerScanner(in IScannerCallback callback, in WorkSource workSource);
void unregisterScanner(in int scannerId);
void startScan(in int scannerId, in ScanSettings settings, in List<ScanFilter> filters,
- in WorkSource workSource, in List scanStorages, in String callingPackage);
+ in List scanStorages, in String callingPackage);
void stopScan(in int scannerId);
void flushPendingBatchResults(in int scannerId);
// Scan stopped.
if (mScannerId == -1) return;
try {
- mBluetoothGatt.registerScanner(this);
+ mBluetoothGatt.registerScanner(this, mWorkSource);
wait(REGISTRATION_CALLBACK_TIMEOUT_MILLIS);
} catch (InterruptedException | RemoteException e) {
Log.e(TAG, "application registeration exception", e);
} else {
mScannerId = scannerId;
mBluetoothGatt.startScan(mScannerId, mSettings, mFilters,
- mWorkSource, mResultStorages,
+ mResultStorages,
ActivityThread.currentOpPackageName());
}
} catch (RemoteException e) {