On skip, don't start playing when paused
This commit is contained in:
parent
a3fcd5efe1
commit
b41aaff2dd
|
@ -24,7 +24,6 @@ import android.view.SurfaceHolder;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.request.target.Target;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
@ -982,6 +981,8 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre
|
||||||
playerLock.lock();
|
playerLock.lock();
|
||||||
releaseWifiLockIfNecessary();
|
releaseWifiLockIfNecessary();
|
||||||
|
|
||||||
|
boolean isPlaying = playerStatus == PlayerStatus.PLAYING;
|
||||||
|
|
||||||
if (playerStatus != PlayerStatus.INDETERMINATE) {
|
if (playerStatus != PlayerStatus.INDETERMINATE) {
|
||||||
setPlayerStatus(PlayerStatus.INDETERMINATE, media);
|
setPlayerStatus(PlayerStatus.INDETERMINATE, media);
|
||||||
}
|
}
|
||||||
|
@ -990,7 +991,7 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre
|
||||||
|
|
||||||
}
|
}
|
||||||
audioManager.abandonAudioFocus(audioFocusChangeListener);
|
audioManager.abandonAudioFocus(audioFocusChangeListener);
|
||||||
callback.endPlayback(true, wasSkipped);
|
callback.endPlayback(isPlaying, wasSkipped);
|
||||||
|
|
||||||
playerLock.unlock();
|
playerLock.unlock();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue