summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorSean Owen <srowen@gmail.com>2014-04-23 01:20:58 +0400
committerSean Owen <srowen@gmail.com>2014-04-23 01:20:58 +0400
commit4050f5c2f3102be625e614fbe7bda6ef262fa799 (patch)
tree77135d684058a790dc0f9b27a4b80a5bc90fc470 /android
parent391e85ea51c9e4073d6dc2ff41cfcc400cf3bfb0 (diff)
downloadzxing-4050f5c2f3102be625e614fbe7bda6ef262fa799.tar.xz
Fix some issues flagged by Coverity static analysis
Diffstat (limited to 'android')
-rwxr-xr-xandroid/src/com/google/zxing/client/android/encode/EncodeActivity.java5
-rw-r--r--android/src/com/google/zxing/client/android/result/supplement/SupplementalInfoRetriever.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/android/src/com/google/zxing/client/android/encode/EncodeActivity.java b/android/src/com/google/zxing/client/android/encode/EncodeActivity.java
index f05aa9228..cc433dd51 100755
--- a/android/src/com/google/zxing/client/android/encode/EncodeActivity.java
+++ b/android/src/com/google/zxing/client/android/encode/EncodeActivity.java
@@ -146,7 +146,10 @@ public final class EncodeActivity extends Activity {
return;
}
File barcodeFile = new File(barcodesRoot, makeBarcodeFileName(contents) + ".png");
- barcodeFile.delete();
+ if (!barcodeFile.delete()) {
+ Log.w(TAG, "Could not delete " + barcodeFile);
+ // continue anyway
+ }
FileOutputStream fos = null;
try {
fos = new FileOutputStream(barcodeFile);
diff --git a/android/src/com/google/zxing/client/android/result/supplement/SupplementalInfoRetriever.java b/android/src/com/google/zxing/client/android/result/supplement/SupplementalInfoRetriever.java
index 787e7525e..a9f479ab3 100644
--- a/android/src/com/google/zxing/client/android/result/supplement/SupplementalInfoRetriever.java
+++ b/android/src/com/google/zxing/client/android/result/supplement/SupplementalInfoRetriever.java
@@ -55,8 +55,7 @@ public abstract class SupplementalInfoRetriever extends AsyncTask<Object,Object,
} else if (result instanceof ProductParsedResult) {
ProductParsedResult productParsedResult = (ProductParsedResult) result;
String productID = productParsedResult.getProductID();
- String normalizedProductID = productParsedResult.getNormalizedProductID();
- SupplementalInfoRetriever productRetriever =
+ SupplementalInfoRetriever productRetriever =
new ProductResultInfoRetriever(textView, productID, historyManager, context);
productRetriever.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else if (result instanceof ISBNParsedResult) {