Bug 1188145 - Add Telemetry for Voice input. r=liuche

--HG--
extra : transplant_source : %5Co%F8%608%E6%F5%3ES%BC%0E%C5%B7%F9%BC%8F%CCJO%7F
This commit is contained in:
Karim Benhmida 2015-07-29 15:26:10 -07:00
Родитель 63560435e6
Коммит 51b801345e
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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.