diff options
| author | 2017-05-02 16:28:03 -0700 | |
|---|---|---|
| committer | 2017-05-09 17:52:36 +0000 | |
| commit | a43bd01bd191cbfe3d58dbd27da8ef40dc4f04e7 (patch) | |
| tree | 8b31bfcd93bf055ffe354f843d7a0f9e36cc29db | |
| parent | c3d41d50933c69faf0b00540f128b0d130b4d1e8 (diff) | |
Bluetooth: Move Bluetooth battery stats tracking (1/2)
Move Bluetooth battery stats tracking to AppScanStats for a more
unified tracking system.
Bug: 37720787
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testBleScans
Perform BLE scan and check battery stats
Change-Id: Ie6c682374e6e258c291d3a11eede649c7747ef40
| -rw-r--r-- | core/java/android/bluetooth/IBluetoothGatt.aidl | 4 | ||||
| -rw-r--r-- | core/java/android/bluetooth/le/BluetoothLeScanner.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/bluetooth/IBluetoothGatt.aidl b/core/java/android/bluetooth/IBluetoothGatt.aidl index fb6b89341db4..63bd94284645 100644 --- a/core/java/android/bluetooth/IBluetoothGatt.aidl +++ b/core/java/android/bluetooth/IBluetoothGatt.aidl @@ -42,10 +42,10 @@ import android.bluetooth.le.IScannerCallback; 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); diff --git a/core/java/android/bluetooth/le/BluetoothLeScanner.java b/core/java/android/bluetooth/le/BluetoothLeScanner.java index b63c614711ea..35c526f9ae0b 100644 --- a/core/java/android/bluetooth/le/BluetoothLeScanner.java +++ b/core/java/android/bluetooth/le/BluetoothLeScanner.java @@ -300,7 +300,7 @@ public final class BluetoothLeScanner { // 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); @@ -364,7 +364,7 @@ public final class BluetoothLeScanner { } else { mScannerId = scannerId; mBluetoothGatt.startScan(mScannerId, mSettings, mFilters, - mWorkSource, mResultStorages, + mResultStorages, ActivityThread.currentOpPackageName()); } } catch (RemoteException e) { |