зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1004889 - Add UI telemetry for the main menu r=rnewman
This commit is contained in:
Родитель
5f2720ad89
Коммит
8ac96c8ed0
|
@ -2347,6 +2347,10 @@ abstract public class BrowserApp extends GeckoApp
|
|||
|
||||
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) {
|
||||
tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab != null) {
|
||||
|
|
|
@ -46,6 +46,9 @@ public interface TelemetryContract {
|
|||
|
||||
// Loading a URL.
|
||||
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.
|
||||
public static final String INTENT = "intent";
|
||||
|
||||
// Action occurred via the main menu.
|
||||
public static final String MENU = "menu";
|
||||
|
||||
// Action occurred via a context menu.
|
||||
public static final String CONTEXT_MENU = "contextmenu";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче