rename getQueuePositionForSong into getQueuePositionForSongId()
This commit is contained in:
parent
117572eb7c
commit
753410bbef
@ -376,7 +376,7 @@ public class LibraryActivity
|
|||||||
// special handling if we pick one song to be played that is already in queue
|
// special handling if we pick one song to be played that is already in queue
|
||||||
boolean songPicked = (id >= 0 && type == MediaUtils.TYPE_SONG); // not invalid, not play all
|
boolean songPicked = (id >= 0 && type == MediaUtils.TYPE_SONG); // not invalid, not play all
|
||||||
if (songPicked && effectiveAction == ACTION_PLAY) {
|
if (songPicked && effectiveAction == ACTION_PLAY) {
|
||||||
int songPosInQueue = PlaybackService.get(this).getQueuePositionForSong(id);
|
int songPosInQueue = PlaybackService.get(this).getQueuePositionForSongId(id);
|
||||||
if (songPosInQueue > -1) {
|
if (songPosInQueue > -1) {
|
||||||
// we picked for play one song that is already present in the queue, just jump to it
|
// we picked for play one song that is already present in the queue, just jump to it
|
||||||
PlaybackService.get(this).jumpToQueuePosition(songPosInQueue);
|
PlaybackService.get(this).jumpToQueuePosition(songPosInQueue);
|
||||||
|
@ -2324,8 +2324,8 @@ public final class PlaybackService extends Service
|
|||||||
* @param id song id as defined in {@link Song#id}
|
* @param id song id as defined in {@link Song#id}
|
||||||
* @return absolute position in song timeline or -1 if song currently not in timeline
|
* @return absolute position in song timeline or -1 if song currently not in timeline
|
||||||
*/
|
*/
|
||||||
public int getQueuePositionForSong(long id) {
|
public int getQueuePositionForSongId(long id) {
|
||||||
return mTimeline.getQueuePositionForSong(id);
|
return mTimeline.getQueuePositionForSongId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -658,9 +658,9 @@ public final class SongTimeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns song position for given {@link Song}
|
* Returns song position for given {@link Song.id}
|
||||||
*/
|
*/
|
||||||
public int getQueuePositionForSong(long id) {
|
public int getQueuePositionForSongId(long id) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
for (int pos = 0; pos < mSongs.size(); pos++) {
|
for (int pos = 0; pos < mSongs.size(); pos++) {
|
||||||
Song current = mSongs.get(pos);
|
Song current = mSongs.get(pos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user