Disable marketing telemetry until privacy pop window approved in Mozillaonline builds
(cherry picked from commit f7826c41bf
)
This commit is contained in:
parent
95fb1e7395
commit
6904f4ecd5
|
@ -12,6 +12,8 @@ import android.text.method.LinkMovementMethod
|
|||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.metrics.MetricServiceType
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
|
@ -44,11 +46,12 @@ fun showPrivacyPopWindow(context: Context, activity: Activity) {
|
|||
// Users can only use fenix after they agree with the privacy notice
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
.setPositiveButton(
|
||||
context.getString(R.string.privacy_notice_positive_button),
|
||||
{ _, _ ->
|
||||
context.settings().shouldShowPrivacyPopWindow = false
|
||||
}
|
||||
)
|
||||
context.getString(R.string.privacy_notice_positive_button)
|
||||
) { _, _ ->
|
||||
context.settings().shouldShowPrivacyPopWindow = false
|
||||
context.settings().isMarketingTelemetryEnabled = true
|
||||
context.components.analytics.metrics.start(MetricServiceType.Marketing)
|
||||
}
|
||||
.setNeutralButton(
|
||||
context.getString(R.string.privacy_notice_neutral_button_2),
|
||||
{ _, _ -> exitProcess(0) }
|
||||
|
|
|
@ -247,9 +247,9 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|||
default = true
|
||||
)
|
||||
|
||||
val isMarketingTelemetryEnabled by booleanPreference(
|
||||
var isMarketingTelemetryEnabled by booleanPreference(
|
||||
appContext.getPreferenceKey(R.string.pref_key_marketing_telemetry),
|
||||
default = true
|
||||
default = !Config.channel.isMozillaOnline
|
||||
)
|
||||
|
||||
var isExperimentationEnabled by booleanPreference(
|
||||
|
|
Loading…
Reference in New Issue
Block a user