Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fenix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
The Tor Project
Applications
fenix
Commits
e7ca4137
Unverified
Commit
e7ca4137
authored
Oct 23, 2020
by
Matthew Finkel
Browse files
Options
Downloads
Plain Diff
Merge branch 'bug_40068_01' into tor-browser-82.0.0b4-10.0-1
parents
8c969c0c
a061d49c
Branches
Branches containing commit
No related tags found
1 merge request
!49
fixup! Bug 40028: Integrate Tor Controller into HomeFragment
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
+12
-0
12 additions, 0 deletions
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
app/src/main/java/org/mozilla/fenix/HomeActivity.kt
+12
-4
12 additions, 4 deletions
app/src/main/java/org/mozilla/fenix/HomeActivity.kt
with
24 additions
and
4 deletions
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
+
12
−
0
View file @
e7ca4137
...
...
@@ -67,6 +67,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
private
val
logger
=
Logger
(
"FenixApplication"
)
var
terminating
=
false
open
val
components
by
lazy
{
Components
(
this
)
}
var
visibilityLifecycleCallback
:
VisibilityLifecycleCallback
?
=
null
...
...
@@ -96,9 +98,19 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
setupInMainProcessOnly
()
}
fun
isTerminating
()
=
terminating
fun
terminate
()
{
onTerminate
()
System
.
exit
(
0
)
}
override
fun
onTerminate
()
{
terminating
=
true
super
.
onTerminate
()
components
.
torController
.
stop
()
components
.
torController
.
stopTor
()
}
protected
open
fun
initializeGlean
()
{
...
...
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/org/mozilla/fenix/HomeActivity.kt
+
12
−
4
View file @
e7ca4137
...
...
@@ -131,6 +131,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
private
var
isToolbarInflated
=
false
private
var
isBeingRecreated
=
false
private
val
webExtensionPopupFeature
by
lazy
{
WebExtensionPopupFeature
(
components
.
core
.
store
,
::
openPopup
)
}
...
...
@@ -362,10 +364,14 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
)
privateNotificationObserver
?.
stop
()
components
.
torController
.
stopTor
()
// Explicitly change our internal state because the status broadcast from tor-android-service may
// arrive after we unregister the broadcast listener when the app is exiting.
components
.
torController
.
setTorStopped
()
if
(!
isBeingRecreated
&&
!(
application
as
FenixApplication
).
isTerminating
())
{
// We assume the Activity is being destroyed because the user
// swiped away the app on the Recent screen. When this happens,
// we assume the user expects the entire Application is destroyed
// and not only the top Activity/Task. Therefore we kill the
// underlying Application, as well.
(
application
as
FenixApplication
).
terminate
()
}
}
override
fun
onConfigurationChanged
(
newConfig
:
Configuration
)
{
...
...
@@ -385,6 +391,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
message
=
"recreate()"
)
isBeingRecreated
=
true
super
.
recreate
()
}
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment