diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java b/cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java index 39582b37..cb41d077 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java @@ -1189,10 +1189,8 @@ public class CameraView extends FrameLayout implements LifecycleObserver { * * @param cameraListener a listener for events. */ - public void addCameraListener(@Nullable CameraListener cameraListener) { - if (cameraListener != null) { - mListeners.add(cameraListener); - } + public void addCameraListener(@NonNull CameraListener cameraListener) { + mListeners.add(cameraListener); } @@ -1201,10 +1199,8 @@ public class CameraView extends FrameLayout implements LifecycleObserver { * * @param cameraListener a listener for events. */ - public void removeCameraListener(@Nullable CameraListener cameraListener) { - if (cameraListener != null) { - mListeners.remove(cameraListener); - } + public void removeCameraListener(@NonNull CameraListener cameraListener) { + mListeners.remove(cameraListener); } diff --git a/docs/_posts/2018-12-20-preview-size.md b/docs/_posts/2018-12-20-preview-size.md index a81fdce9..4573f591 100644 --- a/docs/_posts/2018-12-20-preview-size.md +++ b/docs/_posts/2018-12-20-preview-size.md @@ -86,3 +86,4 @@ After the preview size is determined, if it has changed since list time, the `Ca another call to `onMeasure` so the `WRAP_CONTENT` magic can take place. To understand how SizeSelectors work and the available utilities, please read the [Capture Size](capture-size.html) document. +