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() {
@Override
public void onPictureTaken(byte[] data, Camera cam) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
resumePreview();
}
}, PHOTO_PREVIEW_LENGTH);
if (mConfig.isShowPreviewEnabled()) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
resumePreview();
}
}, PHOTO_PREVIEW_LENGTH);
} else {
resumePreview();
}
new PhotoProcessor(mActivity, mTargetUri).execute(data);
}