|
|
@ -11,16 +11,27 @@ import androidx.annotation.RequiresApi |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
|
|
|
|
|
|
|
|
object MediaHelp { |
|
|
|
object MediaHelp { |
|
|
|
const val MEDIA_SESSION_ACTIONS = (PlaybackStateCompat.ACTION_PLAY |
|
|
|
const val MEDIA_SESSION_ACTIONS = (PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
|
|
|
or PlaybackStateCompat.ACTION_PAUSE |
|
|
|
or PlaybackStateCompat.ACTION_REWIND |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_PLAY |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_PAUSE |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_PAUSE |
|
|
|
or PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
|
|
|
or PlaybackStateCompat.ACTION_PAUSE |
|
|
|
or PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_STOP |
|
|
|
or PlaybackStateCompat.ACTION_STOP |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_FAST_FORWARD |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
|
|
|
or PlaybackStateCompat.ACTION_SEEK_TO |
|
|
|
or PlaybackStateCompat.ACTION_SEEK_TO |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_SET_RATING |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH |
|
|
|
or PlaybackStateCompat.ACTION_PLAY_FROM_URI) |
|
|
|
or PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_PLAY_FROM_URI |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_PREPARE |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_PREPARE_FROM_MEDIA_ID |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_PREPARE_FROM_URI |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_SET_REPEAT_MODE |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE |
|
|
|
|
|
|
|
or PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED) |
|
|
|
|
|
|
|
|
|
|
|
@RequiresApi(Build.VERSION_CODES.O) |
|
|
|
@RequiresApi(Build.VERSION_CODES.O) |
|
|
|
fun getFocusRequest(audioFocusChangeListener: AudioManager.OnAudioFocusChangeListener): AudioFocusRequest { |
|
|
|
fun getFocusRequest(audioFocusChangeListener: AudioManager.OnAudioFocusChangeListener): AudioFocusRequest { |
|
|
|