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

Commit 0ef5eb9c authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '2541-main-focus' into 'main'

camera: Don't disable preview bitmap if its enabled already

See merge request !81
parents 14d40f94 e6d4b10c
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1128,8 +1128,11 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
    public void onSurfaceTextureUpdated(@NonNull SurfaceTexture arg0) {
        refreshPreviewBitmap();

        boolean previewBitmapWasEnabled = isPreviewBitmapEnabled();
        if (isQRCode()) {
            if (!previewBitmapWasEnabled) {
                enablePreviewBitmap();
            }
            TextureView textureView = (TextureView) this.cameraSurface;
            Bitmap bitmap =  textureView.getBitmap(preview_bitmap);

@@ -1158,7 +1161,7 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu
            } else {
                // K1ZFP TODO Error 1
            }
        } else {
        } else if (!previewBitmapWasEnabled) {
            disablePreviewBitmap();
        }
    }