BatteryStats: Add ble scans to checkin data and start global ble scan timer
Bug:27930206
Change-Id: Ieb81eddeb0ac54ad93615f3abdc18cbcab19a729
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index b0ef012..bbefcb5 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -4012,6 +4012,7 @@
if (DEBUG_HISTORY) Slog.v(TAG, "BLE scan started for: "
+ Integer.toHexString(mHistoryCur.states2));
addHistoryRecordLocked(elapsedRealtime, uptime);
+ mBluetoothScanTimer.startRunningLocked(elapsedRealtime);
}
mBluetoothScanNesting++;
getUidStatsLocked(uid).noteBluetoothScanStartedLocked(elapsedRealtime);
@@ -4034,6 +4035,7 @@
if (DEBUG_HISTORY) Slog.v(TAG, "BLE scan stopped for: "
+ Integer.toHexString(mHistoryCur.states2));
addHistoryRecordLocked(elapsedRealtime, uptime);
+ mBluetoothScanTimer.stopRunningLocked(elapsedRealtime);
}
getUidStatsLocked(uid).noteBluetoothScanStoppedLocked(elapsedRealtime);
}