Bug 1257513 - Remove bookmark-history-menu experiment, show menu items by default. r=liuche
MozReview-Commit-ID: 9mT8eOABokH
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -3408,26 +3408,21 @@ public class BrowserApp extends GeckoApp
if (!Restrictions.isAllowed(this, Restrictable.GUEST_BROWSING)) {
MenuUtils.safeSetVisible(aMenu, R.id.new_guest_session, false);
}
if (!Restrictions.isAllowed(this, Restrictable.INSTALL_EXTENSION)) {
MenuUtils.safeSetVisible(aMenu, R.id.addons, false);
}
- if (!SwitchBoard.isInExperiment(this, Experiments.BOOKMARKS_HISTORY_MENU)) {
- bookmarksList.setVisible(false);
- historyList.setVisible(false);
- } else {
- // Hide panel menu items if the panels themselves are hidden.
- // If we don't know whether the panels are hidden, just show the menu items.
- final SharedPreferences prefs = GeckoSharedPrefs.forProfile(getContext());
- bookmarksList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_BOOKMARKS_PANEL_ENABLED, true));
- historyList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_HISTORY_PANEL_ENABLED, true));
- }
+ // Hide panel menu items if the panels themselves are hidden.
+ // If we don't know whether the panels are hidden, just show the menu items.
+ final SharedPreferences prefs = GeckoSharedPrefs.forProfile(getContext());
+ bookmarksList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_BOOKMARKS_PANEL_ENABLED, true));
+ historyList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_HISTORY_PANEL_ENABLED, true));
return true;
}
private int resolveBookmarkIconID(final boolean isBookmark) {
if (isBookmark) {
return R.drawable.star_blue;
} else {
@@ -3525,24 +3520,22 @@ public class BrowserApp extends GeckoApp
if (tab != null)
tab.doForward();
return true;
}
if (itemId == R.id.bookmarks_list) {
final String url = AboutPages.getURLForBuiltinPanelType(PanelType.BOOKMARKS);
Tabs.getInstance().loadUrl(url);
- Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.BOOKMARKS_HISTORY_MENU);
return true;
}
if (itemId == R.id.history_list) {
final String url = AboutPages.getURLForBuiltinPanelType(PanelType.HISTORY);
Tabs.getInstance().loadUrl(url);
- Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.BOOKMARKS_HISTORY_MENU);
return true;
}
if (itemId == R.id.save_as_pdf) {
Telemetry.sendUIEvent(TelemetryContract.Event.SAVE, TelemetryContract.Method.MENU, "pdf");
GeckoAppShell.notifyObservers("SaveAs:PDF", null);
return true;
}
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomePager.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomePager.java
@@ -523,12 +523,11 @@ public class HomePager extends ViewPager
/**
* Stop the current panel telemetry session if one exists.
*/
private void stopCurrentPanelTelemetrySession() {
if (mCurrentPanelSession != null) {
Telemetry.stopUISession(mCurrentPanelSession, mCurrentPanelSessionSuffix);
mCurrentPanelSession = null;
mCurrentPanelSessionSuffix = null;
- Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.BOOKMARKS_HISTORY_MENU);
}
}
}
--- a/mobile/android/base/java/org/mozilla/gecko/util/Experiments.java
+++ b/mobile/android/base/java/org/mozilla/gecko/util/Experiments.java
@@ -17,19 +17,16 @@ import java.util.List;
/**
* This class should reflect the experiment names found in the Switchboard experiments config here:
* https://github.com/mozilla-services/switchboard-experiments
*/
public class Experiments {
private static final String LOGTAG = "GeckoExperiments";
- // Display History and Bookmarks in 3-dot menu.
- public static final String BOOKMARKS_HISTORY_MENU = "bookmark-history-menu";
-
// Show search mode (instead of home panels) when tapping on urlbar if there is a search term in the urlbar.
public static final String SEARCH_TERM = "search-term";
// Show a system notification linking to a "What's New" page on app update.
public static final String WHATSNEW_NOTIFICATION = "whatsnew-notification";
// Subscribe to known, bookmarked sites and show a notification if new content is available.
public static final String CONTENT_NOTIFICATIONS_12HRS = "content-notifications-12hrs";