Bug 1249288 - Move om.search.providers.SearchEngine\* to omg.search. r=nalexander
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 23 Feb 2016 17:27:24 -0800
changeset 290803 aafa9cc405de7f17f05763ecbfe3278729a701ed
parent 290802 dbb64aae2a239d1ae85a6591a57058ad29ab90e7
child 290804 6ecd4b60ef8ad9fe5517eff40ba4810ca6069a52
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1249288
milestone48.0a1
Bug 1249288 - Move om.search.providers.SearchEngine\* to omg.search. r=nalexander We want to reuse this code for the main Activity. MozReview-Commit-ID: BZxIrgmJI2r
mobile/android/base/java/org/mozilla/gecko/search/SearchEngine.java
mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java
mobile/android/base/moz.build
mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
mobile/android/search/java/org/mozilla/search/SearchActivity.java
mobile/android/search/java/org/mozilla/search/autocomplete/SearchBar.java
mobile/android/search/java/org/mozilla/search/autocomplete/SuggestionsFragment.java
mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java
mobile/android/search/java/org/mozilla/search/providers/SearchEngineManager.java
mobile/android/search/search_activity_sources.mozbuild
rename from mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java
rename to mobile/android/base/java/org/mozilla/gecko/search/SearchEngine.java
--- a/mobile/android/search/java/org/mozilla/search/providers/SearchEngine.java
+++ b/mobile/android/base/java/org/mozilla/gecko/search/SearchEngine.java
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.search.providers;
+package org.mozilla.gecko.search;
 
 import android.net.Uri;
 import android.util.Log;
 import android.util.Xml;
 
 import org.mozilla.gecko.util.StringUtils;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
rename from mobile/android/search/java/org/mozilla/search/providers/SearchEngineManager.java
rename to mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java
--- a/mobile/android/search/java/org/mozilla/search/providers/SearchEngineManager.java
+++ b/mobile/android/base/java/org/mozilla/gecko/search/SearchEngineManager.java
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.search.providers;
+package org.mozilla.gecko.search;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.text.TextUtils;
 import android.util.Log;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.mozilla.gecko.AppConstants;
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -523,16 +523,18 @@ gbjar.sources += ['java/org/mozilla/geck
     'restrictions/GuestProfileConfiguration.java',
     'restrictions/Restrictable.java',
     'restrictions/RestrictedProfileConfiguration.java',
     'restrictions/RestrictionCache.java',
     'restrictions/RestrictionConfiguration.java',
     'restrictions/RestrictionProvider.java',
     'restrictions/Restrictions.java',
     'ScreenshotObserver.java',
+    'search/SearchEngine.java',
+    'search/SearchEngineManager.java',
     'ServiceNotificationClient.java',
     'SessionParser.java',
     'SharedPreferencesHelper.java',
     'SiteIdentity.java',
     'SmsManager.java',
     'SnackbarHelper.java',
     'sqlite/ByteBufferInputStream.java',
     'sqlite/MatrixBlobCursor.java',
--- a/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
+++ b/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
@@ -7,19 +7,19 @@ package org.mozilla.search;
 import java.net.MalformedURLException;
 import java.net.URISyntaxException;
 import java.net.URL;
 
 import android.support.v4.content.ContextCompat;
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.GeckoApplication;
 import org.mozilla.gecko.R;
+import org.mozilla.gecko.search.SearchEngine;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
-import org.mozilla.search.providers.SearchEngine;
 
 import android.annotation.SuppressLint;
 import android.content.ActivityNotFoundException;
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.provider.Settings;
 import android.support.v4.app.Fragment;
--- a/mobile/android/search/java/org/mozilla/search/SearchActivity.java
+++ b/mobile/android/search/java/org/mozilla/search/SearchActivity.java
@@ -6,21 +6,21 @@ package org.mozilla.search;
 
 import org.mozilla.gecko.GeckoAppShell;
 import org.mozilla.gecko.Locales;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.db.BrowserContract.SearchHistory;
 import org.mozilla.gecko.distribution.Distribution;
+import org.mozilla.gecko.search.SearchEngine;
+import org.mozilla.gecko.search.SearchEngineManager;
+import org.mozilla.gecko.search.SearchEngineManager.SearchEngineCallback;
 import org.mozilla.search.autocomplete.SearchBar;
 import org.mozilla.search.autocomplete.SuggestionsFragment;
-import org.mozilla.search.providers.SearchEngine;
-import org.mozilla.search.providers.SearchEngineManager;
-import org.mozilla.search.providers.SearchEngineManager.SearchEngineCallback;
 
 import android.content.AsyncQueryHandler;
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Intent;
 import android.graphics.Rect;
 import android.os.Bundle;
 import android.text.TextUtils;
--- a/mobile/android/search/java/org/mozilla/search/autocomplete/SearchBar.java
+++ b/mobile/android/search/java/org/mozilla/search/autocomplete/SearchBar.java
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.search.autocomplete;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.gfx.BitmapUtils;
-import org.mozilla.search.providers.SearchEngine;
+import org.mozilla.gecko.search.SearchEngine;
 
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Color;
 import android.graphics.PorterDuff;
 import android.graphics.PorterDuffColorFilter;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
--- a/mobile/android/search/java/org/mozilla/search/autocomplete/SuggestionsFragment.java
+++ b/mobile/android/search/java/org/mozilla/search/autocomplete/SuggestionsFragment.java
@@ -4,22 +4,22 @@
 
 package org.mozilla.search.autocomplete;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import android.support.v4.content.ContextCompat;
 import org.mozilla.gecko.R;
+import org.mozilla.gecko.search.SearchEngine;
 import org.mozilla.gecko.SuggestClient;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.search.AcceptsSearchQuery;
 import org.mozilla.search.AcceptsSearchQuery.SuggestionAnimation;
-import org.mozilla.search.providers.SearchEngine;
 
 import android.content.Context;
 import android.graphics.Rect;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.LoaderManager;
 import android.support.v4.content.AsyncTaskLoader;
 import android.support.v4.content.Loader;
--- a/mobile/android/search/search_activity_sources.mozbuild
+++ b/mobile/android/search/search_activity_sources.mozbuild
@@ -7,16 +7,14 @@
 search_activity_sources = [
     'java/org/mozilla/search/AcceptsSearchQuery.java',
     'java/org/mozilla/search/autocomplete/AutoCompleteAdapter.java',
     'java/org/mozilla/search/autocomplete/SearchBar.java',
     'java/org/mozilla/search/autocomplete/SuggestionsFragment.java',
     'java/org/mozilla/search/Constants.java',
     'java/org/mozilla/search/PostSearchFragment.java',
     'java/org/mozilla/search/PreSearchFragment.java',
-    'java/org/mozilla/search/providers/SearchEngine.java',
-    'java/org/mozilla/search/providers/SearchEngineManager.java',
     'java/org/mozilla/search/SearchActivity.java',
     'java/org/mozilla/search/SearchPreferenceActivity.java',
     'java/org/mozilla/search/SearchWidget.java',
     'java/org/mozilla/search/ui/BackCaptureEditText.java',
     'java/org/mozilla/search/ui/FacetBar.java',
 ]