diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/common/src/main/java/de/danoeh/antennapod/ui/common/Converter.java | 6 | ||||
-rw-r--r-- | ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/PieChartView.java | 8 |
2 files changed, 7 insertions, 7 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); diff --git a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/PieChartView.java b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/PieChartView.java index f3e6f0259..96f8577d2 100644 --- a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/PieChartView.java +++ b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/PieChartView.java @@ -11,23 +11,23 @@ import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.appcompat.widget.AppCompatImageView; -import io.reactivex.annotations.Nullable; public class PieChartView extends AppCompatImageView { private PieChartDrawable drawable; - public PieChartView(Context context) { + public PieChartView(@NonNull Context context) { super(context); setup(); } - public PieChartView(Context context, @Nullable AttributeSet attrs) { + public PieChartView(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); setup(); } - public PieChartView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + public PieChartView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); setup(); } |