Skip to content

Draft: Bug 40068: Tor Service closes when changing theme

Now we do not stop tor when the activity is destroyed because that may happen when the Activity is being recreated. Therefore, we track when the app is being recreated using a new isBeingRecreated flag. In the case where isBeingRecreated is true, we don't reset it as false because the Activity instance is (or should be) destroyed immediately after onDestroy returns and a new Activity instance is created. In the case where isBeingRecreated is false, we finish all Activities in this app (finishAffinity) and then we let the Application (FenixApplication) terminate itself.

I am sure there must be a cleaner way of accomplishing this, but this seems to work well enough.

Closes #40068 (closed)

Merge request reports

Loading