Bug 1301468 - AS Highlights: Add LOAD_URL telemetry. r?ahunt draft
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 23 Nov 2016 16:55:06 +0100
changeset 442955 b87eb97d2f2732a94434a5b55db8d5762dd8e085
parent 442954 9244ce043fb33937cc7164874e558676c8777e47
child 442956 1b4a0387064476050072bf68c0a91d17e5e0d6d0
push id36876
push users.kaspari@gmail.com
push dateWed, 23 Nov 2016 16:25:14 +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();