The Program Monitor widget on my Samsung Vibrant says, "using the 'Back' key is recommended to end running applications." And other apps I use (Google Maps, Twidroyd Pro, etc.) all quit when I press the Back key in them and there isn't an application-specific handler for that keypress (like going from a map to the "directions" page that produced it in Google Maps). But Fennec stays running. This behavior seems like some kind of default (although it's unclear whether it's an explicit part of Android application specifications or a convention), and Fennec should probably behave in the same way, quitting when there is no page in history to return to (or other Fennec-specific action to take) when you press the Back key. Note: Fennec does correctly return me to the home screen when there isn't a Fennec-specific handler for the Back key press. It just doesn't quit. Steps to Reproduce: 1. start Fennec; 2. press the Back key. Expected Results: the phone returns to the home screen, and Fennec is no longer running. Actual Results: the phone returns to the home screen, but Fennec is still running (according to the Program Monitor widget).
Note that Fennec's behavior here matches the stock Android "Browser" app.
Actually, the gmail and stock browser apps shutdown when the back key is pressed and minimize when the home key is pressed. meanwhile, fennec does the opposite on my Vibrant.
this is OS behavior
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
Brad: can you elaborate? The behavior of Fennec in this case is very much the opposite of the behavior of all other applications on my phone, including both stock applications and those I installed from the Android market, so I don't understand how it is "OS behavior". But perhaps I just misunderstand. What do you mean by that?
Applications on Android have the option to quit or not when the back button is pressed. The stock browser does not quit on "Back", at least on my T-Mobile G2 running Android 2.2. If I launch it from the home screen and then press "Back" it is still running. I can verify this by running "ps" at the shell, or by typing into the textbox on the browser's home page (www.google.com) before pressing "Back" and verifying that the typed text is still there when the browser reappears. One reason that we don't want to exit Fennec when pressing "Back" is that Fennec has expensive startup costs that we can avoid by keeping it running in the background. Running in the background shouldn't make a difference to users - Fennec uses close to zero CPU or battery when in the background, and the OS will kill it automatically if the RAM it uses is needed by another process.
By the way, if you install "Quit Fennec" extension, then Fennec will exit automatically when you press "Back" *if* there is only one tab open, and that tab was opened by another application: https://addons.mozilla.org/en-US/mobile/addon/221517/ (That last condition is an effect of bug 598533, which also has more info about back button behavior in Fennec and the default Android browser.)
Ok, fair enough. FWIW, the stock browser ("Web") does sometimes quit on Back on my Samsung Vibrant running Android 2.1-update1, although other times (multiple windows open?) it doesn't.
(In reply to comment #4) > Brad: can you elaborate? The behavior of Fennec in this case is very much the > opposite of the behavior of all other applications on my phone, including both > stock applications and those I installed from the Android market, so I don't > understand how it is "OS behavior". But perhaps I just misunderstand. What do > you mean by that? On android an application continues to run until the OS runs out of resources and tries to recover them by killing your app off. You can explicitly exit, but as Matt points out then we pay the cost of start up every time and loose our state. Also, as Matt pointed out, if you run ps you can both gmail (com.google.android.gm) and the stock browser (com.android.browser) stick around after you hit the back button.
You need to log in before you can comment on or make changes to this bug.