diff --git a/mobile/android/base/TelemetryContract.java b/mobile/android/base/TelemetryContract.java index 1f084205bb17..b9f79ecb9602 100644 --- a/mobile/android/base/TelemetryContract.java +++ b/mobile/android/base/TelemetryContract.java @@ -29,13 +29,19 @@ public interface TelemetryContract { // Set default panel. public static final String PANEL_SET_DEFAULT = "setdefault.1"; + + // Sanitizing private data. + public static final String SANITIZE = "sanitize.1"; } /** * Holds event methods. Intended for use in * Telemetry.sendUIEvent() as the "method" parameter. */ - public interface Method {} + public interface Method { + // Action triggered from a dialog. + public static final String DIALOG = "dialog"; + } /** * Holds session names. Intended for use with diff --git a/mobile/android/base/preferences/PrivateDataPreference.java b/mobile/android/base/preferences/PrivateDataPreference.java index 38d1a459265b..eb42ef6d0d0e 100644 --- a/mobile/android/base/preferences/PrivateDataPreference.java +++ b/mobile/android/base/preferences/PrivateDataPreference.java @@ -7,6 +7,8 @@ package org.mozilla.gecko.preferences; import org.mozilla.gecko.GeckoAppShell; import org.mozilla.gecko.GeckoEvent; +import org.mozilla.gecko.Telemetry; +import org.mozilla.gecko.TelemetryContract; import org.json.JSONException; import org.json.JSONObject; @@ -33,6 +35,8 @@ class PrivateDataPreference extends MultiChoicePreference { if (!positiveResult) return; + Telemetry.sendUIEvent(TelemetryContract.Event.SANITIZE, TelemetryContract.Method.DIALOG); + CharSequence keys[] = getEntryKeys(); boolean values[] = getValues(); JSONObject json = new JSONObject();