Bug 1383765 - Add Leanplum event for new tab for Tablet. r=maliu
authorNevin Chen <cnevinchen@gmail.com>
Tue, 25 Jul 2017 11:34:22 +0800
changeset 419409 4809c54d1cecad8a2bf3470fff09d69807423506
parent 419408 26d556a0f07ccd041ff5e28a53a3c7e38b4c2802
child 419410 32747028f0ac7cb05f8c9e1261cb12dd47fce461
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaliu
bugs1383765
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1383765 - Add Leanplum event for new tab for Tablet. r=maliu MozReview-Commit-ID: ILTA0x6pDCx
mobile/android/base/java/org/mozilla/gecko/tabs/TabStrip.java
--- a/mobile/android/base/java/org/mozilla/gecko/tabs/TabStrip.java
+++ b/mobile/android/base/java/org/mozilla/gecko/tabs/TabStrip.java
@@ -16,19 +16,22 @@ import android.view.LayoutInflater;
 import android.view.TouchDelegate;
 import android.view.View;
 import android.view.ViewTreeObserver;
 
 import org.mozilla.gecko.BrowserApp.TabStripInterface;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
+import org.mozilla.gecko.mma.MmaDelegate;
 import org.mozilla.gecko.widget.themed.ThemedImageButton;
 import org.mozilla.gecko.widget.themed.ThemedLinearLayout;
 
+import static org.mozilla.gecko.mma.MmaDelegate.NEW_TAB;
+
 public class TabStrip extends ThemedLinearLayout
                       implements TabStripInterface {
     private static final String LOGTAG = "GeckoTabStrip";
 
     private final TabStripView tabStripView;
     private final ThemedImageButton addTabButton;
 
     private final TabsListener tabsListener;
@@ -53,16 +56,17 @@ public class TabStrip extends ThemedLine
         addTabButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 final Tabs tabs = Tabs.getInstance();
                 if (isPrivateMode()) {
                     tabs.addPrivateTab();
                 } else {
                     tabs.addTab();
+                    MmaDelegate.track(NEW_TAB);
                 }
             }
         });
 
         getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
                 @Override
                 public boolean onPreDraw() {
                     getViewTreeObserver().removeOnPreDrawListener(this);