|
|
|
@ -9,6 +9,7 @@ import androidx.preference.Preference
|
|
|
|
|
import androidx.preference.PreferenceFragmentCompat
|
|
|
|
|
import com.leanplum.Leanplum
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.ext.requireComponents
|
|
|
|
|
import org.mozilla.fenix.ext.showToolbar
|
|
|
|
|
|
|
|
|
|
class SecretDebugSettingsFragment : PreferenceFragmentCompat() {
|
|
|
|
@ -21,6 +22,8 @@ class SecretDebugSettingsFragment : PreferenceFragmentCompat() {
|
|
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
|
|
|
|
setPreferencesFromResource(R.xml.secret_info_settings_preferences, rootKey)
|
|
|
|
|
|
|
|
|
|
val store = requireComponents.core.store
|
|
|
|
|
|
|
|
|
|
requirePreference<Preference>(R.string.pref_key_leanplum_user_id).apply {
|
|
|
|
|
summary = Leanplum.getUserId().let {
|
|
|
|
|
if (it.isNullOrEmpty()) {
|
|
|
|
@ -40,5 +43,13 @@ class SecretDebugSettingsFragment : PreferenceFragmentCompat() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
requirePreference<Preference>(R.string.pref_key_search_region_home).apply {
|
|
|
|
|
summary = store.state.search.region?.home ?: "Unknown"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
requirePreference<Preference>(R.string.pref_key_search_region_current).apply {
|
|
|
|
|
summary = store.state.search.region?.current ?: "Unknown"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|