Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Bug 1805184 - Enable or disable Glean collection and upload immediately.
Browse files Browse the repository at this point in the history
This also ensures deletion request is sent.
  • Loading branch information
mcarare authored and mergify[bot] committed Dec 12, 2022
1 parent b85960b commit d31ff0e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package org.mozilla.focus.widget

import android.content.Context
import android.util.AttributeSet
import mozilla.components.service.glean.Glean
import org.mozilla.focus.R
import org.mozilla.focus.settings.LearnMoreSwitchPreference
import org.mozilla.focus.telemetry.TelemetryWrapper
Expand All @@ -29,6 +30,8 @@ internal class TelemetrySwitchPreference(context: Context, attrs: AttributeSet?)
TelemetryHolder.get()
.configuration
.setUploadEnabled(isChecked).isCollectionEnabled = isChecked

Glean.setUploadEnabled(isChecked)
}

override fun getDescription(): String {
Expand Down

0 comments on commit d31ff0e

Please sign in to comment.