gecko-dev/mobile/android/base
Andrzej Hunt 68b1cebd29 Bug 1120441 - Don't try to show tab-history panel if app has been shutdown r=sebastian
Showing the tab history panel involves a gecko call to retrieve tab history. This
can be slow, meaning we have no idea what state the app will be in when the tab
history data is returned. Thus we need to protect the code that shows the tab
history fragment against a number of scenarios to avoid crashes in those cases
where the app might be shutting down:

1. If onSaveInstanceState() has been called (which might happen before or after onPause(),
   and might be linked to app shutdown - but the docs don't appear to give any guarantees),
   fragment transactions cannot be performed. We protect against this by accepting loss
   of state in fragment transactions.
2. If the Activity has been completely destroyed, trying to perform a fragment transaction
   will likewise fail. We protect against this by not even trying to perform the transaction
   if we definitively know that the Activity is being shut down (ie isFinishing()).

In both of these cases, we simply must accept that we're potentially losing UI state: i.e.
a user could request the tab history panel via long-back-press, followed by exiting the app;
we now end up never ever showing the panel. This scenario doesn't seem like a major loss - and
fixing this issue properly would require significant investment (i.e. we would need to either
cache tab history on frontend side, or cache the tab-history panel request - and it's not clear
users will still care about seeing the panel the next time they open firefox).

MozReview-Commit-ID: JsAK1By8yqn

--HG--
extra : rebase_source : 9a3b64d2829a969e4de2775c2714874aa8708031
2017-01-18 22:09:20 +01:00
..
aidl/org/mozilla/gecko/media Bug 1324530 - part 3: make codec methods that change state(start, stop, flush, release) synchronous. r=snorp 2016-12-23 16:25:43 +08:00
crashreporter/res
java/org/mozilla/gecko Bug 1120441 - Don't try to show tab-history panel if app has been shutdown r=sebastian 2017-01-18 22:09:20 +01:00
locales Bug 1325264 - Update wording of 'disconnect from sync' dialog. r=Grisha 2017-01-27 18:11:44 +01:00
resources Bug 1311555 - Use filled bookmark star in ActivityStream context menu r=sebastian 2017-01-18 12:20:50 +01:00
adjust-sdk-sandbox.token Bug 1277407 - Add Adjust sandbox keyfile to tree. r=sebastian 2016-06-03 16:55:51 -07:00
AdjustConstants.java.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
android-services.mozbuild Bug 730142 - Download batching. r=Grisha,rnewman 2016-09-30 09:33:08 -07:00
AndroidManifest.xml.in Bug 1314466 - part 6, Add new files to build r=nalexander 2016-11-14 16:45:23 -08:00
AppConstants.java.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
FennecManifest_permissions.xml.in Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
GcmAndroidManifest_permissions.xml.in
GcmAndroidManifest_services.xml.in
geckoview.ddf Bug 1310027 - Remove DOM/mobilemessage and related code. r=Ehsan 2016-10-17 17:26:51 -07:00
generate_build_config.py Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
Makefile.in Bug 1291366 - Part 1: Use GENERATED_FILES to produce AppConstants.java. r=gps 2016-11-14 20:06:31 -08:00
moz.build Bug 1328837 - Move 'Switchboard' code into our module/package. Refactored SwitchBoard component to pull it into the app module. r=sebastian 2017-01-28 16:26:13 -05:00
package-name.txt.in
strings.xml.in Bug 1333589 - 1. Use GeckoBundle for DoorHanger.OnButtonClickListener; r=sebastian 2017-01-25 18:57:31 -05:00