Commit additional check for null as suggested on discussion group
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 2 Jan 2009 14:32:24 +0000 (14:32 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Fri, 2 Jan 2009 14:32:24 +0000 (14:32 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@810 59b500cc-1b3d-0410-9834-0bbf25fbcc57

android/src/com/google/zxing/client/android/CaptureActivity.java

index 6192f15..a2da8b7 100755 (executable)
@@ -66,7 +66,7 @@ import java.io.IOException;
  * The barcode reader activity itself. This is loosely based on the CameraPreview
  * example included in the Android SDK.
  */
-public final class CaptureActivity extends Activity implements SurfaceHolder.Callback {
+public final class DECaptureActivity extends Activity implements SurfaceHolder.Callback {
 
   private static final int SHARE_ID = Menu.FIRST;
   private static final int SETTINGS_ID = Menu.FIRST + 1;
@@ -132,8 +132,9 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
     }
 
     Intent intent = getIntent();
-    if (intent != null && (intent.getAction().equals(Intents.Scan.ACTION) ||
-        intent.getAction().equals(Intents.Scan.DEPRECATED_ACTION))) {
+    String action = intent.getAction();
+    if (intent != null && action != null && (action.equals(Intents.Scan.ACTION) ||
+        action.equals(Intents.Scan.DEPRECATED_ACTION))) {
       mScanIntent = true;
       mDecodeMode = intent.getStringExtra(Intents.Scan.MODE);
       resetStatusView();