The final compatibility changes for Barcode Scanner 3.0, which is now finished.
authordswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 23 Oct 2009 16:40:54 +0000 (16:40 +0000)
committerdswitkin <dswitkin@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 23 Oct 2009 16:40:54 +0000 (16:40 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1084 59b500cc-1b3d-0410-9834-0bbf25fbcc57

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

index eec262a..51e7341 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="3.0 beta3"
-          android:versionCode="37">
+          android:versionName="3.0"
+          android:versionCode="38">
   <!-- We require Cupcake (Android 1.5) or later. -->
   <uses-sdk android:minSdkVersion="3"/>
   <!-- Donut-specific flags which allow us to run on large and high dpi screens. -->
index fd4a366..c55bc70 100755 (executable)
@@ -124,8 +124,8 @@ final class CameraManager {
     // Camera.setOneShotPreviewCallback() has a race condition in Cupcake, so we use the older
     // Camera.setPreviewCallback() on 1.5 and earlier. For Donut and later, we need to use
     // the more efficient one shot callback, as the older one can swamp the system and cause it
-    // to run out of memory.
-    if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.CUPCAKE) {
+    // to run out of memory. We can't use SDK_INT because it was introduced in the Donut SDK.
+    if (Integer.parseInt(Build.VERSION.SDK) <= Build.VERSION_CODES.CUPCAKE) {
       useOneShotPreviewCallback = false;
     } else {
       useOneShotPreviewCallback = true;