Bug 1055315 - Add telemetry probe when changing default search service; r=margaret.
authorRamasamy Gopalan <ramasamy.zephyr@gmail.com>
Mon, 25 Aug 2014 16:57:47 -0700
changeset 223191 c280549999113e181aae684f0a1cffb4bf9d0efd
parent 223190 0654c821911ad881a95a637ab33825edbd946abd
child 223192 be6073a0d24a2c504c0b137a1363e686b054c8ac
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1055315
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1055315 - Add telemetry probe when changing default search service; r=margaret.
mobile/android/search/java/org/mozilla/search/SearchPreferenceActivity.java
--- a/mobile/android/search/java/org/mozilla/search/SearchPreferenceActivity.java
+++ b/mobile/android/search/java/org/mozilla/search/SearchPreferenceActivity.java
@@ -131,11 +131,14 @@ public class SearchPreferenceActivity ex
      * Update summaries when the value of a shared preference changes.
      */
     @Override
     @SuppressWarnings("deprecation")
     public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
         if (TextUtils.equals(PREF_SEARCH_ENGINE_KEY, key)) {
             final ListPreference searchEnginePref = (ListPreference) findPreference(PREF_SEARCH_ENGINE_KEY);
             searchEnginePref.setSummary(searchEnginePref.getEntry());
+            Telemetry.sendUIEvent(TelemetryContract.Event.SEARCH_SET_DEFAULT,
+                                  TelemetryContract.Method.DIALOG,
+                                  searchEnginePref.getValue().toLowerCase());
         }
     }
 }