enforce selecting the EC preferred device
This commit is contained in:
parent
09e57e077a
commit
58bde16b81
2 changed files with 15 additions and 17 deletions
|
|
@ -19,6 +19,7 @@ import dev.zacsweers.metro.ContributesBinding
|
|||
import io.element.android.libraries.audio.api.AudioFocus
|
||||
import io.element.android.libraries.audio.api.AudioFocusRequester
|
||||
import io.element.android.libraries.di.annotations.ApplicationContext
|
||||
import timber.log.Timber
|
||||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultAudioFocus(
|
||||
|
|
@ -38,9 +39,11 @@ class DefaultAudioFocus(
|
|||
when (it) {
|
||||
AudioManager.AUDIOFOCUS_GAIN -> {
|
||||
// Do nothing
|
||||
Timber.d("AudioFocus: AUDIOFOCUS_GAIN")
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS -> {
|
||||
// Permanent focus loss (e.g., phone call) — always stop/pause.
|
||||
Timber.d("AudioFocus: AUDIOFOCUS_LOSS")
|
||||
onFocusLost()
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue