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

Bug 1832006 - Add description of site permissions fragment

This commit is contained in:
rxu 2023-04-23 12:49:02 +08:00 committed by mergify[bot]
parent 00e3f01fd4
commit dd1531b08a
5 changed files with 19 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import androidx.preference.Preference
import androidx.preference.Preference.OnPreferenceClickListener
import androidx.preference.PreferenceFragmentCompat
import mozilla.components.service.glean.private.NoExtras
import org.mozilla.fenix.Config
import org.mozilla.fenix.GleanMetrics.Autoplay
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey
@ -23,6 +24,9 @@ class SitePermissionsFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.site_permissions_preferences, rootKey)
val preferenceDescription = requirePreference<Preference>(R.string.pref_key_site_permissions_description)
preferenceDescription.isVisible = Config.channel.isMozillaOnline
}
override fun onResume() {

View File

@ -44,5 +44,7 @@
<!-- Homescreen menu button -->
<!-- Browser menu button that opens the account setting page -->
<string name="browser_menu_manage_account_and_devices">管理账户和设备</string>
<string name="preferences_site_permissions_description">此页面为所有网站的默认权限设置;如您曾对特定网站进行权限调整,则此网站会出现在“例外网站”中。</string>
</resources>

View File

@ -43,4 +43,6 @@
<!-- Homescreen menu button -->
<!-- Browser menu button that opens the account setting page -->
<string name="browser_menu_manage_account_and_devices">Manage Account and Devices</string>
<string name="preferences_site_permissions_description">This page shows the default permission settings to all sites; If the permissions of any specific site have been modified, this site will be shown in "Exceptions".</string>
</resources>

View File

@ -109,6 +109,7 @@
<string name="pref_key_enable_autocomplete_urls" translatable="false">pref_key_enable_domain_autocomplete</string>
<!-- Site Permissions Settings -->
<string name="pref_key_site_permissions_description" translatable="false">pref_key_site_permissions_description</string>
<string name="pref_key_show_site_exceptions" translatable="false">pref_key_show_site_exceptions</string>
<string name="pref_key_browser_feature_autoplay_v2" translatable="false">pref_key_browser_feature_autoplay_v2</string>
<string name="pref_key_browser_feature_autoplay_audible_v2" translatable="false">pref_key_browser_feature_autoplay_v2</string>

View File

@ -2,9 +2,18 @@
<!-- 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:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.PreferenceCategory
android:key="@string/pref_key_site_permissions_description"
app:iconSpaceReserved="false"
android:title="@string/preferences_site_permissions_description"
android:singleLineTitle="false"
android:visible="false"
tools:targetApi="o" />
<androidx.preference.Preference
android:icon="@drawable/ic_autoplay_enabled"
android:key="@string/pref_key_browser_feature_autoplay_v2"