Bug 1269682 - Don't try to switch to guest profile; r=margaret
authorJim Chen <nchen@mozilla.com>
Mon, 09 May 2016 22:31:18 -0400
changeset 365168 710f4c21891e81e0363eca32b412980951d38116
parent 365167 ba36438e7258b37e6a3d2552393ec1a2018e2ddb
child 365169 fe2780a12fd33798a2bdce62497bc175f054418e
push id17650
push usermartin.thomson@gmail.com
push dateTue, 10 May 2016 05:06:10 +0000
reviewersmargaret
bugs1269682
milestone49.0a1
Bug 1269682 - Don't try to switch to guest profile; r=margaret BrowserApp has a snippet that tries to restart in guest profile if we're supposed to be in it, but are currently not. This is vestigial code from lock screen widget support, and should not be needed anymore.
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
@@ -993,27 +993,16 @@ public class BrowserApp extends GeckoApp
 
     @Override
     public void onResume() {
         super.onResume();
 
         // Needed for Adjust to get accurate session measurements
         AdjustConstants.getAdjustHelper().onResume();
 
-        final String args = ContextUtils.getStringExtra(getIntent(), "args");
-        // If an external intent tries to start Fennec in guest mode, and it's not already
-        // in guest mode, this will change modes before opening the url.
-        // NOTE: OnResume is called twice sometimes when showing on the lock screen.
-        final boolean enableGuestSession = GuestSession.shouldUse(this, args);
-        final boolean inGuestSession = GeckoProfile.get(this).inGuestMode();
-        if (enableGuestSession != inGuestSession) {
-            doRestart(getIntent());
-            return;
-        }
-
         if (!mHasResumed) {
             EventDispatcher.getInstance().unregisterGeckoThreadListener((GeckoEventListener) this,
                     "Prompt:ShowTop");
             mHasResumed = true;
         }
 
         processTabQueue();