mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 03:35:58 +00:00
Fix enabling video while ringing for an audio-only call.
* Update to RingRTC v2.20.4 Co-authored-by: Jim Gustafson <jim@signal.org>
This commit is contained in:
committed by
Greyson Parrelli
parent
ef0c6c79cb
commit
38b6362b25
@@ -39,7 +39,7 @@ import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.util.Consumer;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.window.DisplayFeature;
|
||||
import androidx.window.FoldingFeature;
|
||||
import androidx.window.WindowLayoutInfo;
|
||||
@@ -167,9 +167,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||
ephemeralStateDisposable = ApplicationDependencies.getSignalCallManager()
|
||||
.ephemeralStates()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(state -> {
|
||||
viewModel.updateFromEphemeralState(state);
|
||||
});
|
||||
.subscribe(viewModel::updateFromEphemeralState);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -306,7 +304,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
|
||||
|
||||
WebRtcCallViewModel.Factory factory = new WebRtcCallViewModel.Factory(deviceOrientationMonitor);
|
||||
|
||||
viewModel = ViewModelProviders.of(this, factory).get(WebRtcCallViewModel.class);
|
||||
viewModel = new ViewModelProvider(this, factory).get(WebRtcCallViewModel.class);
|
||||
viewModel.setIsLandscapeEnabled(isLandscapeEnabled);
|
||||
viewModel.setIsInPipMode(isInPipMode());
|
||||
viewModel.getMicrophoneEnabled().observe(this, callScreen::setMicEnabled);
|
||||
|
||||
@@ -98,6 +98,16 @@ public class CallSetupActionProcessorDelegate extends WebRtcActionProcessor {
|
||||
.cameraState(camera.getCameraState())
|
||||
.build();
|
||||
|
||||
//noinspection SimplifiableBooleanExpression
|
||||
if ((enable && camera.isInitialized()) || !enable) {
|
||||
try {
|
||||
CallManager callManager = webRtcInteractor.getCallManager();
|
||||
callManager.setVideoEnable(enable);
|
||||
} catch (CallException e) {
|
||||
Log.w(tag, "Unable change video enabled state to " + enable, e);
|
||||
}
|
||||
}
|
||||
|
||||
WebRtcUtil.enableSpeakerPhoneIfNeeded(webRtcInteractor, currentState);
|
||||
|
||||
return currentState;
|
||||
|
||||
Reference in New Issue
Block a user