Bug 958189 - Rename ListManager to PanelManager. r=liuche
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Fri, 10 Jan 2014 12:57:20 -0800
changeset 162972 eacc67be800176ea59e1a83ca15fada676400c53
parent 162970 e89afc241513ce0202c82f6848c699fa91fa0d2c
child 162973 cd76ca8799927284e5d1af528e805b95470a0954
push id25977
push userttaubert@mozilla.com
push dateSun, 12 Jan 2014 09:26:17 +0000
treeherdermozilla-central@b029e8d3e130 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs958189
milestone29.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 958189 - Rename ListManager to PanelManager. r=liuche
mobile/android/base/home/HomeConfigPrefsBackend.java
mobile/android/base/home/ListManager.java
mobile/android/base/home/PanelManager.java
mobile/android/base/moz.build
--- a/mobile/android/base/home/HomeConfigPrefsBackend.java
+++ b/mobile/android/base/home/HomeConfigPrefsBackend.java
@@ -5,17 +5,16 @@
 
 package org.mozilla.gecko.home;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.home.HomeConfig.HomeConfigBackend;
 import org.mozilla.gecko.home.HomeConfig.OnChangeListener;
 import org.mozilla.gecko.home.HomeConfig.PageEntry;
 import org.mozilla.gecko.home.HomeConfig.PageType;
-import org.mozilla.gecko.home.ListManager.ListInfo;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
 import android.content.Context;
rename from mobile/android/base/home/ListManager.java
rename to mobile/android/base/home/PanelManager.java
--- a/mobile/android/base/home/ListManager.java
+++ b/mobile/android/base/home/PanelManager.java
@@ -16,72 +16,72 @@ import android.content.Context;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
 import android.text.TextUtils;
 import android.util.Log;
 
 import java.util.ArrayList;
 import java.util.List;
 
-public class ListManager implements GeckoEventListener {
-    private static final String LOGTAG = "GeckoListManager";
+public class PanelManager implements GeckoEventListener {
+    private static final String LOGTAG = "GeckoPanelManager";
 
-    public class ListInfo {
+    public class PanelInfo {
         public final String id;
         public final String title;
 
-        public ListInfo(String id, String title) {
+        public PanelInfo(String id, String title) {
             this.id = id;
             this.title = title;
         }
     }
 
     private final Context mContext;
 
-    public ListManager(Context context) {
+    public PanelManager(Context context) {
         mContext = context;
 
         // Add a listener to handle any new lists that are added after the lists have been loaded.
         GeckoAppShell.getEventDispatcher().registerEventListener("HomeLists:Added", this);
     }
 
     /**
      * Reads list info from SharedPreferences. Don't call this on the main thread!
      *
-     * @return List<ListInfo> A list of ListInfos for each registered list.
+     * @return List<PanelInfo> A list of PanelInfos for each registered list.
      */
-    public List<ListInfo> getListInfos() {
-        final ArrayList<ListInfo> listInfos = new ArrayList<ListInfo>();
+    public List<PanelInfo> getPanelInfos() {
+        final ArrayList<PanelInfo> panelInfos = new ArrayList<PanelInfo>();
 
         // XXX: We need to use PreferenceManager right now because that's what SharedPreferences.jsm uses (see bug 940575)
         final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
         final String prefValue = prefs.getString("home_lists", "");
 
         if (!TextUtils.isEmpty(prefValue)) {
             try {
                 final JSONArray lists = new JSONArray(prefValue);
                 for (int i = 0; i < lists.length(); i++) {
                     final JSONObject list = lists.getJSONObject(i);
-                    final ListInfo info = new ListInfo(list.getString("id"), list.getString("title"));
-                    listInfos.add(info);
+                    final PanelInfo info = new PanelInfo(list.getString("id"), list.getString("title"));
+                    panelInfos.add(info);
                 }
             } catch (JSONException e) {
                 Log.e(LOGTAG, "Exception getting list info", e);
             }
         }
-        return listInfos;
+        return panelInfos;
     }
 
     /**
      * Listens for "HomeLists:Added"
      */
     @Override
     public void handleMessage(String event, JSONObject message) {
         try {
-            final ListInfo info = new ListInfo(message.getString("id"), message.getString("title"));
+            final PanelInfo info = new PanelInfo(message.getString("id"), message.getString("title"));
 
             // Do something to update the set of list pages.
 
         } catch (JSONException e) {
             Log.e(LOGTAG, "Exception handling " + event + " message", e);
         }
     }
 }
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -217,20 +217,20 @@ gbjar.sources += [
     'home/HomeConfig.java',
     'home/HomeConfigLoader.java',
     'home/HomeConfigPrefsBackend.java',
     'home/HomeFragment.java',
     'home/HomeListView.java',
     'home/HomePager.java',
     'home/HomePagerTabStrip.java',
     'home/LastTabsPage.java',
-    'home/ListManager.java',
     'home/ListPage.java',
     'home/MostRecentPage.java',
     'home/MultiTypeCursorAdapter.java',
+    'home/PanelManager.java',
     'home/PinSiteDialog.java',
     'home/ReadingListPage.java',
     'home/SearchEngine.java',
     'home/SearchEngineRow.java',
     'home/SearchLoader.java',
     'home/SimpleCursorLoader.java',
     'home/SuggestClient.java',
     'home/TabMenuStrip.java',