Bug 1268729 - Telemetry probe for synced tabs panel empty view. r=liuche
MozReview-Commit-ID: GkKSru8neAm
--- a/mobile/android/base/java/org/mozilla/gecko/home/RemoteTabsStaticFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/RemoteTabsStaticFragment.java
@@ -6,16 +6,18 @@ package org.mozilla.gecko.home;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import org.mozilla.gecko.R;
+import org.mozilla.gecko.Telemetry;
+import org.mozilla.gecko.TelemetryContract;
import org.mozilla.gecko.fxa.FirefoxAccounts;
import org.mozilla.gecko.fxa.FxAccountConstants;
import org.mozilla.gecko.home.HomePager.OnUrlOpenListener;
import java.util.EnumSet;
import java.util.Locale;
/**
@@ -118,15 +120,18 @@ public class RemoteTabsStaticFragment ex
final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_UPDATE_CREDENTIALS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
} else if (id == R.id.remote_tabs_needs_finish_migrating_sign_in) {
final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_FINISH_MIGRATING);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
+
+ final String extras = getResources().getResourceEntryName(id);
+ Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, extras);
}
@Override
protected void load() {
// We're static, so nothing to do here!
}
}