Loading core/java/com/android/internal/os/BatteryStatsImpl.java +1 −4 Original line number Diff line number Diff line Loading @@ -12088,7 +12088,7 @@ public class BatteryStatsImpl extends BatteryStats { /** * Distribute Bluetooth energy info and network traffic to apps. * * @param info The energy information from the bluetooth controller. * @param info The accumulated energy information from the bluetooth controller. */ public void updateBluetoothStateLocked(@Nullable final BluetoothActivityEnergyInfo info, final long consumedChargeUC, long elapsedRealtimeMs, long uptimeMs) { Loading @@ -12100,9 +12100,6 @@ public class BatteryStatsImpl extends BatteryStats { return; } if (!mOnBatteryInternal || mIgnoreNextExternalStats) { // TODO(174818545): mLastBluetoothActivityInfo is actually extremely suspicious. // Firstly, the following line was originally missing. But even more so, BESW says that // info is a delta, not a total, so this entire algorithm requires review. mLastBluetoothActivityInfo.set(info); return; } Loading services/core/java/com/android/server/am/BatteryExternalStatsWorker.java +2 −2 Original line number Diff line number Diff line Loading @@ -137,8 +137,8 @@ class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStatsSync { @GuardedBy("mWorkerLock") private PowerStatsInternal mPowerStatsInternal = null; // WiFi keeps an accumulated total of stats, unlike Bluetooth. // Keep the last WiFi stats so we can compute a delta. // WiFi keeps an accumulated total of stats. Keep the last WiFi stats so we can compute a delta. // (This is unlike Bluetooth, where BatteryStatsImpl is left responsible for taking the delta.) @GuardedBy("mWorkerLock") private WifiActivityEnergyInfo mLastWifiInfo = new WifiActivityEnergyInfo(0, 0, 0, 0, 0, 0); Loading Loading
core/java/com/android/internal/os/BatteryStatsImpl.java +1 −4 Original line number Diff line number Diff line Loading @@ -12088,7 +12088,7 @@ public class BatteryStatsImpl extends BatteryStats { /** * Distribute Bluetooth energy info and network traffic to apps. * * @param info The energy information from the bluetooth controller. * @param info The accumulated energy information from the bluetooth controller. */ public void updateBluetoothStateLocked(@Nullable final BluetoothActivityEnergyInfo info, final long consumedChargeUC, long elapsedRealtimeMs, long uptimeMs) { Loading @@ -12100,9 +12100,6 @@ public class BatteryStatsImpl extends BatteryStats { return; } if (!mOnBatteryInternal || mIgnoreNextExternalStats) { // TODO(174818545): mLastBluetoothActivityInfo is actually extremely suspicious. // Firstly, the following line was originally missing. But even more so, BESW says that // info is a delta, not a total, so this entire algorithm requires review. mLastBluetoothActivityInfo.set(info); return; } Loading
services/core/java/com/android/server/am/BatteryExternalStatsWorker.java +2 −2 Original line number Diff line number Diff line Loading @@ -137,8 +137,8 @@ class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStatsSync { @GuardedBy("mWorkerLock") private PowerStatsInternal mPowerStatsInternal = null; // WiFi keeps an accumulated total of stats, unlike Bluetooth. // Keep the last WiFi stats so we can compute a delta. // WiFi keeps an accumulated total of stats. Keep the last WiFi stats so we can compute a delta. // (This is unlike Bluetooth, where BatteryStatsImpl is left responsible for taking the delta.) @GuardedBy("mWorkerLock") private WifiActivityEnergyInfo mLastWifiInfo = new WifiActivityEnergyInfo(0, 0, 0, 0, 0, 0); Loading