diff --git a/android/proguard-android-optimize.txt b/android/proguard-android-optimize.txt index 4f94e229f..7b600ed90 100644 --- a/android/proguard-android-optimize.txt +++ b/android/proguard-android-optimize.txt @@ -32,6 +32,10 @@ #-keep class com.google.zxing.client.android.camera.exposure.** -keep class com.google.zxing.client.android.common.executor.** +# ADDED +-dontobfuscate +-useuniqueclassmembernames + # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native -keepclasseswithmembernames class * { native ; diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java index aa60d8304..3164414e3 100755 --- a/android/src/com/google/zxing/client/android/CaptureActivity.java +++ b/android/src/com/google/zxing/client/android/CaptureActivity.java @@ -479,11 +479,13 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal } private static void drawLine(Canvas canvas, Paint paint, ResultPoint a, ResultPoint b, float scaleFactor) { - canvas.drawLine(scaleFactor * a.getX(), - scaleFactor * a.getY(), - scaleFactor * b.getX(), - scaleFactor * b.getY(), - paint); + if (a != null && b != null) { + canvas.drawLine(scaleFactor * a.getX(), + scaleFactor * a.getY(), + scaleFactor * b.getX(), + scaleFactor * b.getY(), + paint); + } } // Put up our own UI for how to handle the decoded contents.