Bug 1099436 - Add telemetry for dismissing Onboarding start pane. r=mfinkle, a=lsblakk
authorChenxia Liu <liuche@mozilla.com>
Mon, 17 Nov 2014 11:11:56 -0800
changeset 226167 1a3f9aae6df7bb5c86b4f3e473c446afcd7339f0
parent 226166 bd787c46f1139c5c7fc03da20912847905d849ed
child 226168 59bdd524ada8a65fbfea364ac73e648e7cb92091
push id7273
push usercliu@mozilla.com
push dateMon, 17 Nov 2014 19:12:31 +0000
treeherdermozilla-aurora@1a3f9aae6df7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, lsblakk
bugs1099436
milestone35.0a2
Bug 1099436 - Add telemetry for dismissing Onboarding start pane. r=mfinkle, a=lsblakk
mobile/android/base/StartPane.java
--- a/mobile/android/base/StartPane.java
+++ b/mobile/android/base/StartPane.java
@@ -1,12 +1,13 @@
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.fxa.activities.FxAccountGetStartedActivity;
 
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.v4.app.DialogFragment;
 import android.view.GestureDetector;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.View.OnClickListener;
@@ -50,21 +51,29 @@ public class StartPane extends DialogFra
                 StartPane.this.dismiss();
             }
         });
 
         addDismissHandler(view);
         return view;
     }
 
+    @Override
+    public void onCancel(DialogInterface dialog) {
+        // StartPane is closed by touching outside the dialog.
+        Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL, TelemetryContract.Method.DIALOG, "firstrun-pane");
+        super.onCancel(dialog);
+    }
+
     // Add handler for dismissing the StartPane on a single click.
     private void addDismissHandler(View view) {
         final GestureDetector gestureDetector = new GestureDetector(getActivity(), new GestureDetector.SimpleOnGestureListener() {
             @Override
             public boolean onSingleTapUp(MotionEvent e) {
+                Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL, TelemetryContract.Method.DIALOG, "firstrun-pane");
                 StartPane.this.dismiss();
                 return true;
             }
         });
 
         view.findViewById(R.id.onboard_content).setOnTouchListener(new OnTouchListener() {
             @Override
             public boolean onTouch(View v, MotionEvent event) {