Set focus mode properly when scanning QR codes

This simple fix contributed by @m8r-v9bo74 fixed the issue on my Xperia
Pro that could never focus on the QR code before. Focusing and scanning
still works on my other test devices.

Closes #346
This commit is contained in:
Torsten Grote
2016-07-08 13:12:32 -03:00
parent 3a3d717884
commit 193cdc42d9

View File

@@ -159,7 +159,8 @@ public class CameraView extends SurfaceView implements SurfaceHolder.Callback,
if (sceneModes.contains(SCENE_MODE_BARCODE)) {
LOG.info("Setting scene mode to barcode");
params.setSceneMode(SCENE_MODE_BARCODE);
} else if (Build.VERSION.SDK_INT >= 14 &&
}
if (Build.VERSION.SDK_INT >= 14 &&
focusModes.contains(FOCUS_MODE_CONTINUOUS_PICTURE)) {
LOG.info("Setting focus mode to continuous picture");
params.setFocusMode(FOCUS_MODE_CONTINUOUS_PICTURE);