Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
android: unmute microphone on the ConnectionService handler
Saúl Ibarra Corretgé87821eb2c05c
diff --git a/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioDeviceHandlerConnectionService.java b/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioDeviceHandlerConnectionService.javaindex f1302d3cbc..5cb4a29441 100644--- a/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioDeviceHandlerConnectionService.java+++ b/android/sdk/src/main/java/org/jitsi/meet/sdk/AudioDeviceHandlerConnectionService.java@@ -17,6 +17,7 @@package org.jitsi.meet.sdk;import android.content.Context;+import android.media.AudioManager;import android.os.Build;import android.telecom.CallAudioState;import androidx.annotation.RequiresApi;@@ -38,6 +39,11 @@ class AudioDeviceHandlerConnectionService implementsprivate final static String TAG = AudioDeviceHandlerConnectionService.class.getSimpleName();+ /**+ * {@link AudioManager} instance used to interact with the Android audio subsystem.+ */+ private AudioManager audioManager;+/*** Reference to the main {@code AudioModeModule}.*/@@ -134,6 +140,8 @@ class AudioDeviceHandlerConnectionService implementsJitsiMeetLogger.i("Using " + TAG + " as the audio device handler");module = audioModeModule;+ audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);+RNConnectionService rcs = ReactInstanceManagerHolder.getNativeModule(RNConnectionService.class);if (rcs != null) {rcs.setCallAudioStateListener(this);@@ -160,6 +168,16 @@ class AudioDeviceHandlerConnectionService implements@Overridepublic boolean setMode(int mode) {+ if (mode != AudioModeModule.DEFAULT) {+ // This shouldn't be needed when using ConnectionService, but some devices have been+ // observed not doing it.+ try {+ audioManager.setMicrophoneMute(false);+ } catch (Throwable tr) {+ JitsiMeetLogger.w(tr, TAG + " Failed to unmute the microphone");+ }+ }+return true;}}