Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev am: 5cc7c7c1de

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13955156

Change-Id: I16b44fc5aea9bd66d28a96ec05f9d4e88d37f103
This commit is contained in:
Dmitri Plotnikov
2021-03-24 00:59:44 +00:00
committed by Automerger Merge Worker
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))