Add another space to the playlist duration. Clean up the code.
This commit is contained in:
parent
e553a64c80
commit
d3c3fe8f08
4 changed files with 10 additions and 10 deletions
|
|
@ -239,7 +239,7 @@ public class MusicPlayerRemote {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getQueueDurationMillis(int position) {
|
public static long getQueueDurationMillis(int position) {
|
||||||
if (musicService != null) {
|
if (musicService != null) {
|
||||||
return musicService.getQueueDurationMillis(position);
|
return musicService.getQueueDurationMillis(position);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -946,11 +946,11 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
|
||||||
return playback.duration();
|
return playback.duration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getQueueDurationMillis(int position) {
|
public long getQueueDurationMillis(int position) {
|
||||||
int ret=0;
|
long duration = 0;
|
||||||
for (int i = position + 1; i < playingQueue.size(); i++)
|
for (int i = position + 1; i < playingQueue.size(); i++)
|
||||||
ret+=playingQueue.get(i).duration;
|
duration += playingQueue.get(i).duration;
|
||||||
return ret;
|
return duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int seek(int millis) {
|
public int seek(int millis) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue