fix:修复返回上一曲会-1异常问题
This commit is contained in:
parent
ed47603a29
commit
b04bd7ca5a
@ -363,6 +363,9 @@ public class MusicContainer {
|
|||||||
tmpList.remove(0);
|
tmpList.remove(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (playIndex < 0 || playIndex > playList.size()) {
|
||||||
|
playIndex = 0;
|
||||||
|
}
|
||||||
switch (playModel) {
|
switch (playModel) {
|
||||||
case PLAY_MODEL_ORDER:
|
case PLAY_MODEL_ORDER:
|
||||||
playOrder(false);
|
playOrder(false);
|
||||||
@ -384,6 +387,9 @@ public class MusicContainer {
|
|||||||
*/
|
*/
|
||||||
public void playPrevious() {
|
public void playPrevious() {
|
||||||
playIndex--;
|
playIndex--;
|
||||||
|
if(playIndex<0){
|
||||||
|
playIndex=0;
|
||||||
|
}
|
||||||
MusicData data = previousPlayerList.getMusicData();
|
MusicData data = previousPlayerList.getMusicData();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
play(data);
|
play(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user