Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mobile/android/base/java/org/mozilla/gecko/BrowserApp.java

Issue 29657633: Issue 6188 - Add-ons option is being shown (Closed)
Patch Set: Created Jan. 5, 2018, 8:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public 2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko; 6 package org.mozilla.gecko;
7 7
8 import android.Manifest; 8 import android.Manifest;
9 import android.annotation.TargetApi; 9 import android.annotation.TargetApi;
10 import android.app.DownloadManager; 10 import android.app.DownloadManager;
(...skipping 3699 matching lines...) Expand 10 before | Expand all | Expand 10 after
3710 } 3710 }
3711 3711
3712 if (SwitchBoard.isInExperiment(this, Experiments.TOP_ADDONS_MENU)) { 3712 if (SwitchBoard.isInExperiment(this, Experiments.TOP_ADDONS_MENU)) {
3713 MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, true); 3713 MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, true);
3714 MenuUtils.safeSetVisible(aMenu, R.id.addons, false); 3714 MenuUtils.safeSetVisible(aMenu, R.id.addons, false);
3715 } else { 3715 } else {
3716 MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, false); 3716 MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, false);
3717 MenuUtils.safeSetVisible(aMenu, R.id.addons, true); 3717 MenuUtils.safeSetVisible(aMenu, R.id.addons, true);
3718 } 3718 }
3719 3719
3720 if (!Restrictions.isAllowed(this, Restrictable.INSTALL_EXTENSION)) { 3720 // Always hiding add-ons. See https://issues.adblockplus.org/ticket/6188
3721 if (true) {
3721 MenuUtils.safeSetVisible(aMenu, R.id.addons, false); 3722 MenuUtils.safeSetVisible(aMenu, R.id.addons, false);
3722 MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, false); 3723 MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, false);
3723 } 3724 }
3724 3725
3725 // Hide panel menu items if the panels themselves are hidden. 3726 // Hide panel menu items if the panels themselves are hidden.
3726 // If we don't know whether the panels are hidden, just show the menu it ems. 3727 // If we don't know whether the panels are hidden, just show the menu it ems.
3727 bookmarksList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_BOOKMARKS_ PANEL_ENABLED, true)); 3728 bookmarksList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_BOOKMARKS_ PANEL_ENABLED, true));
3728 historyList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_HISTORY_PANE L_ENABLED, true)); 3729 historyList.setVisible(prefs.getBoolean(HomeConfig.PREF_KEY_HISTORY_PANE L_ENABLED, true));
3729 3730
3730 return true; 3731 return true;
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
4368 } else { 4369 } else {
4369 new EditBookmarkDialog(this).show(pageUrl); 4370 new EditBookmarkDialog(this).show(pageUrl);
4370 } 4371 }
4371 } 4372 }
4372 4373
4373 @Override 4374 @Override
4374 public void onEditBookmark(@NonNull Bundle bundle) { 4375 public void onEditBookmark(@NonNull Bundle bundle) {
4375 new EditBookmarkTask(this, bundle).execute(); 4376 new EditBookmarkTask(this, bundle).execute();
4376 } 4377 }
4377 } 4378 }
OLDNEW

Powered by Google App Engine
This is Rietveld