mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1099436 - Add telemetry for dismissing Onboarding start pane. r=mfinkle
This commit is contained in:
parent
c5706c520e
commit
b22358e378
@ -2,6 +2,7 @@ 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;
|
||||
@ -55,11 +56,19 @@ public class StartPane extends DialogFragment {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user