diff --git a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java index 78fcee29035b7b73cda493159121926df0698112..2f9777857e678c9e874d58605a97d216a1606a21 100644 --- a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +++ b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java @@ -1128,8 +1128,11 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu public void onSurfaceTextureUpdated(@NonNull SurfaceTexture arg0) { refreshPreviewBitmap(); + boolean previewBitmapWasEnabled = isPreviewBitmapEnabled(); if (isQRCode()) { - enablePreviewBitmap(); + 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(); } }