fix(android-sdk): Recover audio device if the OS changes it

This commit is contained in:
Jose Angel Gonzalez 2019-03-11 18:09:59 +01:00 committed by Saúl Ibarra Corretgé
parent 22277ad799
commit 039805eba3
1 changed files with 4 additions and 0 deletions

View File

@ -457,6 +457,10 @@ class AudioModeModule extends ReactContextBaseJavaModule
// Reset user selection
userSelectedDevice = null;
// If the OS changes the Audio Route or Devices we could have lost
// the selected audio device
selectedDevice = null;
if (mode != -1) {
updateAudioRoute(mode);
}