From edfb04b96d283d8fbc1f1a403b7fd9e730bff706 Mon Sep 17 00:00:00 2001 From: srowen Date: Fri, 12 Nov 2010 01:24:55 +0000 Subject: [PATCH] WIth Lee (Wildfire owner) helping found the cause -- bizarre issue with Wildfire where it can't find a UI element. Disabling it for these devices. git-svn-id: https://zxing.googlecode.com/svn/trunk@1642 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../google/zxing/client/android/CaptureActivity.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java index f02f740fd..8b9c92592 100755 --- a/android/src/com/google/zxing/client/android/CaptureActivity.java +++ b/android/src/com/google/zxing/client/android/CaptureActivity.java @@ -491,10 +491,14 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal contentsTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, scaledSize); TextView supplementTextView = (TextView) findViewById(R.id.contents_supplement_text_view); - supplementTextView.setText(""); - supplementTextView.setOnClickListener(null); - if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(PreferencesActivity.KEY_SUPPLEMENTAL, true)) { - SupplementalInfoRetriever.maybeInvokeRetrieval(supplementTextView, resultHandler.getResult(), handler, this); + if (supplementTextView != null) { + supplementTextView.setText(""); + supplementTextView.setOnClickListener(null); + if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(PreferencesActivity.KEY_SUPPLEMENTAL, true)) { + SupplementalInfoRetriever.maybeInvokeRetrieval(supplementTextView, resultHandler.getResult(), handler, this); + } + } else { + Log.w(TAG, "Unable to find supplement text view?"); } int buttonCount = resultHandler.getButtonCount();