mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Add seek support to modern playback notification.
This commit is contained in:
parent
ca8e935724
commit
5e576d5860
@ -564,6 +564,10 @@ class SystemService : Service() {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onSeekTo(pos: Long) {
|
||||
playback?.seekTo(pos.toDouble() / 1000.0)
|
||||
}
|
||||
|
||||
override fun onPlay() {
|
||||
playback?.let {
|
||||
when (it.queueCount == 0) {
|
||||
@ -711,7 +715,8 @@ class SystemService : Service() {
|
||||
PlaybackStateCompat.ACTION_PLAY_PAUSE or
|
||||
PlaybackStateCompat.ACTION_SKIP_TO_NEXT or
|
||||
PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS or
|
||||
PlaybackStateCompat.ACTION_STOP
|
||||
PlaybackStateCompat.ACTION_STOP or
|
||||
PlaybackStateCompat.ACTION_SEEK_TO
|
||||
|
||||
private var wakeLockAcquireTime = -1L
|
||||
private var totalWakeLockTime = 0L
|
||||
|
@ -97,7 +97,6 @@ abstract class BaseActivity : AppCompatActivity(), ViewModel.Provider, Runner.Ta
|
||||
mixins.onDestroy()
|
||||
}
|
||||
|
||||
|
||||
override fun onBackPressed() {
|
||||
(top as? IBackHandler)?.let {
|
||||
if (it.onBackPressed()) {
|
||||
|
Loading…
Reference in New Issue
Block a user