Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev

This commit is contained in:
Dmitri Plotnikov
2021-03-23 17:29:35 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -298,7 +298,7 @@ public class BatteryUtils {
*/
public long calculateLastFullChargeTime(BatteryUsageStats batteryUsageStats,
long currentTimeMs) {
return currentTimeMs - batteryUsageStats.getStatsStartRealtime();
return currentTimeMs - batteryUsageStats.getStatsStartTimestamp();
}
public static void logRuntime(String tag, String message, long startTime) {

View File

@@ -277,7 +277,7 @@ public class BatteryUtilsTest {
@Test
public void testCalculateLastFullChargeTime() {
final long currentTimeMs = System.currentTimeMillis();
when(mBatteryUsageStats.getStatsStartRealtime()).thenReturn(
when(mBatteryUsageStats.getStatsStartTimestamp()).thenReturn(
currentTimeMs - TIME_SINCE_LAST_FULL_CHARGE_MS);
assertThat(mBatteryUtils.calculateLastFullChargeTime(mBatteryUsageStats, currentTimeMs))