mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
@@ -1,6 +1,5 @@
|
||||
package org.thoughtcrime.securesms.ringrtc;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.hardware.camera2.CameraAccessException;
|
||||
import android.hardware.camera2.CameraCharacteristics;
|
||||
@@ -318,6 +317,7 @@ public class Camera implements CameraControl, CameraVideoCapturer.CameraSwitchHa
|
||||
@Override
|
||||
public void onCapturerStopped() {
|
||||
observer.onCapturerStopped();
|
||||
cameraEventListener.onCameraStopped();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,13 @@ package org.thoughtcrime.securesms.ringrtc;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* Event listener that are (indirectly) bound to WebRTC events.
|
||||
* onFullyInitialized and onCameraStopped are hardware lifecycle methods triggered by our implementation of {@link org.webrtc.CapturerObserver}
|
||||
* onCameraSwitchCompleted is triggered by {@link org.webrtc.CameraVideoCapturer.CameraSwitchHandler}
|
||||
*/
|
||||
public interface CameraEventListener {
|
||||
void onFullyInitialized();
|
||||
void onCameraSwitchCompleted(@NonNull CameraState newCameraState);
|
||||
void onCameraStopped();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user