From bb7ca403471f7af13a89398c1bd12015d4f7b557 Mon Sep 17 00:00:00 2001 From: Michael Kaply Date: Tue, 19 Apr 2016 15:57:50 -0500 Subject: [PATCH] Bug 1265742 - Update Google search plugin; r=margaret, a=lizzard --- .../gecko/search/SearchEngineManager.java | 10 +++++++--- mobile/locales/Makefile.in | 1 + .../en-US/searchplugins/google-nocodes.xml | 16 ++++++++++++++++ mobile/locales/en-US/searchplugins/google.xml | 1 + mobile/locales/en-US/searchplugins/list.txt | 3 ++- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 mobile/locales/en-US/searchplugins/google-nocodes.xml diff --git a/mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java b/mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java index f711b127137..5ad634c0270 100644 --- a/mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java +++ b/mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java @@ -574,9 +574,13 @@ public class SearchEngineManager implements SharedPreferences.OnSharedPreference String identifier; while ((identifier = br.readLine()) != null) { final InputStream pluginIn = getInputStreamFromSearchPluginsJar(identifier + ".xml"); - final SearchEngine engine = createEngineFromInputStream(identifier, pluginIn); - if (engine != null && engine.getName().equals(name)) { - return engine; + // pluginIn can be null if the xml file doesn't exist which + // can happen with :hidden plugins + if (pluginIn != null) { + final SearchEngine engine = createEngineFromInputStream(identifier, pluginIn); + if (engine != null && engine.getName().equals(name)) { + return engine; + } } } } catch (IOException e) { diff --git a/mobile/locales/Makefile.in b/mobile/locales/Makefile.in index 902c8769245..d4f0237b9f3 100644 --- a/mobile/locales/Makefile.in +++ b/mobile/locales/Makefile.in @@ -81,6 +81,7 @@ GARBAGE += $(search-jar) $(search-jar-ts) $(search-jar-common) # search-jar contains a list of providers for the search plugin ########################################################################### SEARCH_PLUGINS = $(shell cat $(plugin_file)) +SEARCH_PLUGINS := $(subst :hidden,,$(SEARCH_PLUGINS)) $(call errorIfEmpty,SEARCH_PLUGINS) search-jar-preqs = \ diff --git a/mobile/locales/en-US/searchplugins/google-nocodes.xml b/mobile/locales/en-US/searchplugins/google-nocodes.xml new file mode 100644 index 00000000000..7ed636ae91a --- /dev/null +++ b/mobile/locales/en-US/searchplugins/google-nocodes.xml @@ -0,0 +1,16 @@ + + + +Google +UTF-8 +data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAHqklEQVR4Ae2dVXgbSRaFe5lelnnfluFlmCnMzMzMzMwMCjPMKOsxM7MVh5kTc0AMJePDWd+dT172WupuVXVc+b4zwZF0/9N1763qVpUS+AHgSzU1NWOrq6vPN8rr9/shihhj6v8fziKmxJYYE2sACon+Q/pp419mGAi4oQ0h1sQ8YMCXeMMnOPzfk4sJX1Iah8Q4AYNvFYZQOlIoL/EPtHWaQOwVfgVXitgrrfVqFyUGRcLnG4uix4cVH744cSl8A5NSZLrhG7Mi4fONXZHwuZjAvwZIiW+ANECmHf3ZKKLDZ3YbvJZ8uE8cgmP5PDhmjoN9zADY+nWCtdN7sLZ/C7Yen8A2oDMc4weD/o3rwE54kuPAykuFN0EREb7v3h249u+EfXR/WNu+AWub10OWbXB3OLeuhfeihb8JItcAZrXCE3EW9olDCZwuolFCI4lZX8gi3CS3C+4zx2Dr2YYghUddPoDLtI1M528At9TDGDyxn9NVSVC4yNa7HdxRZq6piIsBvopyOGZNIAhCyLloBqUl/gaEA74nJwO2Xm0pcKFkG9IDvlvXw26CEk74LtN2ClZYUVvriY/SwwTORZgxuDavpiDFV8d34Htw7yXqgnw+ONcsNgx8b17Wy9WGOlfOl/B5GeA6fkDCD9YArYovBRRYRtBatu4fwz6sF+xTR8E+ZSR1MLB1/VBc+M2wVfSAzx4/ogUyzYBT2+ratAqepFiaQ/zv933xHJ60RLg2roCtX0chr3xirHsKcsyeqAl4+8h+X8xUXc6Qir8nLpJGBwf4HGuANz1Jg7Wa9+H+7CT8WoxInxeeyM+ox+cPX3cDnE7YBnZRBZ9yOit9onmgNMu1D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CA/9fXG5awBl23W1sMf8BuBodb1y/paW9CVoklAEBzfRQ5DD3jJ2Nk2kKMTluM/kkz0DFmLN4MovvqEjMRQ47eaZEB2bf0/5qqLjpw7TMKVljR8siEyJTmC28SM/ZWBfPzNgttAmlc4l502OT+D/hTjjP4mN/YBviYD4sLtgtvQt/4uehjKmuCP3w/Q5XtJdkzjtrJVZa9wpvwceQIjP7UgiEmhgrtW07+GzZtu3RMeBOGp85HmdXNa8Mm/U3IeFKINlEjhYS/sfggvMyrP3zem/ZRLz8+Y5kw4D+MHIaUx3mtZ9fEQF2IuJuMzjHjuMKfnLWSJo58t63kKVr9PHojAp9EjQgr+BnZa3G56pbcOTcgq9uGM7djMTRlrm7QaWZO85Kbz+7xj1nkzbvvvHiIHZeO0xIDQVM926U0Y76biArnU/E37xZt+3qbx4H8sos4eM2MubmbMDZ9SaMxM2nth+DizXP9qYiiQ/QYMgzTs9dgffEBnL0dh6tVt+lWp/jb14tugjzAQUqeISMNEDAdyWOs5EFu8ihDrvBlDZBFWB5nKw90lgc6yyPNVYjjof5SxJ4MOG/8K8qYn43YKzU1NWOFDLQVfCZirwD4UqMTGfyDb10XATEn9mQA6adhM0EqAP+nxJ7gB/QlGhKUl0QrzIwxw6c5YkpsiTGxDnD/GwMDxywT49owAAAAAElFTkSuQmCC + + + + + + +https://www.google.com + diff --git a/mobile/locales/en-US/searchplugins/google.xml b/mobile/locales/en-US/searchplugins/google.xml index 7ed636ae91a..2a264c27cb6 100644 --- a/mobile/locales/en-US/searchplugins/google.xml +++ b/mobile/locales/en-US/searchplugins/google.xml @@ -11,6 +11,7 @@ + https://www.google.com diff --git a/mobile/locales/en-US/searchplugins/list.txt b/mobile/locales/en-US/searchplugins/list.txt index 27ce4297d79..aa5cc85edbb 100644 --- a/mobile/locales/en-US/searchplugins/list.txt +++ b/mobile/locales/en-US/searchplugins/list.txt @@ -1,7 +1,8 @@ amazondotcom -google +google:hidden twitter wikipedia yahoo bing duckduckgo +google-nocodes