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

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

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

parent 14d40f94
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();
        }
    }