Tack on a little more logging for debugging assistance
[zxing.git] / android / src / com / google / zxing / client / android / CaptureActivity.java
index f0b8e6f..d30f602 100755 (executable)
@@ -117,6 +117,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
     ONE_D_FORMATS = new Vector<BarcodeFormat>(PRODUCT_FORMATS.size() + 3);
     ONE_D_FORMATS.addAll(PRODUCT_FORMATS);
     ONE_D_FORMATS.add(BarcodeFormat.CODE_39);
+    ONE_D_FORMATS.add(BarcodeFormat.CODE_93);
     ONE_D_FORMATS.add(BarcodeFormat.CODE_128);
     ONE_D_FORMATS.add(BarcodeFormat.ITF);
     QR_CODE_FORMATS = new Vector<BarcodeFormat>(1);
@@ -588,8 +589,8 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
           resultHandler.getDisplayContents().toString() + "&source=zxing";
       handler.sendMessageDelayed(message, INTENT_RESULT_DURATION);
     } else if (source == Source.ZXING_LINK) {
-       // Replace each occurrence of RETURN_CODE_PLACEHOLDER in the returnUrlTemplate
-       // with the scanned code. This allows both queries and REST-style URLs to work.
+      // Replace each occurrence of RETURN_CODE_PLACEHOLDER in the returnUrlTemplate
+      // with the scanned code. This allows both queries and REST-style URLs to work.
       Message message = Message.obtain(handler, R.id.launch_product_query);
       message.obj = returnUrlTemplate.replace(RETURN_CODE_PLACEHOLDER, resultHandler.getDisplayContents().toString());
       handler.sendMessageDelayed(message, INTENT_RESULT_DURATION);
@@ -672,7 +673,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
     } catch (RuntimeException e) {
       // Barcode Scanner has seen crashes in the wild of this variety:
       // java.?lang.?RuntimeException: Fail to connect to camera service
-      Log.e(TAG, e.toString());
+      Log.w(TAG, "Unexpected error initializating camera", e);
       displayFrameworkBugMessageAndExit();
       return;
     }