Skip to content

Commit

Permalink
Method called after release()
Browse files Browse the repository at this point in the history
Applied @glomadrian solution. dlazaro66#3
  • Loading branch information
danicomas committed May 24, 2014
1 parent 62a17a1 commit 6c2b07c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.google.zxing.qrcode.QRCodeReader;

/*
* Copyright 2013 David Lzaro Esparcia.
* Copyright 2013 David Lzaro Esparcia.
*
* This program is free software: you can redistribute it and/or
modify
Expand All @@ -50,7 +50,7 @@
* QRCodeReaderView - Class which uses ZXING lib and let you easily integrate a QR decoder view.
* Take some classes and made some modifications in the original ZXING - Barcode Scanner project.
*
* @author David Lzaro
* @author David Lzaro
*/
public class QRCodeReaderView extends SurfaceView implements SurfaceHolder.Callback,Camera.PreviewCallback {

Expand Down Expand Up @@ -131,6 +131,9 @@ public void surfaceCreated(SurfaceHolder holder) {
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
Log.d(TAG, "surfaceDestroyed");
mCameraManager.getCamera().setPreviewCallback(null);
mCameraManager.getCamera().stopPreview();
mCameraManager.getCamera().release();
mCameraManager.closeDriver();
}

Expand Down

0 comments on commit 6c2b07c

Please sign in to comment.