Set a camera parameter to force the flash off. Also fixed the uninstall build targets.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1024 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2009-07-21 21:36:33 +00:00
parent d71c099313
commit 9dc583f556
4 changed files with 9 additions and 6 deletions

View file

@ -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">

View 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>

View file

@ -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);

View 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>