Browse Source

Production Code of UsbPlayer.prev() implemented

feature-pr-USB-PrevTest
sahar 3 years ago
parent
commit
ebd9395495
  1. 7
      src/main/java/device/usbPlayer/UsbPlayer.java

7
src/main/java/device/usbPlayer/UsbPlayer.java

@ -118,7 +118,12 @@ public class UsbPlayer implements Device {
@Override
public void prev() {
int currentIdex = Playlist.indexOf(playTrack);
int nextIndex = Playlist.size() - 1;
if (currentIdex != 0) {
nextIndex = (currentIdex - 1);
}
playTrack = Playlist.get(nextIndex);
}
@Override

Loading…
Cancel
Save