|
|
|
@ -27,6 +27,7 @@ import mozilla.components.concept.sync.AccountObserver
|
|
|
|
|
import mozilla.components.concept.sync.AuthType
|
|
|
|
|
import mozilla.components.concept.sync.OAuthAccount
|
|
|
|
|
import mozilla.components.concept.sync.Profile
|
|
|
|
|
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
|
|
|
|
import org.mozilla.fenix.BrowserDirection
|
|
|
|
|
import org.mozilla.fenix.Config
|
|
|
|
|
import org.mozilla.fenix.FeatureFlags
|
|
|
|
@ -312,6 +313,8 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|
|
|
|
private fun setupPreferences() {
|
|
|
|
|
val leakKey = getPreferenceKey(R.string.pref_key_leakcanary)
|
|
|
|
|
val debuggingKey = getPreferenceKey(R.string.pref_key_remote_debugging)
|
|
|
|
|
val preferencePrivateBrowsing =
|
|
|
|
|
requirePreference<Preference>(R.string.pref_key_private_browsing)
|
|
|
|
|
val preferenceExternalDownloadManager =
|
|
|
|
|
requirePreference<Preference>(R.string.pref_key_external_download_manager)
|
|
|
|
|
val preferenceLeakCanary = findPreference<Preference>(leakKey)
|
|
|
|
@ -319,6 +322,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|
|
|
|
val preferenceMakeDefaultBrowser =
|
|
|
|
|
requirePreference<Preference>(R.string.pref_key_make_default_browser)
|
|
|
|
|
|
|
|
|
|
preferencePrivateBrowsing.icon.mutate().apply {
|
|
|
|
|
setTint(requireContext().getColorFromAttr(R.attr.primaryText))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!Config.channel.isReleased) {
|
|
|
|
|
preferenceLeakCanary?.setOnPreferenceChangeListener { _, newValue ->
|
|
|
|
|
val isEnabled = newValue == true
|
|
|
|
|