Set a camera parameter to force the flash off. Also fixed the uninstall build targets.
authordswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Tue, 21 Jul 2009 21:36:33 +0000 (21:36 +0000)
committerdswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Tue, 21 Jul 2009 21:36:33 +0000 (21:36 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1024 59b500cc-1b3d-0410-9834-0bbf25fbcc57

android/AndroidManifest.xml
android/build.xml
android/src/com/google/zxing/client/android/CameraManager.java
androidtest/build.xml

index f12928d..4721afc 100755 (executable)
@@ -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. -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.google.zxing.client.android"
-          android:versionName="2.9"
-          android:versionCode="23">
+          android:versionName="3.0 alpha1"
+          android:versionCode="24">
   <uses-sdk android:minSdkVersion="3"/>
   <application android:icon="@drawable/launcher_icon"
                android:label="@string/app_name">
index 860df42..c81a9d4 100644 (file)
@@ -42,7 +42,7 @@ limitations under the License.
   should be checked in in Version Control Systems.
 
   -->
-  <!--<property file="build.properties"/>-->
+  <property file="build.properties"/>
 
   <!-- The default.properties file is created and updated by the 'android' tool, as well as ADT.
   This file is an integral part of the build system for your application and
@@ -267,7 +267,7 @@ limitations under the License.
     <echo>Uninstalling ${application-package} from the default emulator...</echo>
     <exec executable="${adb}" failonerror="true">
       <arg value="uninstall" />
-      <arg path="${application-package}" />
+      <arg value="${application-package}" />
     </exec>
   </target>
 
index 1818c8c..cb33dd0 100755 (executable)
@@ -204,6 +204,9 @@ final class CameraManager {
   private void setCameraParameters() {
     Camera.Parameters parameters = mCamera.getParameters();
     parameters.setPreviewSize(mScreenResolution.x, mScreenResolution.y);
+
+    // Disables the built-in flash if present. Hopefully devices will honor this setting.
+    parameters.set("flash-mode", "off");
     mCamera.setParameters(parameters);
     Log.v(TAG, "Setting params for preview: width " + mScreenResolution.x + " height " +
         mScreenResolution.y);
index bcace05..ed41d61 100644 (file)
@@ -42,7 +42,7 @@ limitations under the License.
   should be checked in in Version Control Systems.
 
   -->
-  <!--<property file="build.properties"/>-->
+  <property file="build.properties"/>
 
   <!-- The default.properties file is created and updated by the 'android' tool, as well as ADT.
   This file is an integral part of the build system for your application and
@@ -267,7 +267,7 @@ limitations under the License.
     <echo>Uninstalling ${application-package} from the default emulator...</echo>
     <exec executable="${adb}" failonerror="true">
       <arg value="uninstall" />
-      <arg path="${application-package}" />
+      <arg value="${application-package}" />
     </exec>
   </target>