From 886e3a3e020dbc9c5a339110156d0bdc760bcb2d Mon Sep 17 00:00:00 2001 From: "dswitkin@google.com" Date: Tue, 7 Jun 2011 15:45:03 +0000 Subject: [PATCH] Fixed the build and added some cleanup comments. git-svn-id: https://zxing.googlecode.com/svn/trunk@1812 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- android/res/values-sk/strings.xml | 2 +- .../zxing/client/android/book/SearchBookContentsActivity.java | 1 + .../com/google/zxing/client/android/result/ResultHandler.java | 4 ++-- .../google/zxing/client/android/result/URIResultHandler.java | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/android/res/values-sk/strings.xml b/android/res/values-sk/strings.xml index 464dc465f..6042ed4ff 100644 --- a/android/res/values-sk/strings.xml +++ b/android/res/values-sk/strings.xml @@ -95,7 +95,7 @@ Skenovať a ukladať veľa čiarových kódov bez prerušenia Hromadný režim skenovania Kopírovať do schránky - Použitie %s ako zástupný symbol pre ID produktu, a %f pre formát + Použitie %s ako zástupný symbol pre ID produktu, a %f pre formát Vlastné vyhľadávanie URL 1D čiarové kódy Dáta Matrix diff --git a/android/src/com/google/zxing/client/android/book/SearchBookContentsActivity.java b/android/src/com/google/zxing/client/android/book/SearchBookContentsActivity.java index 8033ea250..9704e5dd1 100644 --- a/android/src/com/google/zxing/client/android/book/SearchBookContentsActivity.java +++ b/android/src/com/google/zxing/client/android/book/SearchBookContentsActivity.java @@ -126,6 +126,7 @@ public final class SearchBookContentsActivity extends Activity { } isbn = intent.getStringExtra(Intents.SearchBookContents.ISBN); + // FIXME(dswitkin): Should not hardcode Books URL. Also does not handle books.google.ca etc. if (isbn.startsWith("http://google.com/books?id=")) { setTitle(getString(R.string.sbc_name)); } else { diff --git a/android/src/com/google/zxing/client/android/result/ResultHandler.java b/android/src/com/google/zxing/client/android/result/ResultHandler.java index 022e1ac78..4f538d6d8 100644 --- a/android/src/com/google/zxing/client/android/result/ResultHandler.java +++ b/android/src/com/google/zxing/client/android/result/ResultHandler.java @@ -364,10 +364,10 @@ public abstract class ResultHandler { launchIntent(new Intent(Intent.ACTION_VIEW, uri)); } - final void searchBookContents(String isbn) { + final void searchBookContents(String isbnOrUrl) { Intent intent = new Intent(Intents.SearchBookContents.ACTION); intent.setClassName(activity, SearchBookContentsActivity.class.getName()); - putExtra(intent, Intents.SearchBookContents.ISBN, isbn); + putExtra(intent, Intents.SearchBookContents.ISBN, isbnOrUrl); launchIntent(intent); } diff --git a/android/src/com/google/zxing/client/android/result/URIResultHandler.java b/android/src/com/google/zxing/client/android/result/URIResultHandler.java index 1f1442585..67608b278 100644 --- a/android/src/com/google/zxing/client/android/result/URIResultHandler.java +++ b/android/src/com/google/zxing/client/android/result/URIResultHandler.java @@ -76,6 +76,7 @@ public final class URIResultHandler extends ResultHandler { } private boolean isGoogleBooksURI() { + // FIXME(dswitkin): Should not hardcode Books URL. Also does not handle books.google.ca etc. return ((URIParsedResult) getResult()).getURI().startsWith("http://google.com/books?id="); }