diff options
Diffstat (limited to 'ui/common/src')
-rw-r--r-- | ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java index 05fb2dcbc..dfd167710 100644 --- a/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java +++ b/ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java @@ -29,9 +29,9 @@ public final class Converter { private static int[] millisecondsToHms(long duration) { int h = (int) (duration / HOURS_MIL); - long rest = duration - h * HOURS_MIL; + long rest = duration - (long) h * HOURS_MIL; int m = (int) (rest / MINUTES_MIL); - rest -= m * MINUTES_MIL; + rest -= (long) m * MINUTES_MIL; int s = (int) (rest / SECONDS_MIL); return new int[] {h, m, s}; } @@ -95,7 +95,7 @@ public final class Converter { result += days.replace(" ", "\u00A0") + " "; h -= d * 24; } - int rest = (int) (duration - (d * 24 + h) * HOURS_MIL); + int rest = (int) (duration - ((long) d * 24 + h) * HOURS_MIL); int m = rest / MINUTES_MIL; if (h > 0) { String hours = resources.getQuantityString(R.plurals.time_hours_quantified, h, h); |