Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a64c9590 authored by Mark Harman's avatar Mark Harman
Browse files

Fix crash on OPPO devices due to setting face detection listener to null.

parent 6c0ba5d6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -47,6 +47,10 @@
<p>&lt; <small><a href="index.html">Main Page.</a></small></p>

<pre>
Version 1.50.1 (2022/06/08)

FIXED   Crash on OPPO devices for old camera API introduced in 1.50.

Version 1.50 (2022/06/04)

FIXED   HDR photos came out black on some Samsung Galaxy devices with Android 12.
+13 −8
Original line number Diff line number Diff line
@@ -1611,6 +1611,7 @@ public class CameraController1 extends CameraController {
    }

    public void setFaceDetectionListener(final CameraController.FaceDetectionListener listener) {
        if( listener != null ) {
            class CameraFaceDetectionListener implements Camera.FaceDetectionListener {
                @Override
                public void onFaceDetection(Camera.Face[] camera_faces, Camera camera) {
@@ -1623,6 +1624,10 @@ public class CameraController1 extends CameraController {
            }
            camera.setFaceDetectionListener(new CameraFaceDetectionListener());
        }
        else {
            camera.setFaceDetectionListener(null);
        }
    }

    @Override
    public void autoFocus(final CameraController.AutoFocusCallback cb, boolean capture_follows_autofocus_hint) {