mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 13:04:05 -08:00
OK, issue 303, work around different Behold 2 setting
git-svn-id: https://zxing.googlecode.com/svn/trunk@1318 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
8a46200c72
commit
3ab7a641cd
|
@ -21,6 +21,7 @@ import java.util.regex.Pattern;
|
|||
import android.content.Context;
|
||||
import android.graphics.Point;
|
||||
import android.hardware.Camera;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
import android.view.WindowManager;
|
||||
|
@ -179,7 +180,12 @@ final class CameraConfigurationManager {
|
|||
|
||||
private void setFlash(Camera.Parameters parameters) {
|
||||
// FIXME: This is a hack to turn the flash off on the Samsung Galaxy.
|
||||
parameters.set("flash-value", 2);
|
||||
// And this is a hack-hack to work around a different value on the Behold II
|
||||
if (Build.MODEL.contains("Behold II")) {
|
||||
parameters.set("flash-value", 1);
|
||||
} else {
|
||||
parameters.set("flash-value", 2);
|
||||
}
|
||||
// This is the standard setting to turn the flash off that all devices should honor.
|
||||
parameters.set("flash-mode", "off");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue