mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
cf2387df95
commit
ef3d34c77e
@ -15,6 +15,7 @@ import android.support.v4.media.session.PlaybackStateCompat
|
|||||||
import androidx.annotation.CallSuper
|
import androidx.annotation.CallSuper
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
import androidx.media.AudioFocusRequestCompat
|
import androidx.media.AudioFocusRequestCompat
|
||||||
|
import androidx.media.AudioManagerCompat
|
||||||
import io.legado.app.R
|
import io.legado.app.R
|
||||||
import io.legado.app.base.BaseService
|
import io.legado.app.base.BaseService
|
||||||
import io.legado.app.constant.*
|
import io.legado.app.constant.*
|
||||||
@ -276,8 +277,7 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
* 放弃音频焦点
|
* 放弃音频焦点
|
||||||
*/
|
*/
|
||||||
private fun abandonFocus() {
|
private fun abandonFocus() {
|
||||||
@Suppress("DEPRECATION")
|
AudioManagerCompat.abandonAudioFocusRequest(audioManager, mFocusRequest)
|
||||||
audioManager.abandonAudioFocus(this)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user