Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)"
am: 7df4093371
Change-Id: Ie6a4af6f5ac48e529aaeee34d92f893e710d8278
This commit is contained in:
@@ -42,10 +42,10 @@ import android.bluetooth.le.IScannerCallback;
|
|||||||
interface IBluetoothGatt {
|
interface IBluetoothGatt {
|
||||||
List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
|
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 unregisterScanner(in int scannerId);
|
||||||
void startScan(in int scannerId, in ScanSettings settings, in List<ScanFilter> filters,
|
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 stopScan(in int scannerId);
|
||||||
void flushPendingBatchResults(in int scannerId);
|
void flushPendingBatchResults(in int scannerId);
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ public final class BluetoothLeScanner {
|
|||||||
// Scan stopped.
|
// Scan stopped.
|
||||||
if (mScannerId == -1) return;
|
if (mScannerId == -1) return;
|
||||||
try {
|
try {
|
||||||
mBluetoothGatt.registerScanner(this);
|
mBluetoothGatt.registerScanner(this, mWorkSource);
|
||||||
wait(REGISTRATION_CALLBACK_TIMEOUT_MILLIS);
|
wait(REGISTRATION_CALLBACK_TIMEOUT_MILLIS);
|
||||||
} catch (InterruptedException | RemoteException e) {
|
} catch (InterruptedException | RemoteException e) {
|
||||||
Log.e(TAG, "application registeration exception", e);
|
Log.e(TAG, "application registeration exception", e);
|
||||||
@@ -364,7 +364,7 @@ public final class BluetoothLeScanner {
|
|||||||
} else {
|
} else {
|
||||||
mScannerId = scannerId;
|
mScannerId = scannerId;
|
||||||
mBluetoothGatt.startScan(mScannerId, mSettings, mFilters,
|
mBluetoothGatt.startScan(mScannerId, mSettings, mFilters,
|
||||||
mWorkSource, mResultStorages,
|
mResultStorages,
|
||||||
ActivityThread.currentOpPackageName());
|
ActivityThread.currentOpPackageName());
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user