From 236f4689962fdf370dbc1aef07aefefca3df839d Mon Sep 17 00:00:00 2001 From: Karim Benhmida Date: Wed, 29 Jul 2015 15:26:10 -0700 Subject: [PATCH] Bug 1188145 - Add Telemetry for Voice input. r=liuche --- mobile/android/base/toolbar/ToolbarEditLayout.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mobile/android/base/toolbar/ToolbarEditLayout.java b/mobile/android/base/toolbar/ToolbarEditLayout.java index 7dc4246b8eb..cec9aa83139 100644 --- a/mobile/android/base/toolbar/ToolbarEditLayout.java +++ b/mobile/android/base/toolbar/ToolbarEditLayout.java @@ -229,6 +229,7 @@ public class ToolbarEditLayout extends ThemedLinearLayout { } private void launchVoiceRecognizer() { + Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.ACTIONBAR, "voice_input_launch"); final Intent intent = InputOptionsUtils.createVoiceRecognizerIntent(getResources().getString(R.string.voicesearch_prompt)); Activity activity = GeckoAppShell.getGeckoInterface().getActivity(); @@ -239,6 +240,7 @@ public class ToolbarEditLayout extends ThemedLinearLayout { return; } + Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.ACTIONBAR, "voice_input_success"); // We have RESULT_OK, not RESULT_NO_MATCH so it should be safe to assume that // we have at least one match. We only need one: this will be // used for showing the user search engines with this search term in it.