show a preview of captured image only if set so

This commit is contained in:
tibbi 2016-11-24 20:49:56 +01:00
parent dd650a34b5
commit f48334ea2d
1 changed files with 10 additions and 6 deletions

View File

@ -299,12 +299,16 @@ public class Preview extends ViewGroup
private Camera.PictureCallback takePictureCallback = new Camera.PictureCallback() { private Camera.PictureCallback takePictureCallback = new Camera.PictureCallback() {
@Override @Override
public void onPictureTaken(byte[] data, Camera cam) { public void onPictureTaken(byte[] data, Camera cam) {
new Handler().postDelayed(new Runnable() { if (mConfig.isShowPreviewEnabled()) {
@Override new Handler().postDelayed(new Runnable() {
public void run() { @Override
resumePreview(); public void run() {
} resumePreview();
}, PHOTO_PREVIEW_LENGTH); }
}, PHOTO_PREVIEW_LENGTH);
} else {
resumePreview();
}
new PhotoProcessor(mActivity, mTargetUri).execute(data); new PhotoProcessor(mActivity, mTargetUri).execute(data);
} }