mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-31 07:31:02 +00:00
chore: clean
This commit is contained in:
@@ -6,11 +6,16 @@ import android.media.MediaPlayer
|
||||
|
||||
class AudioHelper(private val context: Context) {
|
||||
|
||||
private val audioManager: AudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
private val audioManager: AudioManager =
|
||||
context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
private var mediaPlayer: MediaPlayer? = null
|
||||
|
||||
fun routeAudioToSpeaker() {
|
||||
audioManager.requestAudioFocus(null, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN)
|
||||
audioManager.requestAudioFocus(
|
||||
null,
|
||||
AudioManager.STREAM_MUSIC,
|
||||
AudioManager.AUDIOFOCUS_GAIN
|
||||
)
|
||||
audioManager.mode = AudioManager.MODE_IN_COMMUNICATION
|
||||
audioManager.isSpeakerphoneOn = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user