mobile/android/base/TelemetryContract.java

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
michael@0 2 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 package org.mozilla.gecko;
michael@0 7
michael@0 8 /**
michael@0 9 * Holds data definitions for our UI Telemetry implementation.
michael@0 10 */
michael@0 11 public interface TelemetryContract {
michael@0 12
michael@0 13 /**
michael@0 14 * Holds event names. Intended for use with
michael@0 15 * Telemetry.sendUIEvent() as the "action" parameter.
michael@0 16 */
michael@0 17 public interface Event {
michael@0 18 // Cancel a state, action, etc.
michael@0 19 public static final String CANCEL = "cancel.1";
michael@0 20
michael@0 21 // Outcome of data policy notification: can be true or false.
michael@0 22 public static final String POLICY_NOTIFICATION_SUCCESS = "policynotification.success.1:";
michael@0 23
michael@0 24 // Top site pinned.
michael@0 25 public static final String TOP_SITES_PIN = "pin.1";
michael@0 26
michael@0 27 // Top site un-pinned.
michael@0 28 public static final String TOP_SITES_UNPIN = "unpin.1";
michael@0 29
michael@0 30 // Top site edited.
michael@0 31 public static final String TOP_SITES_EDIT = "edit.1";
michael@0 32
michael@0 33 // Set default panel.
michael@0 34 public static final String PANEL_SET_DEFAULT = "setdefault.1";
michael@0 35
michael@0 36 // Sharing content.
michael@0 37 public static final String SHARE = "share.1";
michael@0 38
michael@0 39 // Sanitizing private data.
michael@0 40 public static final String SANITIZE = "sanitize.1";
michael@0 41
michael@0 42 // Saving a resource (reader, bookmark, etc) for viewing later.
michael@0 43 // Note: Only used in JavaScript for now, but here for completeness.
michael@0 44 public static final String SAVE = "save.1";
michael@0 45
michael@0 46 // Stop holding a resource (reader, bookmark, etc) for viewing later.
michael@0 47 // Note: Only used in JavaScript for now, but here for completeness.
michael@0 48 public static final String UNSAVE = "unsave.1";
michael@0 49
michael@0 50 // Loading a URL.
michael@0 51 public static final String LOAD_URL = "loadurl.1";
michael@0 52
michael@0 53 // Generic action, usually for tracking menu and toolbar actions.
michael@0 54 public static final String ACTION = "action.1";
michael@0 55
michael@0 56 // Launching (opening) an external application
michael@0 57 // Note: Only used in JavaScript for now, but here for completeness.
michael@0 58 public static final String LAUNCH = "launch.1";
michael@0 59 }
michael@0 60
michael@0 61 /**
michael@0 62 * Holds event methods. Intended for use in
michael@0 63 * Telemetry.sendUIEvent() as the "method" parameter.
michael@0 64 */
michael@0 65 public interface Method {
michael@0 66 // Action triggered from a list.
michael@0 67 public static final String LIST = "list";
michael@0 68
michael@0 69 // Action triggered from the action bar (including the toolbar).
michael@0 70 public static final String ACTIONBAR = "actionbar";
michael@0 71
michael@0 72 // Action triggered by hitting the Android back button.
michael@0 73 public static final String BACK = "back";
michael@0 74
michael@0 75 // Action triggered from a button.
michael@0 76 public static final String BUTTON = "button";
michael@0 77
michael@0 78 // Action triggered from a dialog.
michael@0 79 public static final String DIALOG = "dialog";
michael@0 80
michael@0 81 // Action occurred via an intent.
michael@0 82 public static final String INTENT = "intent";
michael@0 83
michael@0 84 // Action occurred via the main menu.
michael@0 85 public static final String MENU = "menu";
michael@0 86
michael@0 87 // Action occurred via a context menu.
michael@0 88 public static final String CONTEXT_MENU = "contextmenu";
michael@0 89
michael@0 90 // Action triggered from a view grid item, like a thumbnail.
michael@0 91 public static final String GRID_ITEM = "griditem";
michael@0 92
michael@0 93 // Action triggered from a view list item, like a row of a list.
michael@0 94 public static final String LIST_ITEM = "listitem";
michael@0 95
michael@0 96 // Action triggered from a suggestion provided to the user.
michael@0 97 public static final String SUGGESTION = "suggestion";
michael@0 98
michael@0 99 // Action triggered from a pageaction in the URLBar.
michael@0 100 // Note: Only used in JavaScript for now, but here for completeness.
michael@0 101 public static final String PAGEACTION = "pageaction";
michael@0 102 }
michael@0 103
michael@0 104 /**
michael@0 105 * Holds session names. Intended for use with
michael@0 106 * Telemetry.startUISession() as the "sessionName" parameter.
michael@0 107 */
michael@0 108 public interface Session {
michael@0 109 // Awesomescreen (including frecency search) is active.
michael@0 110 public static final String AWESOMESCREEN = "awesomescreen.1";
michael@0 111
michael@0 112 // Started when a user enters about:home.
michael@0 113 public static final String HOME = "home.1";
michael@0 114
michael@0 115 // Started when a user enters a given home panel.
michael@0 116 // Session name is dynamic, encoded as "homepanel.1:<panel_id>"
michael@0 117 public static final String HOME_PANEL = "homepanel.1:";
michael@0 118
michael@0 119 // Started when a Reader viewer becomes active in the foreground.
michael@0 120 // Note: Only used in JavaScript for now, but here for completeness.
michael@0 121 public static final String READER = "reader.1";
michael@0 122
michael@0 123 // Awesomescreen frecency search is active.
michael@0 124 public static final String FRECENCY = "frecency.1";
michael@0 125
michael@0 126 // Started the very first time we believe the application has been launched.
michael@0 127 public static final String FIRSTRUN = "firstrun.1";
michael@0 128 }
michael@0 129
michael@0 130 /**
michael@0 131 * Holds reasons for stopping a session. Intended for use in
michael@0 132 * Telemetry.stopUISession() as the "reason" parameter.
michael@0 133 */
michael@0 134 public interface Reason {
michael@0 135 // Changes were committed.
michael@0 136 public static final String COMMIT = "commit";
michael@0 137 }
michael@0 138 }

mercurial