2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/11320 - Expose login autofill setting to beta dimension

This commit is contained in:
ekager 2020-07-01 22:52:46 -04:00 committed by Emily Kager
parent d8063bd72d
commit 1041a3ff71
3 changed files with 1 additions and 11 deletions

View File

@ -10,7 +10,6 @@ import mozilla.components.concept.storage.LoginsStorage
import mozilla.components.lib.crash.handler.CrashHandlerService
import mozilla.components.service.sync.logins.GeckoLoginStorageDelegate
import org.mozilla.fenix.Config
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.utils.Settings
import org.mozilla.geckoview.GeckoRuntime
import org.mozilla.geckoview.GeckoRuntimeSettings
@ -56,11 +55,7 @@ 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().shouldPromptToSaveLogins }
)
val loginStorageDelegate = GeckoLoginStorageDelegate(storage, { true })
geckoRuntime.loginStorageDelegate = GeckoLoginDelegateWrapper(loginStorageDelegate)
return geckoRuntime

View File

@ -30,7 +30,6 @@ import mozilla.components.concept.sync.AuthType
import mozilla.components.concept.sync.OAuthAccount
import mozilla.components.service.fxa.SyncEngine
import mozilla.components.service.fxa.manager.SyncEnginesStorage
import org.mozilla.fenix.Config
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components
@ -111,9 +110,6 @@ class SavedLoginsAuthFragment : PreferenceFragmentCompat(), AccountObserver {
}
requirePreference<SwitchPreference>(R.string.pref_key_autofill_logins).apply {
// The ability to toggle autofill on the engine is only available in Nightly currently
// See https://github.com/mozilla-mobile/fenix/issues/11320
isVisible = Config.channel.isNightlyOrDebug
isChecked = context.settings().shouldAutofillLogins
onPreferenceChangeListener = object : SharedPreferenceUpdater() {
override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean {

View File

@ -11,7 +11,6 @@
android:title="@string/preferences_passwords_save_logins" />
<SwitchPreference
app:iconSpaceReserved="false"
app:isPreferenceVisible="false"
android:defaultValue="true"
android:key="@string/pref_key_autofill_logins"
android:title="@string/preferences_passwords_autofill" />