Avoid weird NPE and don't obfuscate anymore -- no need

git-svn-id: https://zxing.googlecode.com/svn/trunk@2698 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen@gmail.com 2013-04-27 12:23:55 +00:00
parent 5d3a52df9c
commit 8758602883
2 changed files with 11 additions and 5 deletions

View file

@ -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 <methods>;

View file

@ -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.