Bug 1536866 - Hide enter guest session option from the menu. r=petru a=pascalc
authorVlad Baicu <vlad.baicu@softvision.ro>
Fri, 22 Mar 2019 06:51:51 +0000
changeset 525751 affaab9df5b77f8ff5571748e149d39dfa25e27c
parent 525750 5565a1128640e9a736a42683012506b02ec2cb5b
child 525752 7b34fc9165b9047186a4bf940d8028aaf0281f3f
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspetru, pascalc
bugs1536866
milestone67.0
Bug 1536866 - Hide enter guest session option from the menu. r=petru a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D24212
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -3422,20 +3422,22 @@ public class BrowserApp extends GeckoApp
 
         // Disable find in page and view source for about:home, since it won't work on Java content.
         final boolean notInAboutHome = !isAboutHome(tab);
         findInPage.setEnabled(notInAboutHome);
         viewPageSource.setEnabled(notInAboutHome);
 
         charEncoding.setVisible(GeckoPreferences.getCharEncodingState());
 
+        // Bug - 1536866. We are hiding the enter guest mode option but we need to leave the exit option available
+        // for users that are currently using it.
         if (getProfile().inGuestMode()) {
             exitGuestMode.setVisible(true);
         } else {
-            enterGuestMode.setVisible(true);
+            enterGuestMode.setVisible(false);
         }
 
         if (!Restrictions.isAllowed(this, Restrictable.GUEST_BROWSING)) {
             MenuUtils.safeSetVisible(aMenu, R.id.new_guest_session, false);
         }
 
         if (SwitchBoard.isInExperiment(this, Experiments.TOP_ADDONS_MENU)) {
             MenuUtils.safeSetVisible(aMenu, R.id.addons_top_level, true);