Make sure it's possible un-set custom search URL; sometimes remains as a newline...
[zxing.git] / android / src / com / google / zxing / client / android / result / ResultHandler.java
index e7fc5a1..a93dfd4 100644 (file)
@@ -376,4 +376,13 @@ public abstract class ResultHandler {
     }
   }
 
+  protected String parseCustomSearchURL() {
+    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity);
+    String customProductSearch = prefs.getString(PreferencesActivity.KEY_CUSTOM_PRODUCT_SEARCH, null);
+    if (customProductSearch != null && customProductSearch.trim().length() == 0) {
+      return null;
+    }
+    return customProductSearch;
+  }
+
 }