player/helper/PlayerHelper#getTimeString replace ints with longs
Duration data in the player code incosnistently typed. Half code uses ints and half uses longs. Recieve longs in this function to allow both halfs of player code just use the function without nasty long to int downcasting warnings/errors in code
This commit is contained in:
parent
cc32a9a637
commit
10d4464b99
1 changed files with 5 additions and 5 deletions
|
|
@ -87,11 +87,11 @@ public final class PlayerHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static String getTimeString(final int milliSeconds) {
|
public static String getTimeString(final long milliSeconds) {
|
||||||
final int seconds = (milliSeconds % 60000) / 1000;
|
final long seconds = (milliSeconds % 60000) / 1000;
|
||||||
final int minutes = (milliSeconds % 3600000) / 60000;
|
final long minutes = (milliSeconds % 3600000) / 60000;
|
||||||
final int hours = (milliSeconds % 86400000) / 3600000;
|
final long hours = (milliSeconds % 86400000) / 3600000;
|
||||||
final int days = (milliSeconds % (86400000 * 7)) / 86400000;
|
final long days = (milliSeconds % (86400000 * 7)) / 86400000;
|
||||||
|
|
||||||
final Formatters formatters = FORMATTERS_PROVIDER.formatters();
|
final Formatters formatters = FORMATTERS_PROVIDER.formatters();
|
||||||
if (days > 0) {
|
if (days > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue