Backed out changeset 46db039dbe10 (bug 1305439) for failing testAboutPage on Android. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 13 Oct 2016 22:16:53 +0200
changeset 317845 20754fd4499aedb03b7dfeeb5499c18bfbb1c497
parent 317844 3152577aab9bbac3410a57447003291371351c7b
child 317846 fe0cf76d660d8520993102c3b009f1dd67438a7a
push id82766
push userarchaeopteryx@coole-files.de
push dateThu, 13 Oct 2016 20:17:17 +0000
treeherdermozilla-inbound@20754fd4499a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1305439
milestone52.0a1
backs out46db039dbe102cf4529df8fe237b20455c3f154d
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
Backed out changeset 46db039dbe10 (bug 1305439) for failing testAboutPage on Android. r=backout
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -155,17 +155,16 @@ public abstract class GeckoApp
     public static final String PREFS_ALLOW_STATE_BUNDLE    = "allowStateBundle";
     public static final String PREFS_VERSION_CODE          = "versionCode";
     public static final String PREFS_WAS_STOPPED           = "wasStopped";
     public static final String PREFS_CRASHED_COUNT         = "crashedCount";
     public static final String PREFS_CLEANUP_TEMP_FILES    = "cleanupTempFiles";
 
     public static final String SAVED_STATE_IN_BACKGROUND   = "inBackground";
     public static final String SAVED_STATE_PRIVATE_SESSION = "privateSession";
-    public static final String SAVED_STATE_LAST_TAB        = "lastTab";
 
     // Delay before running one-time "cleanup" tasks that may be needed
     // after a version upgrade.
     private static final int CLEANUP_DEFERRAL_SECONDS = 15;
 
     private static boolean sAlreadyLoaded;
 
     protected RelativeLayout mRootLayout;
@@ -198,18 +197,16 @@ public abstract class GeckoApp
     private final HashMap<String, PowerManager.WakeLock> mWakeLocks = new HashMap<String, PowerManager.WakeLock>();
 
     protected boolean mLastSessionCrashed;
     protected boolean mShouldRestore;
     private boolean mSessionRestoreParsingFinished = false;
 
     private EventDispatcher eventDispatcher;
 
-    private Tab lastSelectedTab = null;
-
     private static final class LastSessionParser extends SessionParser {
         private JSONArray tabs;
         private JSONObject windowObject;
         private boolean isExternalURL;
 
         private boolean selectNextTab;
         private boolean tabsWereSkipped;
         private boolean tabsWereProcessed;
@@ -581,25 +578,16 @@ public abstract class GeckoApp
     }
 
     @Override
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
 
         outState.putBoolean(SAVED_STATE_IN_BACKGROUND, isApplicationInBackground());
         outState.putString(SAVED_STATE_PRIVATE_SESSION, mPrivateBrowsingSession);
-        outState.putInt(SAVED_STATE_LAST_TAB, lastSelectedTab.getId());
-    }
-
-    @Override
-    protected void onRestoreInstanceState(final Bundle state) {
-        super.onRestoreInstanceState(state);
-
-        final int tabId = state.getInt(SAVED_STATE_LAST_TAB);
-        Tabs.getInstance().selectTab(tabId);
     }
 
     public void addTab() { }
 
     public void addPrivateTab() { }
 
     public void showNormalTabs() { }
 
@@ -2087,20 +2075,16 @@ public abstract class GeckoApp
         // Undo whatever we did in onPause.
         super.onResume();
         if (mIsAbortingAppLaunch) {
             return;
         }
 
         GeckoAppShell.setGeckoInterface(this);
 
-        if (lastSelectedTab != null) {
-            Tabs.getInstance().selectTab(lastSelectedTab.getId());
-        }
-
         int newOrientation = getResources().getConfiguration().orientation;
         if (GeckoScreenOrientation.getInstance().update(newOrientation)) {
             refreshChrome();
         }
 
         if (mAppStateListeners != null) {
             for (GeckoAppShell.AppStateListener listener : mAppStateListeners) {
                 listener.onResume();
@@ -2165,18 +2149,16 @@ public abstract class GeckoApp
     @Override
     public void onPause()
     {
         if (mIsAbortingAppLaunch) {
             super.onPause();
             return;
         }
 
-        lastSelectedTab = Tabs.getInstance().getSelectedTab();
-
         final HealthRecorder rec = mHealthRecorder;
         final Context context = this;
 
         // In some way it's sad that Android will trigger StrictMode warnings
         // here as the whole point is to save to disk while the activity is not
         // interacting with the user.
         ThreadUtils.postToBackgroundThread(new Runnable() {
             @Override