diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 3d477be19..853c37f5a 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -222,7 +222,10 @@ class DefaultToolbarMenu( } private val addToFirefoxHome = BrowserMenuImageText( - label = context.getString(R.string.browser_menu_add_to_firefox_home), + label = context.getString( + R.string.browser_menu_add_to_firefox_home, + context.getString(R.string.app_name) + ), imageResource = R.drawable.ic_home, iconTintColorResource = primaryTextColor() ) { diff --git a/app/src/main/java/org/mozilla/fenix/settings/Extensions.kt b/app/src/main/java/org/mozilla/fenix/settings/Extensions.kt index b7f087257..7c8939f80 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/Extensions.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/Extensions.kt @@ -43,12 +43,16 @@ fun initBlockedByAndroidView(phoneFeature: PhoneFeature, blockedByAndroidView: V if (!phoneFeature.isAndroidPermissionGranted(context)) { blockedByAndroidView.visibility = View.VISIBLE - val descriptionLabel = blockedByAndroidView.findViewById(R.id.blocked_by_android_explanation_label) - val text = context.getString( - R.string.phone_feature_blocked_by_android_explanation, + val descriptionLabel = blockedByAndroidView.findViewById(R.id.blocked_by_android_feature_label) + val descriptionText = context.getString( + R.string.phone_feature_blocked_step_feature, phoneFeature.getLabel(context) ) - descriptionLabel.text = HtmlCompat.fromHtml(text, HtmlCompat.FROM_HTML_MODE_COMPACT) + descriptionLabel.text = HtmlCompat.fromHtml(descriptionText, HtmlCompat.FROM_HTML_MODE_COMPACT) + + val permissionsLabel = blockedByAndroidView.findViewById(R.id.blocked_by_android_permissions_label) + val permissionsText = context.getString(R.string.phone_feature_blocked_step_permissions) + permissionsLabel.text = HtmlCompat.fromHtml(permissionsText, HtmlCompat.FROM_HTML_MODE_COMPACT) } else { blockedByAndroidView.visibility = View.GONE } diff --git a/app/src/main/java/org/mozilla/fenix/settings/RadioButtonPreference.kt b/app/src/main/java/org/mozilla/fenix/settings/RadioButtonPreference.kt index 08f3e35e3..a195b3d4d 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/RadioButtonPreference.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/RadioButtonPreference.kt @@ -7,11 +7,11 @@ package org.mozilla.fenix.settings import android.content.Context import android.util.AttributeSet import android.view.View +import android.widget.LinearLayout import android.widget.RadioButton import android.widget.TextView import androidx.core.content.res.TypedArrayUtils.getAttr import androidx.core.content.withStyledAttributes -import androidx.core.text.HtmlCompat import androidx.preference.Preference import androidx.preference.PreferenceViewHolder import org.mozilla.fenix.R @@ -22,10 +22,9 @@ open class RadioButtonPreference @JvmOverloads constructor( attrs: AttributeSet? = null ) : Preference(context, attrs) { private val radioGroups = mutableListOf() - private var summaryView: TextView? = null + private var summaryView: LinearLayout? = null private var titleView: TextView? = null private var radioButton: RadioButton? = null - private var shouldSummaryBeParsedAsHtmlContent: Boolean = true private var defaultValue: Boolean = false private var clickListener: (() -> Unit)? = null @@ -127,17 +126,11 @@ open class RadioButtonPreference @JvmOverloads constructor( } private fun bindSummaryView(holder: PreferenceViewHolder) { - summaryView = holder.findViewById(R.id.widget_summary) as TextView + summaryView = holder.findViewById(R.id.widget_summary) as LinearLayout summaryView?.alpha = if (isEnabled) FULL_ALPHA else HALF_ALPHA summaryView?.let { if (!summary.isNullOrEmpty()) { - it.text = if (shouldSummaryBeParsedAsHtmlContent) { - HtmlCompat.fromHtml(summary.toString(), HtmlCompat.FROM_HTML_MODE_COMPACT) - } else { - summary - } - it.visibility = View.VISIBLE } else { it.visibility = View.GONE diff --git a/app/src/main/res/layout/component_permissions_blocked_by_android.xml b/app/src/main/res/layout/component_permissions_blocked_by_android.xml index 5e79878d9..0a74f6fa5 100644 --- a/app/src/main/res/layout/component_permissions_blocked_by_android.xml +++ b/app/src/main/res/layout/component_permissions_blocked_by_android.xml @@ -17,18 +17,40 @@ tools:visibility="visible"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceListItem" + android:text="@string/phone_feature_blocked_by_android" + android:layout_marginBottom="16dp" /> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceListItemSmall" + android:text="@string/phone_feature_blocked_intro" + android:layout_marginBottom="16dp"/> + + + + + + - + + + android:layout_marginBottom="8dp" + android:text="@string/preference_recommended_settings_blocked_title" + android:textStyle="bold" /> + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ea6e48213..2d42719dd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -64,7 +64,7 @@ Bookmark Edit bookmark - + Add-ons Manager No add-ons here @@ -78,8 +78,8 @@ Your Library Desktop site - - Add to Firefox home + + Add to %s home Add to Home screen @@ -1170,7 +1170,7 @@ Updating %s… Start %s - + Migration status: %s Passwords @@ -1182,25 +1182,34 @@ Lower image quality, throttle streaming bandwidth, and platform-level optimizations Use recommended settings - - Blocked + + Blocked + + Ads, autoplay sound and video (block playing media with sound), cookies (block third-party trackers cookies), trackers (allow some trackers), pop-up, website redirects. + + Ask to allow + + Camera, location, microphone and notification. + + Allowed + + DRM audio and video, JavaScript, cache and site data, images. -
Ads, autoplay sound and video (block playing media with sound), cookies (block third-party trackers cookies), trackers (allow some trackers), pop-up, website redirects.

Ask to allow - -
Camera, location, microphone and notification.

Allowed - -
DRM audio and video, JavaScript, cache and site data, images.]]>
Use custom settings Phone Feature No Decision - -
1. Go to Android Settings

2. Tap Permissions

3. Toggle %1$s to ON - ]]>
+ + + To allow it: + + 1. Go to Android Settings + + Permissions]]> + + %1$s to ON]]> Secure Connection