From f6f8cca782a291339f1e6277fe80cdb40936f0ac Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 2 Dec 2014 10:55:09 -0800 Subject: [PATCH] Midnight should mean midnight ...not noon-or-midnight. Fix the initial fstrim delay to properly refer to midnight rather than ambiguous 12-hour "zero" so that fstrim job consideration always starts overnight rather than possibly at the following day's noon, depending on when the device was booted. Bug 18076397 Change-Id: Ife3cd5bdeb14c7832b6e2a2de88dcfd1ba731b67 --- services/core/java/com/android/server/MountServiceIdler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/MountServiceIdler.java b/services/core/java/com/android/server/MountServiceIdler.java index 215d92d8a49b8..bc851a3f0ce0c 100644 --- a/services/core/java/com/android/server/MountServiceIdler.java +++ b/services/core/java/com/android/server/MountServiceIdler.java @@ -98,7 +98,7 @@ public class MountServiceIdler extends JobService { private static Calendar tomorrowMidnight() { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); - calendar.set(Calendar.HOUR, 0); + calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0);