Loading core/java/com/android/internal/os/BatteryStatsImpl.java +18 −0 Original line number Diff line number Diff line Loading @@ -12141,6 +12141,15 @@ public class BatteryStatsImpl extends BatteryStats { } } } void reset() { idleTimeMs = 0; rxTimeMs = 0; txTimeMs = 0; energy = 0; uidRxBytes.clear(); uidTxBytes.clear(); } } private final BluetoothActivityInfoCache mLastBluetoothActivityInfo Loading @@ -12167,6 +12176,15 @@ public class BatteryStatsImpl extends BatteryStats { mHasBluetoothReporting = true; if (info.getControllerRxTimeMillis() < mLastBluetoothActivityInfo.rxTimeMs || info.getControllerTxTimeMillis() < mLastBluetoothActivityInfo.txTimeMs || info.getControllerIdleTimeMillis() < mLastBluetoothActivityInfo.idleTimeMs || info.getControllerEnergyUsed() < mLastBluetoothActivityInfo.energy) { // A drop in accumulated Bluetooth stats is a sign of a Bluetooth crash. // Reset the preserved previous snapshot in order to restart accumulating deltas. mLastBluetoothActivityInfo.reset(); } final long rxTimeMs = info.getControllerRxTimeMillis() - mLastBluetoothActivityInfo.rxTimeMs; final long txTimeMs = Loading Loading
core/java/com/android/internal/os/BatteryStatsImpl.java +18 −0 Original line number Diff line number Diff line Loading @@ -12141,6 +12141,15 @@ public class BatteryStatsImpl extends BatteryStats { } } } void reset() { idleTimeMs = 0; rxTimeMs = 0; txTimeMs = 0; energy = 0; uidRxBytes.clear(); uidTxBytes.clear(); } } private final BluetoothActivityInfoCache mLastBluetoothActivityInfo Loading @@ -12167,6 +12176,15 @@ public class BatteryStatsImpl extends BatteryStats { mHasBluetoothReporting = true; if (info.getControllerRxTimeMillis() < mLastBluetoothActivityInfo.rxTimeMs || info.getControllerTxTimeMillis() < mLastBluetoothActivityInfo.txTimeMs || info.getControllerIdleTimeMillis() < mLastBluetoothActivityInfo.idleTimeMs || info.getControllerEnergyUsed() < mLastBluetoothActivityInfo.energy) { // A drop in accumulated Bluetooth stats is a sign of a Bluetooth crash. // Reset the preserved previous snapshot in order to restart accumulating deltas. mLastBluetoothActivityInfo.reset(); } final long rxTimeMs = info.getControllerRxTimeMillis() - mLastBluetoothActivityInfo.rxTimeMs; final long txTimeMs = Loading