Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fcde1a8 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Revert behavior of DateUtils.formatElapsedTime

Change Ib3c1e1aad05827df646aa18645cce19dffb7551f fixes the inability
to display more that 2-digit hour values, but also changes the behavior
of <10 minutes display by zero-padding the minutes. This makes
the Chronometer widget look different, and breaks Holo CTS.

Fix it so that for values under 600 seconds, the minutes don't
get padded

Change-Id: I34eb7f22e728c55bf3313ed1987ac32969cd5ed0
parent 79ee0854
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -672,6 +672,10 @@ public class DateUtils
        initFormatStrings();
        if (hours > 0) {
            return f.format(sElapsedFormatHMMSS, hours, minutes, seconds).toString();
        } else if (minutes < 10) {
            /* For MR1 Holo CTS, the minutes can't be zero-padded */
            String FAST_FORMAT_MMSS = "%1$d:%2$02d";
            return f.format(FAST_FORMAT_MMSS, hours, minutes, seconds).toString();
        } else {
            return f.format(sElapsedFormatMMSS, minutes, seconds).toString();
        }