Merge "Fix the bug using wrong TimeUnit" into pi-dev

This commit is contained in:
Lei Yu
2018-04-23 16:59:47 +00:00
committed by Android (Google) Code Review
2 changed files with 54 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ public class AnomalyCleanupJobService extends JobService {
final BatteryTipPolicy policy = new BatteryTipPolicy(this);
ThreadUtils.postOnBackgroundThread(() -> {
batteryDatabaseManager.deleteAllAnomaliesBeforeTimeStamp(
System.currentTimeMillis() - TimeUnit.HOURS.toMillis(
System.currentTimeMillis() - TimeUnit.DAYS.toMillis(
policy.dataHistoryRetainDay));
jobFinished(params, false /* wantsReschedule */);
});