For #11229: Update ETP cfr string and behaviour.
parent
91c27a023e
commit
512aa46224
|
@ -15,6 +15,7 @@ import android.widget.ImageView
|
||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.view.marginTop
|
import androidx.core.view.marginTop
|
||||||
|
import kotlinx.android.synthetic.main.tracking_protection_onboarding_popup.*
|
||||||
import kotlinx.android.synthetic.main.tracking_protection_onboarding_popup.view.*
|
import kotlinx.android.synthetic.main.tracking_protection_onboarding_popup.view.*
|
||||||
import mozilla.components.browser.session.Session
|
import mozilla.components.browser.session.Session
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
@ -55,7 +56,7 @@ class TrackingProtectionOverlay(
|
||||||
|
|
||||||
layout.onboarding_message.text =
|
layout.onboarding_message.text =
|
||||||
context.getString(
|
context.getString(
|
||||||
R.string.etp_onboarding_message_2,
|
R.string.etp_onboarding_cfr_message,
|
||||||
context.getString(R.string.app_name)
|
context.getString(R.string.app_name)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -97,6 +98,13 @@ class TrackingProtectionOverlay(
|
||||||
it.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
it.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val etpShield =
|
||||||
|
getToolbar().findViewById<View>(R.id.mozac_browser_toolbar_tracking_protection_indicator)
|
||||||
|
trackingOnboardingDialog.message.setOnClickListener {
|
||||||
|
trackingOnboardingDialog.dismiss()
|
||||||
|
etpShield.performClick()
|
||||||
|
}
|
||||||
|
|
||||||
trackingOnboardingDialog.show()
|
trackingOnboardingDialog.show()
|
||||||
settings.incrementTrackingProtectionOnboardingCount()
|
settings.incrementTrackingProtectionOnboardingCount()
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:lineSpacingExtra="2dp"
|
android:lineSpacingExtra="2dp"
|
||||||
android:text="@string/etp_onboarding_message_2"
|
android:text="@string/etp_onboarding_cfr_message"
|
||||||
android:textColor="@color/primary_text_dark_theme"
|
android:textColor="@color/primary_text_dark_theme"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|
|
@ -1098,7 +1098,7 @@
|
||||||
<!-- Description of tracking content that can be blocked by Enhanced Tracking Protection -->
|
<!-- Description of tracking content that can be blocked by Enhanced Tracking Protection -->
|
||||||
<string name="etp_tracking_content_description">Stops outside ads, videos, and other content from loading that contains tracking code. May affect some website functionality.</string>
|
<string name="etp_tracking_content_description">Stops outside ads, videos, and other content from loading that contains tracking code. May affect some website functionality.</string>
|
||||||
<!-- Enhanced Tracking Protection Onboarding Message shown in a dialog above the toolbar. The first parameter is the name of the application (For example: Fenix) -->
|
<!-- Enhanced Tracking Protection Onboarding Message shown in a dialog above the toolbar. The first parameter is the name of the application (For example: Fenix) -->
|
||||||
<string name="etp_onboarding_message_2">%s is blocking trackers on this site when the shield is purple. Tap it to see what’s blocked.</string>
|
<string name="etp_onboarding_cfr_message">Every time the shield is purple, %s has blocked trackers on a site. Tap for more info.</string>
|
||||||
<!-- Enhanced Tracking Protection message that protection is currently on for this site -->
|
<!-- Enhanced Tracking Protection message that protection is currently on for this site -->
|
||||||
<string name="etp_panel_on">Protections are ON for this site</string>
|
<string name="etp_panel_on">Protections are ON for this site</string>
|
||||||
<!-- Enhanced Tracking Protection message that protection is currently off for this site -->
|
<!-- Enhanced Tracking Protection message that protection is currently off for this site -->
|
||||||
|
|
Loading…
Reference in New Issue