Loading services/core/java/com/android/server/am/BatteryStatsService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1263,8 +1263,8 @@ public final class BatteryStatsService extends IBatteryStats.Stub Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + result); Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + result); } } // There is some accuracy error in reports so allow 30 milliseconds of error. // There is some accuracy error in reports so allow some slop in the results. final long SAMPLE_ERROR_MILLIS = 30; final long SAMPLE_ERROR_MILLIS = 750; final long totalTimeMs = result.mControllerIdleTimeMs + result.mControllerRxTimeMs + final long totalTimeMs = result.mControllerIdleTimeMs + result.mControllerRxTimeMs + result.mControllerTxTimeMs; result.mControllerTxTimeMs; if (totalTimeMs > timePeriodMs + SAMPLE_ERROR_MILLIS) { if (totalTimeMs > timePeriodMs + SAMPLE_ERROR_MILLIS) { Loading Loading
services/core/java/com/android/server/am/BatteryStatsService.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1263,8 +1263,8 @@ public final class BatteryStatsService extends IBatteryStats.Stub Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + result); Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + result); } } // There is some accuracy error in reports so allow 30 milliseconds of error. // There is some accuracy error in reports so allow some slop in the results. final long SAMPLE_ERROR_MILLIS = 30; final long SAMPLE_ERROR_MILLIS = 750; final long totalTimeMs = result.mControllerIdleTimeMs + result.mControllerRxTimeMs + final long totalTimeMs = result.mControllerIdleTimeMs + result.mControllerRxTimeMs + result.mControllerTxTimeMs; result.mControllerTxTimeMs; if (totalTimeMs > timePeriodMs + SAMPLE_ERROR_MILLIS) { if (totalTimeMs > timePeriodMs + SAMPLE_ERROR_MILLIS) { Loading