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 is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
The Tor Project
Applications
fenix
Commits
be57d067
Unverified
Commit
be57d067
authored
Oct 14, 2020
by
Matthew Finkel
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Bug 40026: Integrate Security Level settings
Bug 40082: Use Security Level preference at startup
parent
268e56f4
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!43
Bug 40053 00
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/org/mozilla/fenix/components/Core.kt
+2
-1
2 additions, 1 deletion
app/src/main/java/org/mozilla/fenix/components/Core.kt
app/src/main/java/org/mozilla/fenix/utils/Settings.kt
+28
-0
28 additions, 0 deletions
app/src/main/java/org/mozilla/fenix/utils/Settings.kt
with
30 additions
and
1 deletion
app/src/main/java/org/mozilla/fenix/components/Core.kt
+
2
−
1
View file @
be57d067
...
...
@@ -92,7 +92,8 @@ class Core(private val context: Context, private val crashReporter: CrashReporti
fontInflationEnabled
=
context
.
settings
().
shouldUseAutoSize
,
suspendMediaWhenInactive
=
false
,
forceUserScalableContent
=
context
.
settings
().
forceEnableZoom
,
loginAutofillEnabled
=
context
.
settings
().
shouldAutofillLogins
loginAutofillEnabled
=
context
.
settings
().
shouldAutofillLogins
,
torSecurityLevel
=
context
.
settings
().
torSecurityLevel
().
intRepresentation
)
GeckoEngine
(
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/org/mozilla/fenix/utils/Settings.kt
+
28
−
0
View file @
be57d067
...
...
@@ -40,6 +40,7 @@ import org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataOnQuitTyp
import
org.mozilla.fenix.settings.logins.SavedLoginsSortingStrategyMenu
import
org.mozilla.fenix.settings.logins.SortingStrategy
import
org.mozilla.fenix.settings.registerOnSharedPreferenceChangeListener
import
org.mozilla.fenix.tor.SecurityLevel
import
java.security.InvalidParameterException
private
const
val
AUTOPLAY_USER_SETTING
=
"AUTOPLAY_USER_SETTING"
...
...
@@ -176,6 +177,33 @@ class Settings(private val appContext: Context) : PreferencesHolder {
true
)
var
standardSecurityLevel
by
booleanPreference
(
appContext
.
getPreferenceKey
(
SecurityLevel
.
STANDARD
.
preferenceKey
),
default
=
true
)
var
saferSecurityLevel
by
booleanPreference
(
appContext
.
getPreferenceKey
(
SecurityLevel
.
SAFER
.
preferenceKey
),
default
=
false
)
var
safestSecurityLevel
by
booleanPreference
(
appContext
.
getPreferenceKey
(
SecurityLevel
.
SAFEST
.
preferenceKey
),
default
=
false
)
// torSecurityLevel is defined as the first |true| preference,
// beginning at the safest level.
// If multiple preferences are true, then that is a bug and the
// highest |true| security level is chosen.
// Standard is the default level.
fun
torSecurityLevel
():
SecurityLevel
=
when
{
safestSecurityLevel
->
SecurityLevel
.
SAFEST
saferSecurityLevel
->
SecurityLevel
.
SAFER
standardSecurityLevel
->
SecurityLevel
.
STANDARD
else
->
SecurityLevel
.
STANDARD
}
// If any of the prefs have been modified, quit displaying the fenix moved tip
fun
shouldDisplayFenixMovingTip
():
Boolean
=
preferences
.
getBoolean
(
...
...
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