Add metrics logging for Settings -> Help & Feedback
am: 319c806cc0
Change-Id: I32966869e910b4c6e36fe3245af2edfa7a6f6a87
This commit is contained in:
@@ -33,6 +33,8 @@ import android.util.TypedValue;
|
|||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.MenuItem.OnMenuItemClickListener;
|
import android.view.MenuItem.OnMenuItemClickListener;
|
||||||
|
import com.android.internal.logging.MetricsLogger;
|
||||||
|
import com.android.internal.logging.MetricsProto.MetricsEvent;
|
||||||
|
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -111,6 +113,9 @@ public class HelpUtils {
|
|||||||
helpMenuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
helpMenuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
|
MetricsLogger.action(activity,
|
||||||
|
MetricsEvent.ACTION_SETTING_HELP_AND_FEEDBACK,
|
||||||
|
intent.getStringExtra(EXTRA_CONTEXT));
|
||||||
try {
|
try {
|
||||||
activity.startActivityForResult(intent, 0);
|
activity.startActivityForResult(intent, 0);
|
||||||
} catch (ActivityNotFoundException exc) {
|
} catch (ActivityNotFoundException exc) {
|
||||||
|
|||||||
@@ -2207,7 +2207,12 @@ message MetricsEvent {
|
|||||||
// CATEGORY: SETTINGS
|
// CATEGORY: SETTINGS
|
||||||
ACTION_AMBIENT_DISPLAY = 495;
|
ACTION_AMBIENT_DISPLAY = 495;
|
||||||
|
|
||||||
|
// ACTION: Settings -> [sub settings activity] -> Options menu -> Help & Support
|
||||||
|
// SUBTYPE: sub settings classname
|
||||||
|
ACTION_SETTING_HELP_AND_FEEDBACK = 496;
|
||||||
|
|
||||||
// ---- End N-MR1 Constants, all N-MR1 constants go above this line ----
|
// ---- End N-MR1 Constants, all N-MR1 constants go above this line ----
|
||||||
|
|
||||||
// Add new aosp constants above this line.
|
// Add new aosp constants above this line.
|
||||||
// END OF AOSP CONSTANTS
|
// END OF AOSP CONSTANTS
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user