Bug 1004889 - Add UI telemetry for the main menu r=rnewman

This commit is contained in:
Mark Finkle 2014-05-02 11:00:19 -04:00
Родитель 5f2720ad89
Коммит 8ac96c8ed0
2 изменённых файлов: 10 добавлений и 0 удалений

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

@ -2347,6 +2347,10 @@ abstract public class BrowserApp extends GeckoApp
final int itemId = item.getItemId(); final int itemId = item.getItemId();
// Track the menu action. We don't know much about the context, but we can use this to determine
// the frequency of use for various actions.
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.MENU, getResources().getResourceEntryName(itemId));
if (itemId == R.id.bookmark) { if (itemId == R.id.bookmark) {
tab = Tabs.getInstance().getSelectedTab(); tab = Tabs.getInstance().getSelectedTab();
if (tab != null) { if (tab != null) {

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

@ -46,6 +46,9 @@ public interface TelemetryContract {
// Loading a URL. // Loading a URL.
public static final String LOAD_URL = "loadurl.1"; public static final String LOAD_URL = "loadurl.1";
// Generic action, usually for tracking menu and toolbar actions.
public static final String ACTION = "action.1";
} }
/** /**
@ -65,6 +68,9 @@ public interface TelemetryContract {
// Action occurred via an intent. // Action occurred via an intent.
public static final String INTENT = "intent"; public static final String INTENT = "intent";
// Action occurred via the main menu.
public static final String MENU = "menu";
// Action occurred via a context menu. // Action occurred via a context menu.
public static final String CONTEXT_MENU = "contextmenu"; public static final String CONTEXT_MENU = "contextmenu";