From 29f9ff964cd57ff2a2e0f00db70bd53883c9b3ac Mon Sep 17 00:00:00 2001 From: srowen Date: Fri, 2 Jan 2009 14:32:24 +0000 Subject: [PATCH] Commit additional check for null as suggested on discussion group git-svn-id: https://zxing.googlecode.com/svn/trunk@810 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../com/google/zxing/client/android/CaptureActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java index 6192f15ff..a2da8b72e 100755 --- a/android/src/com/google/zxing/client/android/CaptureActivity.java +++ b/android/src/com/google/zxing/client/android/CaptureActivity.java @@ -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();