mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Revert attempts to fix broken camera issue
This commit is contained in:
@@ -80,23 +80,4 @@ public abstract class DeviceAwareActionProcessor extends WebRtcActionProcessor {
|
||||
.cameraState(newCameraState)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull WebRtcServiceState handleCameraSwitchFailure(@NonNull WebRtcServiceState currentState, @NonNull CameraState newCameraState) {
|
||||
Log.i(tag, "handleCameraSwitchFailure():");
|
||||
|
||||
BroadcastVideoSink localSink = currentState.getVideoState().getLocalSink();
|
||||
if (localSink != null) {
|
||||
localSink.setRotateToRightSide(false);
|
||||
}
|
||||
if (currentState.getVideoState().getCamera() != null) {
|
||||
// Retry by recreating with the opposite preferred camera
|
||||
currentState.getVideoState().getCamera().disposeAndFlipCamera();
|
||||
}
|
||||
|
||||
return currentState.builder()
|
||||
.changeLocalDeviceState()
|
||||
.cameraState(newCameraState)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ import org.thoughtcrime.securesms.service.webrtc.state.WebRtcEphemeralState;
|
||||
import org.thoughtcrime.securesms.service.webrtc.state.WebRtcServiceState;
|
||||
import org.thoughtcrime.securesms.util.AppForegroundObserver;
|
||||
import org.thoughtcrime.securesms.util.RecipientAccessList;
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.rx.RxStore;
|
||||
@@ -989,11 +990,8 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFullyInitialized(@NonNull final CameraState newCameraState) {
|
||||
process((s, p) -> {
|
||||
WebRtcServiceState s1 = p.handleSetCameraDirection(s, newCameraState);
|
||||
return p.handleOrientationChanged(s1, s.getLocalDeviceState().isLandscapeEnabled(), s.getLocalDeviceState().getDeviceOrientation().getDegrees());
|
||||
});
|
||||
public void onFullyInitialized() {
|
||||
process((s, p) -> p.handleOrientationChanged(s, s.getLocalDeviceState().isLandscapeEnabled(), s.getLocalDeviceState().getDeviceOrientation().getDegrees()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1001,11 +999,6 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
process((s, p) -> p.handleCameraSwitchCompleted(s, newCameraState));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCameraSwitchFailure(@NonNull final CameraState newCameraState) {
|
||||
process((s, p) -> p.handleCameraSwitchFailure(s, newCameraState));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCameraStopped() {
|
||||
Log.i(TAG, "Camera error. Muting video.");
|
||||
|
||||
@@ -569,11 +569,6 @@ public abstract class WebRtcActionProcessor {
|
||||
return currentState;
|
||||
}
|
||||
|
||||
public @NonNull WebRtcServiceState handleCameraSwitchFailure(@NonNull WebRtcServiceState currentState, @NonNull CameraState newCameraState) {
|
||||
Log.i(tag, "handleCameraSwitchFailure not processed");
|
||||
return currentState;
|
||||
}
|
||||
|
||||
public @NonNull WebRtcServiceState handleNetworkChanged(@NonNull WebRtcServiceState currentState, boolean available) {
|
||||
Log.i(tag, "handleNetworkChanged not processed");
|
||||
return currentState;
|
||||
@@ -635,18 +630,6 @@ public abstract class WebRtcActionProcessor {
|
||||
.build();
|
||||
}
|
||||
|
||||
protected @NonNull WebRtcServiceState handleSetCameraDirection(@NonNull WebRtcServiceState currentState, CameraState state) {
|
||||
BroadcastVideoSink sink = currentState.getVideoState().getLocalSink();
|
||||
if (sink != null) {
|
||||
sink.setRotateToRightSide(state.getActiveDirection() == CameraState.Direction.BACK);
|
||||
}
|
||||
|
||||
return currentState.builder()
|
||||
.changeLocalDeviceState()
|
||||
.cameraState(state)
|
||||
.build();
|
||||
}
|
||||
|
||||
//endregion Local device
|
||||
|
||||
//region End call
|
||||
|
||||
Reference in New Issue
Block a user