Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
fenix
Commits
667ebe31
Commit
667ebe31
authored
Mar 06, 2020
by
ekager
Committed by
Emily Kager
Mar 09, 2020
Browse files
For #8967 - Remove ability to pref login autofilling by itself
parent
320fc4e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt
View file @
667ebe31
...
...
@@ -64,9 +64,10 @@ object GeckoProvider {
}
val
geckoRuntime
=
GeckoRuntime
.
create
(
context
,
runtimeSettings
)
// As a quick fix for #8967 we are conflating "should autofill" with "should save logins"
val
loginStorageDelegate
=
GeckoLoginStorageDelegate
(
storage
,
{
context
.
settings
().
shouldAutofillLogins
&&
context
.
settings
().
shouldPromptToSaveLogins
}
{
context
.
settings
().
shouldPromptToSaveLogins
}
)
geckoRuntime
.
loginStorageDelegate
=
GeckoLoginDelegateWrapper
(
loginStorageDelegate
)
...
...
app/src/geckoNightly/java/org/mozilla/fenix/engine/GeckoProvider.kt
View file @
667ebe31
...
...
@@ -56,9 +56,10 @@ object GeckoProvider {
}
val
geckoRuntime
=
GeckoRuntime
.
create
(
context
,
runtimeSettings
)
// As a quick fix for #8967 we are conflating "should autofill" with "should save logins"
val
loginStorageDelegate
=
GeckoLoginStorageDelegate
(
storage
,
{
context
.
settings
().
shouldAutofillLogins
&&
context
.
settings
().
shouldPromptToSaveLogins
}
{
context
.
settings
().
shouldPromptToSaveLogins
}
)
geckoRuntime
.
loginStorageDelegate
=
GeckoLoginDelegateWrapper
(
loginStorageDelegate
)
...
...
app/src/main/java/org/mozilla/fenix/settings/logins/SaveLoginSettingFragment.kt
View file @
667ebe31
...
...
@@ -9,6 +9,7 @@ import androidx.preference.Preference
import
androidx.preference.PreferenceFragmentCompat
import
org.mozilla.fenix.R
import
org.mozilla.fenix.components.metrics.Event
import
org.mozilla.fenix.ext.components
import
org.mozilla.fenix.ext.metrics
import
org.mozilla.fenix.ext.showToolbar
import
org.mozilla.fenix.settings.RadioButtonPreference
...
...
@@ -39,6 +40,8 @@ class SaveLoginSettingFragment : PreferenceFragmentCompat() {
)
)
}
// We want to reload the current session here so we can try to fill the current page
context
?.
components
?.
useCases
?.
sessionUseCases
?.
reload
?.
invoke
()
return
super
.
onPreferenceChange
(
preference
,
newValue
)
}
}
...
...
@@ -57,6 +60,8 @@ class SaveLoginSettingFragment : PreferenceFragmentCompat() {
)
)
}
// We want to reload the current session here so we don't save any currently inserted login
context
?.
components
?.
useCases
?.
sessionUseCases
?.
reload
?.
invoke
()
return
super
.
onPreferenceChange
(
preference
,
newValue
)
}
}
...
...
app/src/main/res/xml/logins_preferences.xml
View file @
667ebe31
...
...
@@ -2,12 +2,14 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.preference.PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<androidx.preference.PreferenceScreen
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<androidx.preference.Preference
android:key=
"@string/pref_key_save_logins_settings"
android:summary=
"@string/preferences_passwords_save_logins_ask_to_save"
android:title=
"@string/preferences_passwords_save_logins"
/>
<SwitchPreference
app:isPreferenceVisible=
"false"
android:defaultValue=
"true"
android:key=
"@string/pref_key_autofill_logins"
android:title=
"@string/preferences_passwords_autofill"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment