Bug 884896 - Move all search-related classes to home package (r=sriram)
authorLucas Rocha <lucasr@mozilla.com>
Tue, 25 Jun 2013 18:00:09 +0100
changeset 143424 86b02c1b76542d6865996715a33af6651e6c8a97
parent 143423 c6c7f52d4ce75495018f1d3d1996d8c8355cd50f
child 143425 03069010d40f7de094f9573a961b0f2e42ec3b6b
push id32723
push useremorley@mozilla.com
push dateWed, 21 Aug 2013 12:10:14 +0000
treeherdermozilla-inbound@ab6bc4d9e4c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram
bugs884896
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 884896 - Move all search-related classes to home package (r=sriram)
mobile/android/base/BrowserApp.java
mobile/android/base/BrowserSearch.java
mobile/android/base/Makefile.in
mobile/android/base/SearchEngine.java
mobile/android/base/SearchEngineRow.java
mobile/android/base/SimpleCursorLoader.java
mobile/android/base/SuggestClient.java
mobile/android/base/home/BrowserSearch.java
mobile/android/base/home/FaviconsLoader.java
mobile/android/base/home/SearchEngine.java
mobile/android/base/home/SearchEngineRow.java
mobile/android/base/home/SimpleCursorLoader.java
mobile/android/base/home/SuggestClient.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -10,17 +10,19 @@ import org.mozilla.gecko.animation.Prope
 import org.mozilla.gecko.db.BrowserContract.Combined;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.gfx.BitmapUtils;
 import org.mozilla.gecko.gfx.GeckoLayerClient;
 import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
 import org.mozilla.gecko.gfx.LayerView;
 import org.mozilla.gecko.gfx.PanZoomController;
 import org.mozilla.gecko.health.BrowserHealthReporter;
+import org.mozilla.gecko.home.BrowserSearch;
 import org.mozilla.gecko.home.HomePager;
+import org.mozilla.gecko.home.SearchEngine;
 import org.mozilla.gecko.menu.GeckoMenu;
 import org.mozilla.gecko.util.FloatUtils;
 import org.mozilla.gecko.util.GamepadUtils;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.ThreadUtils;
 import org.mozilla.gecko.util.UiAsyncTask;
 import org.mozilla.gecko.widget.AboutHome;
 
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -54,17 +54,16 @@ FENNEC_JAVA_FILES = \
   AutocompleteHandler.java \
   animation/AnimatorProxy.java \
   animation/HeightChangeAnimation.java \
   animation/PropertyAnimator.java \
   animation/Rotate3DAnimation.java \
   animation/ViewHelper.java \
   BackButton.java \
   BrowserApp.java \
-  BrowserSearch.java \
   BrowserToolbar.java \
   BrowserToolbarBackground.java \
   BrowserToolbarLayout.java \
   CameraImageResultHandler.java \
   CameraVideoResultHandler.java \
   CanvasDelegate.java \
   CheckableLinearLayout.java \
   ClickableWhenDisabledEditText.java \
@@ -124,34 +123,30 @@ FENNEC_JAVA_FILES = \
   PrefsHelper.java \
   PrivateDataPreference.java \
   PrivateTab.java \
   ProfileMigrator.java \
   Prompt.java \
   PromptInput.java \
   PromptService.java \
   Restarter.java \
-  SearchEngine.java \
-  SearchEngineRow.java \
   sqlite/ByteBufferInputStream.java \
   sqlite/MatrixBlobCursor.java \
   sqlite/SQLiteBridge.java \
   sqlite/SQLiteBridgeException.java \
   ReaderModeUtils.java \
   RemoteTabs.java \
   RobocopAPI.java \
   ServiceNotificationClient.java \
   SessionParser.java \
   SetupScreen.java \
   ShapedButton.java \
   SharedPreferencesHelper.java \
-  SimpleCursorLoader.java \
   SiteIdentityPopup.java \
   SmsManager.java \
-  SuggestClient.java \
   SurfaceBits.java \
   SyncPreference.java \
   Tab.java \
   TabCounter.java \
   Tabs.java \
   TabsPanel.java \
   TabsTray.java \
   TabsAccessor.java \
@@ -212,22 +207,27 @@ FENNEC_JAVA_FILES = \
   gfx/TileLayer.java \
   gfx/TouchEventHandler.java \
   gfx/ViewTransform.java \
   gfx/VirtualLayer.java \
   home/BookmarksListView.java \
   home/BookmarksPage.java \
   home/BookmarkFolderView.java \
   home/BookmarkThumbnailView.java \
+  home/BrowserSearch.java \
   home/HomeFragment.java \
   home/HomeListView.java \
   home/HomePager.java \
   home/HomePagerTabStrip.java \
   home/FadedTextView.java \
   home/FaviconsLoader.java \
+  home/SearchEngine.java \
+  home/SearchEngineRow.java \
+  home/SimpleCursorLoader.java \
+  home/SuggestClient.java \
   home/TopBookmarkItemView.java \
   home/TopBookmarksView.java \
   home/TwoLinePageRow.java \
   home/VisitedPage.java \
   menu/GeckoMenu.java \
   menu/GeckoMenuInflater.java \
   menu/GeckoMenuItem.java \
   menu/GeckoSubMenu.java \
rename from mobile/android/base/BrowserSearch.java
rename to mobile/android/base/home/BrowserSearch.java
--- a/mobile/android/base/BrowserSearch.java
+++ b/mobile/android/base/home/BrowserSearch.java
@@ -1,25 +1,26 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * 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.gecko;
+package org.mozilla.gecko.home;
 
+import org.mozilla.gecko.GeckoAppShell;
+import org.mozilla.gecko.GeckoEvent;
+import org.mozilla.gecko.R;
+import org.mozilla.gecko.Tab;
+import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.db.BrowserContract.Combined;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.BrowserDB.URLColumns;
 import org.mozilla.gecko.gfx.BitmapUtils;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.ThreadUtils;
-import org.mozilla.gecko.home.FaviconsLoader;
-import org.mozilla.gecko.home.HomeFragment;
-import org.mozilla.gecko.home.HomeListView;
-import org.mozilla.gecko.home.TwoLinePageRow;
 import org.mozilla.gecko.widget.FaviconView;
 
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
 import android.app.Activity;
 import android.content.ContentResolver;
@@ -304,21 +305,21 @@ public class BrowserSearch extends HomeF
         } catch (JSONException e) {
             Log.e(LOGTAG, "Error getting search engine JSON", e);
         }
 
         filterSuggestions();
     }
 
     private void registerEventListener(String eventName) {
-        GeckoAppShell.getEventDispatcher().registerEventListener(eventName, this);
+        GeckoAppShell.registerEventListener(eventName, this);
     }
 
     private void unregisterEventListener(String eventName) {
-        GeckoAppShell.getEventDispatcher().unregisterEventListener(eventName, this);
+        GeckoAppShell.unregisterEventListener(eventName, this);
     }
 
     public void filter(String searchTerm) {
         if (TextUtils.isEmpty(searchTerm)) {
             return;
         }
 
         if (TextUtils.equals(mSearchTerm, searchTerm)) {
--- a/mobile/android/base/home/FaviconsLoader.java
+++ b/mobile/android/base/home/FaviconsLoader.java
@@ -1,17 +1,16 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * 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.gecko.home;
 
 import org.mozilla.gecko.Favicons;
-import org.mozilla.gecko.SimpleCursorLoader;
 import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.BrowserDB.URLColumns;
 import org.mozilla.gecko.gfx.BitmapUtils;
 
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.Cursor;
 import android.graphics.Bitmap;
rename from mobile/android/base/SearchEngine.java
rename to mobile/android/base/home/SearchEngine.java
--- a/mobile/android/base/SearchEngine.java
+++ b/mobile/android/base/home/SearchEngine.java
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * 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.gecko;
+package org.mozilla.gecko.home;
 
 import android.graphics.Bitmap;
 
 import java.util.ArrayList;
 
 public class SearchEngine {
     public String name;
     public String identifier;
rename from mobile/android/base/SearchEngineRow.java
rename to mobile/android/base/home/SearchEngineRow.java
--- a/mobile/android/base/SearchEngineRow.java
+++ b/mobile/android/base/home/SearchEngineRow.java
@@ -1,18 +1,23 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
  * 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.gecko;
+package org.mozilla.gecko.home;
 
-import org.mozilla.gecko.BrowserSearch.OnEditSuggestionListener;
-import org.mozilla.gecko.BrowserSearch.OnSearchListener;
-import org.mozilla.gecko.BrowserSearch.OnUrlOpenListener;
+import org.mozilla.gecko.AnimatedHeightLayout;
+import org.mozilla.gecko.FlowLayout;
+import org.mozilla.gecko.R;
+import org.mozilla.gecko.Tab;
+import org.mozilla.gecko.Tabs;
+import org.mozilla.gecko.home.BrowserSearch.OnEditSuggestionListener;
+import org.mozilla.gecko.home.BrowserSearch.OnSearchListener;
+import org.mozilla.gecko.home.BrowserSearch.OnUrlOpenListener;
 import org.mozilla.gecko.util.StringUtils;
 import org.mozilla.gecko.widget.FaviconView;
 
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
rename from mobile/android/base/SimpleCursorLoader.java
rename to mobile/android/base/home/SimpleCursorLoader.java
--- a/mobile/android/base/SimpleCursorLoader.java
+++ b/mobile/android/base/home/SimpleCursorLoader.java
@@ -12,17 +12,17 @@
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
-package org.mozilla.gecko;
+package org.mozilla.gecko.home;
 
 import android.content.Context;
 import android.database.ContentObserver;
 import android.database.Cursor;
 import android.support.v4.content.AsyncTaskLoader;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
rename from mobile/android/base/SuggestClient.java
rename to mobile/android/base/home/SuggestClient.java
--- a/mobile/android/base/SuggestClient.java
+++ b/mobile/android/base/home/SuggestClient.java
@@ -1,13 +1,15 @@
 /* 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.gecko;
+package org.mozilla.gecko.home;
+
+import org.mozilla.gecko.GeckoAppShell;
 
 import org.json.JSONArray;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.text.TextUtils;
 import android.util.Log;