Closed Bug 1500023 Opened 10 months ago Closed 9 months ago

updateSessionFile runs even when merely restoring activity

Categories

(Firefox for Android :: Session Restore, enhancement, P2)

Firefox 63
All
Android
enhancement

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: JanH, Assigned: JanH)

Details

Attachments

(1 file)

As long we have only one GeckoApp, https://dxr.mozilla.org/mozilla-central/rev/c291143e24019097d087f9307e59b49facaf90cb/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java#1205-1206 shouldn't run when we are merely restoring the activity (i.e. GeckoApp had already been active before in the same process).
Even if the GeckoApp activity is destroyed, the user's tabs remain open as long
as the app process itself isn't killed.
Therefore, for users who aren't automatically restoring their previous session's
tabs on startup, there's no point in renaming the current session store file so
it appears under "Recently closed" instead of being automatically restored,
unless we're really doing a cold startup (and hence mIsRestoringActivity is
false).
This also better matches what we do when we *are* automatically restoring tabs:
We only do it when !mIsRestoringActivity, too.
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/autoland/rev/d6d4324ac779
Only process previous session file once per app startup. r=nalexander
https://hg.mozilla.org/mozilla-central/rev/d6d4324ac779
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.