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
13186c0b15
commit
59e5018c2d
@ -87,11 +87,11 @@ public final class PlayerHelper {
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String getTimeString(final int milliSeconds) {
|
||||
final int seconds = (milliSeconds % 60000) / 1000;
|
||||
final int minutes = (milliSeconds % 3600000) / 60000;
|
||||
final int hours = (milliSeconds % 86400000) / 3600000;
|
||||
final int days = (milliSeconds % (86400000 * 7)) / 86400000;
|
||||
public static String getTimeString(final long milliSeconds) {
|
||||
final long seconds = (milliSeconds % 60000) / 1000;
|
||||
final long minutes = (milliSeconds % 3600000) / 60000;
|
||||
final long hours = (milliSeconds % 86400000) / 3600000;
|
||||
final long days = (milliSeconds % (86400000 * 7)) / 86400000;
|
||||
|
||||
final Formatters formatters = FORMATTERS_PROVIDER.formatters();
|
||||
if (days > 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user