Bug 1301468 - AS Highlights: Add LOAD_URL telemetry. r=ahunt
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 23 Nov 2016 16:55:06 +0100
changeset 324540 3c810092f3980ec1b1bebfe4af76c707ae1cb449
parent 324539 5bb4e5f0635a6da9c734bdb89b143229ce043c70
child 324541 bab6db941756e7aab6efa7df421f554ca48b6aa0
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersahunt
bugs1301468
milestone53.0a1
Bug 1301468 - AS Highlights: Add LOAD_URL telemetry. r=ahunt MozReview-Commit-ID: 4iVJXkz8L61
mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java
--- a/mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java
@@ -6,16 +6,18 @@
 package org.mozilla.gecko.home.activitystream;
 
 import android.database.Cursor;
 import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
+import org.mozilla.gecko.Telemetry;
+import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.db.BrowserContract;
 import org.mozilla.gecko.home.HomePager;
 import org.mozilla.gecko.home.activitystream.StreamItem.HighlightItem;
 import org.mozilla.gecko.home.activitystream.StreamItem.TopPanel;
 import org.mozilla.gecko.widget.RecyclerViewClickSupport;
 
 import java.util.EnumSet;
 
@@ -103,16 +105,18 @@ public class StreamRecyclerAdapter exten
 
         highlightsCursor.moveToPosition(
                 translatePositionToCursor(position));
 
         final String url = highlightsCursor.getString(
                 highlightsCursor.getColumnIndexOrThrow(BrowserContract.Combined.URL));
 
         onUrlOpenListener.onUrlOpen(url, EnumSet.of(HomePager.OnUrlOpenListener.Flags.ALLOW_SWITCH_TO_TAB));
+
+        Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.LIST_ITEM, "as_highlights");
     }
 
     @Override
     public int getItemCount() {
         final int highlightsCount;
 
         if (highlightsCursor != null) {
             highlightsCount = highlightsCursor.getCount();