Bug 1182918 - Tab Queue: Add telemetry for double tap action. r=mfinkle
authorSebastian Kaspari <s.kaspari@gmail.com>
Tue, 27 Oct 2015 10:47:03 +0100
changeset 270754 f222336ab85f4940fd649cf7009d712cca9b3753
parent 270753 83ee1cb04baaedfa97074a651ce34c58973ff5e4
child 270755 be3cc4130caf8aca30c28f6c3978c86119e8ec0e
push id29622
push userkwierso@gmail.com
push dateMon, 02 Nov 2015 22:26:41 +0000
treeherdermozilla-central@6275cd9c71b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1182918
milestone45.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 1182918 - Tab Queue: Add telemetry for double tap action. r=mfinkle
mobile/android/base/tabqueue/TabQueueService.java
--- a/mobile/android/base/tabqueue/TabQueueService.java
+++ b/mobile/android/base/tabqueue/TabQueueService.java
@@ -141,16 +141,18 @@ public class TabQueueService extends Ser
                             tabQueueHandler.removeCallbacks(stopServiceRunnable);
                             stopSelfResult(stopServiceRunnable.getStartId());
                             stopServiceRunnable = null;
                             removeView();
                         } else {
                             TabQueueHelper.removeURLFromFile(applicationContext, intentUrl, TabQueueHelper.FILE_NAME);
                         }
                         openNow(safeIntent.getUnsafe());
+
+                        Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "tabqueue-doubletap");
                         stopSelfResult(startId);
                     }
                 });
 
                 return START_REDELIVER_INTENT;
             }
 
             sharedPreferences.edit().putString(GeckoPreferences.PREFS_TAB_QUEUE_LAST_SITE, intentUrl)
@@ -181,16 +183,18 @@ public class TabQueueService extends Ser
 
         openNowButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(final View view) {
                 tabQueueHandler.removeCallbacks(stopServiceRunnable);
                 stopServiceRunnable = null;
                 removeView();
                 openNow(intent);
+
+                Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "tabqueue-now");
                 stopSelfResult(startId);
             }
         });
 
         tabQueueHandler.postDelayed(stopServiceRunnable, TOAST_TIMEOUT);
 
         return START_REDELIVER_INTENT;
     }
@@ -202,18 +206,16 @@ public class TabQueueService extends Ser
         startActivity(forwardIntent);
 
         TabQueueHelper.removeNotification(getApplicationContext());
 
         GeckoSharedPrefs.forApp(getApplicationContext()).edit().remove(GeckoPreferences.PREFS_TAB_QUEUE_LAST_SITE)
                                                                .remove(GeckoPreferences.PREFS_TAB_QUEUE_LAST_TIME)
                                                                .apply();
 
-        Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "tabqueue-now");
-
         executorService.submit(new Runnable() {
             @Override
             public void run() {
                 int queuedTabCount = TabQueueHelper.getTabQueueLength(TabQueueService.this);
                 Telemetry.addToHistogram("FENNEC_TABQUEUE_QUEUESIZE", queuedTabCount);
             }
         });