From 9c610f7567bc713e802842bd6c541d22941d8cea Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 4 Jul 2018 16:41:14 +0100 Subject: [PATCH] Remove unusual static method call The code is using static method Calendar.getInstance() but via a subclass of Calendar. It works, and getInstance() returns a GregorianCalendar on Android, but it's odd and was probably unintended. Noticed during static analysis of SystemUI bytecode. Bug: 111055375 Test: build / boot Change-Id: I1762cbeb2cc7882868f84ec11100815671cd29ec --- packages/SystemUI/src/com/android/systemui/doze/DozeUi.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java index 851b78cfcd491..ecbcb406666d6 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java @@ -27,7 +27,6 @@ import com.android.systemui.util.AlarmTimeout; import com.android.systemui.util.wakelock.WakeLock; import java.util.Calendar; -import java.util.GregorianCalendar; /** * The policy controlling doze. @@ -139,7 +138,7 @@ public class DozeUi implements DozeMachine.Part { } private long roundToNextMinute(long timeInMillis) { - Calendar calendar = GregorianCalendar.getInstance(); + Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(timeInMillis); calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.SECOND, 0);