For #658: Adds your rights page link
parent
09588dfda6
commit
36f4b97712
|
@ -37,7 +37,7 @@ import org.mozilla.fenix.R.string.pref_key_help
|
||||||
import org.mozilla.fenix.R.string.pref_key_language
|
import org.mozilla.fenix.R.string.pref_key_language
|
||||||
import org.mozilla.fenix.R.string.pref_key_leakcanary
|
import org.mozilla.fenix.R.string.pref_key_leakcanary
|
||||||
import org.mozilla.fenix.R.string.pref_key_make_default_browser
|
import org.mozilla.fenix.R.string.pref_key_make_default_browser
|
||||||
import org.mozilla.fenix.R.string.pref_key_privacy_policy
|
import org.mozilla.fenix.R.string.pref_key_privacy_notice
|
||||||
import org.mozilla.fenix.R.string.pref_key_rate
|
import org.mozilla.fenix.R.string.pref_key_rate
|
||||||
import org.mozilla.fenix.R.string.pref_key_remote_debugging
|
import org.mozilla.fenix.R.string.pref_key_remote_debugging
|
||||||
import org.mozilla.fenix.R.string.pref_key_search_engine_settings
|
import org.mozilla.fenix.R.string.pref_key_search_engine_settings
|
||||||
|
@ -45,6 +45,7 @@ import org.mozilla.fenix.R.string.pref_key_sign_in
|
||||||
import org.mozilla.fenix.R.string.pref_key_site_permissions
|
import org.mozilla.fenix.R.string.pref_key_site_permissions
|
||||||
import org.mozilla.fenix.R.string.pref_key_theme
|
import org.mozilla.fenix.R.string.pref_key_theme
|
||||||
import org.mozilla.fenix.R.string.pref_key_tracking_protection_settings
|
import org.mozilla.fenix.R.string.pref_key_tracking_protection_settings
|
||||||
|
import org.mozilla.fenix.R.string.pref_key_your_rights
|
||||||
import org.mozilla.fenix.components.metrics.Event
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.getPreferenceKey
|
import org.mozilla.fenix.ext.getPreferenceKey
|
||||||
|
@ -163,12 +164,21 @@ class SettingsFragment : PreferenceFragmentCompat(), CoroutineScope, AccountObse
|
||||||
resources.getString(pref_key_theme) -> {
|
resources.getString(pref_key_theme) -> {
|
||||||
navigateToThemeSettings()
|
navigateToThemeSettings()
|
||||||
}
|
}
|
||||||
resources.getString(pref_key_privacy_policy) -> {
|
resources.getString(pref_key_privacy_notice) -> {
|
||||||
requireContext().apply {
|
requireContext().apply {
|
||||||
val intent = SupportUtils.createCustomTabIntent(this, SupportUtils.PRIVACY_NOTICE_URL)
|
val intent = SupportUtils.createCustomTabIntent(this, SupportUtils.PRIVACY_NOTICE_URL)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
resources.getString(pref_key_your_rights) -> {
|
||||||
|
requireContext().apply {
|
||||||
|
val intent = SupportUtils.createCustomTabIntent(
|
||||||
|
this,
|
||||||
|
SupportUtils.getSumoURLForTopic(context!!, SupportUtils.SumoTopic.YOUR_RIGHTS)
|
||||||
|
)
|
||||||
|
startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.onPreferenceTreeClick(preference)
|
return super.onPreferenceTreeClick(preference)
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@ object SupportUtils {
|
||||||
internal val topicStr: String
|
internal val topicStr: String
|
||||||
) {
|
) {
|
||||||
HELP("firefox-android-help"),
|
HELP("firefox-android-help"),
|
||||||
PRIVATE_BROWSING_MYTHS("common-myths-about-private-browsing")
|
PRIVATE_BROWSING_MYTHS("common-myths-about-private-browsing"),
|
||||||
|
YOUR_RIGHTS("your-rights")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getSumoURLForTopic(context: Context, topic: SumoTopic): String {
|
fun getSumoURLForTopic(context: Context, topic: SumoTopic): String {
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
<string name="pref_key_rate" translatable="false">pref_key_rate</string>
|
<string name="pref_key_rate" translatable="false">pref_key_rate</string>
|
||||||
<string name="pref_key_feedback" translatable="false">pref_key_feedback</string>
|
<string name="pref_key_feedback" translatable="false">pref_key_feedback</string>
|
||||||
<string name="pref_key_about" translatable="false">pref_key_about</string>
|
<string name="pref_key_about" translatable="false">pref_key_about</string>
|
||||||
<string name="pref_key_privacy_policy" translatable="false">pref_key_privacy_policy</string>
|
<string name="pref_key_privacy_notice" translatable="false">pref_key_privacy_notice</string>
|
||||||
|
<string name="pref_key_your_rights" translatable="false">pref_key_your_rights</string>
|
||||||
<string name="pref_key_account" translatable="false">pref_key_account</string>
|
<string name="pref_key_account" translatable="false">pref_key_account</string>
|
||||||
<string name="pref_key_sign_in" translatable="false">pref_key_sign_in</string>
|
<string name="pref_key_sign_in" translatable="false">pref_key_sign_in</string>
|
||||||
<string name="pref_key_private_mode" translatable="false">pref_key_private_mode</string>
|
<string name="pref_key_private_mode" translatable="false">pref_key_private_mode</string>
|
||||||
|
|
|
@ -101,8 +101,10 @@
|
||||||
<!-- Preference linking to about page for Fenix
|
<!-- Preference linking to about page for Fenix
|
||||||
The first parameter is the name of the app defined in app_name (for example: Fenix) -->
|
The first parameter is the name of the app defined in app_name (for example: Fenix) -->
|
||||||
<string name="preferences_about">About %1$s</string>
|
<string name="preferences_about">About %1$s</string>
|
||||||
<!-- Preference linking to the privacy policy -->
|
<!-- Preference linking to the privacy notice -->
|
||||||
<string name="preferences_privacy_policy">Privacy Policy</string>
|
<string name="preferences_privacy_notice">Privacy Notice</string>
|
||||||
|
<!-- Preference linking to the your rights SUMO page -->
|
||||||
|
<string name="preferences_your_rights">Your Rights</string>
|
||||||
<!-- Preference for settings related to saved passwords -->
|
<!-- Preference for settings related to saved passwords -->
|
||||||
<string name="preferences_passwords">Passwords</string>
|
<string name="preferences_passwords">Passwords</string>
|
||||||
<!-- Preference for settings related to saved credit cards and addresses -->
|
<!-- Preference for settings related to saved credit cards and addresses -->
|
||||||
|
|
|
@ -98,7 +98,11 @@
|
||||||
android:title="@string/preferences_about" />
|
android:title="@string/preferences_about" />
|
||||||
<androidx.preference.Preference
|
<androidx.preference.Preference
|
||||||
android:icon="@drawable/ic_info"
|
android:icon="@drawable/ic_info"
|
||||||
android:key="@string/pref_key_privacy_policy"
|
android:key="@string/pref_key_privacy_notice"
|
||||||
android:title="@string/preferences_privacy_policy" />
|
android:title="@string/preferences_privacy_notice" />
|
||||||
|
<androidx.preference.Preference
|
||||||
|
android:icon="@drawable/ic_info"
|
||||||
|
android:key="@string/pref_key_your_rights"
|
||||||
|
android:title="@string/preferences_your_rights" />
|
||||||
</androidx.preference.PreferenceCategory>
|
</androidx.preference.PreferenceCategory>
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue