Merge "Fix the bug using wrong TimeUnit" into pi-dev am: 10280a53b0

am: a4ef6f51be

Change-Id: I6585d866d4a8e2c54783a874d09821dc727e4941
This commit is contained in:
Lei Yu
2018-04-23 10:12:29 -07:00
committed by android-build-merger
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 */);
});