Change getStatsStartRealtime to getStatsStartTimestamp

Bug: 183434301
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: Ic86a04a91d910c863706a0f799c757dcd7c5262d
This commit is contained in:
Dmitri Plotnikov
2021-03-22 15:51:21 -07:00
parent 1908c5357c
commit 3b5c5f0d7c
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))