Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Remove unused telemetery.
Browse files Browse the repository at this point in the history
  • Loading branch information
daoshengmu committed Nov 25, 2019
1 parent 66da79c commit d4f4cd0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,6 @@ protected void onStop() {
SettingsStore.getInstance(getBaseContext()).setPid(0);
super.onStop();

if (SettingsStore.getInstance(this).getCylinderDensity() > 0.0f) {
TelemetryWrapper.queueCurvedModeActiveEvent();
} else {
}

TelemetryWrapper.stop();
GleanMetricsService.sessionStop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ private class Method {
private static final String IMMERSIVE_MODE = "immersive_mode";
private static final String TELEMETRY_STATUS = "status";

// How many max-windows dialogs happen / what percentage
private static final String MAX_WINDOWS_DIALOG = "max_windows_dialog";
// New Window tray button use
private static final String NEW_WINDOW_BUTTON = "tray_new_window";
// Long press to bring the context menu event
private static final String LONG_PRESS_CONTEXT_MENU = "context_menu";
// How long is a window open for / window life
private static final String WINDOW_LIFETIME = "window_lifetime";
// Frequency of window moves
Expand All @@ -119,7 +113,6 @@ private class Object {
private static final String SEARCH_BAR = "search_bar";
private static final String VOICE_INPUT = "voice_input";
private static final String WINDOW = "window";
private static final String TRAY = "tray";
}

private class Extra {
Expand Down Expand Up @@ -413,27 +406,6 @@ public static void queueMultiWindowEvents() {
queueOpenWindowsPctEvent();
}

public static void trayNewWindowEvent() {
TelemetryEvent event = TelemetryEvent.create(Category.ACTION, Method.NEW_WINDOW_BUTTON, Object.TRAY);
event.queue();

Log.d(LOGTAG, "[Queue] Tray New Window Click");
}

public static void maxWindowsDialogEvent() {
TelemetryEvent event = TelemetryEvent.create(Category.ACTION, Method.MAX_WINDOWS_DIALOG, Object.WINDOW);
event.queue();

Log.d(LOGTAG, "[Queue] Max Windows dialog");
}

public static void longPressContextMenuEvent() {
TelemetryEvent event = TelemetryEvent.create(Category.ACTION, Method.LONG_PRESS_CONTEXT_MENU, Object.WINDOW);
event.queue();

Log.d(LOGTAG, "[Queue] Context Menu Long Press");
}

public static void openWindowEvent(int windowId) {
windowLifetime.put(windowId, SystemClock.elapsedRealtime());
}
Expand Down Expand Up @@ -516,13 +488,6 @@ public static void openWindowsEvent(int from, int to, boolean isPrivate) {
}
}

public static void queueCurvedModeActiveEvent() {
TelemetryEvent event = TelemetryEvent.create(Category.ACTION, Method.CURVED_MODE_ACTIVE, Object.WINDOW);
event.queue();

Log.d(LOGTAG, "[Queue] Curved mode active");
}

private static void queueWindowsLifetimeHistogram() {
for (Map.Entry<Integer, Long> entry : windowLifetime.entrySet()) {
windowsLifetimeHistogram.addData(SystemClock.elapsedRealtime() - entry.getValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ private void initialize(Context aContext) {

view.requestFocusFromTouch();

TelemetryWrapper.trayNewWindowEvent();

notifyAddWindowClicked();
});
mAddWindowButton.setCurvedTooltip(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,6 @@ public void onContextMenu(GeckoSession session, int screenX, int screenY, Contex
if (element.type == ContextElement.TYPE_VIDEO) {
return;
}
TelemetryWrapper.longPressContextMenuEvent();

hideContextMenus();

Expand Down Expand Up @@ -1674,7 +1673,6 @@ public void onShowActionRequest(@NonNull GeckoSession aSession, @NonNull Selecti
aSelection.hide();
return;
}
TelemetryWrapper.longPressContextMenuEvent();

hideContextMenus();
mSelectionMenu = new SelectionActionWidget(getContext());
Expand Down

0 comments on commit d4f4cd0

Please sign in to comment.