Bug 994734 - Rename HomeConfigInvalidator to HomePanelsManager (r=margaret)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 23 Apr 2014 15:22:34 +0100
changeset 179734 101b549e1b58e40ba91274e553cc570f60e0dccf
parent 179733 00ca4e6c5eddf3d881242d3a1cb6ccb38aed610c
child 179735 7d9d72c9cfac53a5b9b4406446f94e8b0ae0ce59
push id26638
push userryanvm@gmail.com
push dateWed, 23 Apr 2014 20:03:20 +0000
treeherdermozilla-central@3cd4615c60ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs994734
milestone31.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 994734 - Rename HomeConfigInvalidator to HomePanelsManager (r=margaret)
mobile/android/base/BrowserApp.java
mobile/android/base/GeckoApplication.java
mobile/android/base/home/HomeConfigInvalidator.java
mobile/android/base/home/HomeConfigPrefsBackend.java
mobile/android/base/home/HomePanelPicker.java
mobile/android/base/home/HomePanelsManager.java
mobile/android/base/moz.build
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -33,17 +33,17 @@ import org.mozilla.gecko.gfx.ImmutableVi
 import org.mozilla.gecko.gfx.LayerMarginsAnimator;
 import org.mozilla.gecko.gfx.LayerView;
 import org.mozilla.gecko.health.BrowserHealthRecorder;
 import org.mozilla.gecko.health.BrowserHealthReporter;
 import org.mozilla.gecko.health.HealthRecorder;
 import org.mozilla.gecko.health.SessionInformation;
 import org.mozilla.gecko.home.BrowserSearch;
 import org.mozilla.gecko.home.HomeBanner;
-import org.mozilla.gecko.home.HomeConfigInvalidator;
+import org.mozilla.gecko.home.HomePanelsManager;
 import org.mozilla.gecko.home.HomePager;
 import org.mozilla.gecko.home.HomePager.OnUrlOpenListener;
 import org.mozilla.gecko.home.SearchEngine;
 import org.mozilla.gecko.menu.GeckoMenu;
 import org.mozilla.gecko.menu.GeckoMenuItem;
 import org.mozilla.gecko.preferences.GeckoPreferences;
 import org.mozilla.gecko.prompts.Prompt;
 import org.mozilla.gecko.prompts.PromptListItem;
@@ -1673,17 +1673,17 @@ abstract public class BrowserApp extends
             hideHomePager();
         }
     }
 
     @Override
     public void onLocaleReady(final String locale) {
         super.onLocaleReady(locale);
 
-        HomeConfigInvalidator.getInstance().onLocaleReady(locale);
+        HomePanelsManager.getInstance().onLocaleReady(locale);
 
         if (mMenu != null) {
             mMenu.clear();
             onCreateOptionsMenu(mMenu);
         }
     }
 
     private void showHomePager(String panelId) {
--- a/mobile/android/base/GeckoApplication.java
+++ b/mobile/android/base/GeckoApplication.java
@@ -1,17 +1,17 @@
 /* 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;
 
 import org.mozilla.gecko.db.BrowserContract;
 import org.mozilla.gecko.db.BrowserDB;
-import org.mozilla.gecko.home.HomeConfigInvalidator;
+import org.mozilla.gecko.home.HomePanelsManager;
 import org.mozilla.gecko.mozglue.GeckoLoader;
 import org.mozilla.gecko.util.Clipboard;
 import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import android.app.Application;
 import android.content.Context;
 import android.content.SharedPreferences;
@@ -116,17 +116,17 @@ public class GeckoApplication extends Ap
     }
 
     @Override
     public void onCreate() {
         HardwareUtils.init(getApplicationContext());
         Clipboard.init(getApplicationContext());
         FilePicker.init(getApplicationContext());
         GeckoLoader.loadMozGlue();
-        HomeConfigInvalidator.getInstance().init(getApplicationContext());
+        HomePanelsManager.getInstance().init(getApplicationContext());
         super.onCreate();
     }
 
     public boolean isApplicationInBackground() {
         return mInBackground;
     }
 
     public LightweightTheme getLightweightTheme() {
--- a/mobile/android/base/home/HomeConfigPrefsBackend.java
+++ b/mobile/android/base/home/HomeConfigPrefsBackend.java
@@ -163,17 +163,17 @@ class HomeConfigPrefsBackend implements 
 
             final SharedPreferences.Editor editor = prefs.edit();
             editor.putString(PREFS_LOCALE_KEY, currentLocale);
             editor.commit();
 
             // If the user has saved HomeConfig before, return null this
             // one time to trigger a refresh and ensure we use the
             // correct locale for the saved state. For more context,
-            // see HomeConfigInvalidator.onLocaleReady().
+            // see HomePanelsManager.onLocaleReady().
             if (!prefs.contains(PREFS_CONFIG_KEY)) {
                 locale = currentLocale;
             }
         }
 
         return locale;
     }
 
--- a/mobile/android/base/home/HomePanelPicker.java
+++ b/mobile/android/base/home/HomePanelPicker.java
@@ -130,17 +130,17 @@ public class HomePanelPicker extends Fra
         }
 
         final PickerAdapter adapter = (PickerAdapter) mListView.getAdapter();
         adapter.updateFromPanelInfos(availablePanels);
     }
 
     private void installNewPanelAndQuit(PanelInfo panelInfo) {
         final PanelConfig newPanelConfig = panelInfo.toPanelConfig();
-        HomeConfigInvalidator.getInstance().installPanel(newPanelConfig);
+        HomePanelsManager.getInstance().installPanel(newPanelConfig);
         showToastForNewPanel(newPanelConfig);
 
         setResult(Activity.RESULT_OK);
         finish();
     }
 
     private void showToastForNewPanel(PanelConfig panelConfig) {
         String panelName = panelConfig.getTitle();
rename from mobile/android/base/home/HomeConfigInvalidator.java
rename to mobile/android/base/home/HomePanelsManager.java
--- a/mobile/android/base/home/HomeConfigInvalidator.java
+++ b/mobile/android/base/home/HomePanelsManager.java
@@ -22,20 +22,20 @@ import org.mozilla.gecko.home.PanelInfoM
 import org.mozilla.gecko.home.PanelInfoManager.RequestCallback;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import android.content.Context;
 import android.os.Handler;
 import android.util.Log;
 
-public class HomeConfigInvalidator implements GeckoEventListener {
-    public static final String LOGTAG = "HomeConfigInvalidator";
+public class HomePanelsManager implements GeckoEventListener {
+    public static final String LOGTAG = "HomePanelsManager";
 
-    private static final HomeConfigInvalidator sInstance = new HomeConfigInvalidator();
+    private static final HomePanelsManager sInstance = new HomePanelsManager();
 
     private static final int INVALIDATION_DELAY_MSEC = 500;
     private static final int PANEL_INFO_TIMEOUT_MSEC = 1000;
 
     private static final String EVENT_HOMEPANELS_INSTALL = "HomePanels:Install";
     private static final String EVENT_HOMEPANELS_UNINSTALL = "HomePanels:Uninstall";
     private static final String EVENT_HOMEPANELS_UPDATE = "HomePanels:Update";
 
@@ -69,17 +69,17 @@ public class HomeConfigInvalidator imple
     }
 
     private Context mContext;
     private HomeConfig mHomeConfig;
 
     private final Queue<ConfigChange> mPendingChanges = new ConcurrentLinkedQueue<ConfigChange>();
     private final Runnable mInvalidationRunnable = new InvalidationRunnable();
 
-    public static HomeConfigInvalidator getInstance() {
+    public static HomePanelsManager getInstance() {
         return sInstance;
     }
 
     public void init(Context context) {
         mContext = context;
         mHomeConfig = HomeConfig.getDefault(context);
 
         GeckoAppShell.getEventDispatcher().registerEventListener(EVENT_HOMEPANELS_INSTALL, this);
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -242,25 +242,25 @@ gbjar.sources += [
     'home/BrowserSearch.java',
     'home/DynamicPanel.java',
     'home/FadedTextView.java',
     'home/FramePanelLayout.java',
     'home/HistoryPanel.java',
     'home/HomeAdapter.java',
     'home/HomeBanner.java',
     'home/HomeConfig.java',
-    'home/HomeConfigInvalidator.java',
     'home/HomeConfigLoader.java',
     'home/HomeConfigPrefsBackend.java',
     'home/HomeContextMenuInfo.java',
     'home/HomeFragment.java',
     'home/HomeListView.java',
     'home/HomePager.java',
     'home/HomePagerTabStrip.java',
     'home/HomePanelPicker.java',
+    'home/HomePanelsManager.java',
     'home/LastTabsPanel.java',
     'home/MostRecentPanel.java',
     'home/MultiTypeCursorAdapter.java',
     'home/PanelAuthCache.java',
     'home/PanelAuthLayout.java',
     'home/PanelBackItemView.java',
     'home/PanelGridView.java',
     'home/PanelInfoManager.java',