Merge remote-tracking branch 'origin/master'

pull/2319/head
kunfei 2 years ago
commit a1cd2d897a
  1. 2
      app/src/main/assets/web/source/css/app.83214410.css
  2. 2
      app/src/main/assets/web/source/index.html
  3. 1
      app/src/main/assets/web/source/js/app.48715b66.js
  4. 1
      app/src/main/assets/web/source/js/app.90e7caad.js
  5. 13
      app/src/main/assets/web/source/js/chunk-vendors.973d2b1d.js
  6. 13
      app/src/main/assets/web/source/js/chunk-vendors.dd84caa9.js
  7. 10
      app/src/main/java/io/legado/app/help/MediaHelp.kt
  8. 2
      app/src/main/java/io/legado/app/service/AudioPlayService.kt
  9. 2
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="./favicon.ico"><title>legado_web_source_editor</title><script defer="defer" src="./js/chunk-vendors.973d2b1d.js"></script><script defer="defer" src="./js/app.90e7caad.js"></script><link href="./css/app.177fcd98.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but legado_web_source_editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="./favicon.ico"><title>legado_web_source_editor</title><script defer="defer" src="./js/chunk-vendors.dd84caa9.js"></script><script defer="defer" src="./js/app.48715b66.js"></script><link href="./css/app.83214410.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but legado_web_source_editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -8,6 +8,7 @@ import androidx.media.AudioAttributesCompat
import androidx.media.AudioFocusRequestCompat
import androidx.media.AudioManagerCompat
import io.legado.app.R
import splitties.systemservices.audioManager
object MediaHelp {
@ -50,13 +51,8 @@ object MediaHelp {
/**
* @return 音频焦点
*/
fun requestFocus(
audioManager: AudioManager,
focusRequest: AudioFocusRequestCompat?
): Boolean {
val request = focusRequest?.let {
AudioManagerCompat.requestAudioFocus(audioManager, focusRequest)
} ?: AudioManager.AUDIOFOCUS_REQUEST_GRANTED
fun requestFocus(focusRequest: AudioFocusRequestCompat): Boolean {
val request = AudioManagerCompat.requestAudioFocus(audioManager, focusRequest)
return request == AudioManager.AUDIOFOCUS_REQUEST_GRANTED
}

@ -560,7 +560,7 @@ class AudioPlayService : BaseService(),
if (AppConfig.ignoreAudioFocus) {
return true
}
return MediaHelp.requestFocus(audioManager, mFocusRequest)
return MediaHelp.requestFocus(mFocusRequest)
}
/**

@ -239,7 +239,7 @@ abstract class BaseReadAloudService : BaseService(),
if (AppConfig.ignoreAudioFocus) {
return true
}
val requestFocus = MediaHelp.requestFocus(audioManager, mFocusRequest)
val requestFocus = MediaHelp.requestFocus(mFocusRequest)
if (!requestFocus) {
toastOnUi("未获取到音频焦点")
}

Loading…
Cancel
Save