From 72840ecbeba8d04fd6b36285d66c1c54c39d87c6 Mon Sep 17 00:00:00 2001 From: dswitkin Date: Fri, 21 Aug 2009 14:18:31 +0000 Subject: [PATCH] Made another fix for the Samsung Galaxy, and bumped the version to 2.92. git-svn-id: http://zxing.googlecode.com/svn/trunk@1036 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- android/AndroidManifest.xml | 4 ++-- android/assets/html/whatsnew.html | 4 ++++ .../com/google/zxing/client/android/CameraManager.java | 9 ++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 920bb4be..034aa984 100755 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -20,8 +20,8 @@ version to be published. The next versionCode will be 7, regardless of whether t versionName is 2.31, 2.4, or 3.0. --> + android:versionName="2.92" + android:versionCode="28"> diff --git a/android/assets/html/whatsnew.html b/android/assets/html/whatsnew.html index 734c2d0f..2e79fb27 100644 --- a/android/assets/html/whatsnew.html +++ b/android/assets/html/whatsnew.html @@ -3,6 +3,10 @@

What's new in this version

+

New in version 2.92:

+
    +
  • Made another fix for the Samsung Galaxy.
  • +

New in version 2.91:

  • Forced the Samsung Galaxy flash off, which was interfering with scanning.
  • diff --git a/android/src/com/google/zxing/client/android/CameraManager.java b/android/src/com/google/zxing/client/android/CameraManager.java index 6a01783d..4da37467 100755 --- a/android/src/com/google/zxing/client/android/CameraManager.java +++ b/android/src/com/google/zxing/client/android/CameraManager.java @@ -205,9 +205,12 @@ final class CameraManager { Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewSize(mScreenResolution.x, mScreenResolution.y); - // FIXME: This is a hack to turn the flash off on the Samsung Galaxy. In the future there - // will hopefully be a standard setting like "off" that all devices will honor. - parameters.set("flash-mode", "2"); + // FIXME: This is a hack to turn the flash off on the Samsung Galaxy. + 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"); + mCamera.setParameters(parameters); Log.v(TAG, "Setting params for preview: width " + mScreenResolution.x + " height " + mScreenResolution.y); -- 2.20.1