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

Commit 826d5034 authored by Mark Harman's avatar Mark Harman
Browse files

Avoid calling getCameraToPreviewMatrix() for getFacesDetected() if no faces are detected.

parent 53ed0a23
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8536,7 +8536,7 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
     *  is enabled). The face.temp rect will store the face rectangle in screen coordinates.
     */
    public CameraController.Face [] getFacesDetected() {
        if( faces_detected != null ) {
        if( faces_detected != null && faces_detected.length > 0 ) {
            // note, we don't store the screen coordinates, as they may become out of date in the
            // screen orientation changes (if MainActivity.lock_to_landscape==false)
            final Matrix matrix = getCameraToPreviewMatrix();