Add metrics logging for Settings -> Help & Feedback
Add new metrics event constant for Settings->Help & Feedback, and log it whenever user selects the help option menu, passing the context extra for the corresponding settings preference where the help menu is launched. Change-Id: I971e8e50b959a5451ed085e5da5fd8504111e6c3 Fixes: 30140281
This commit is contained in:
@@ -33,6 +33,8 @@ import android.util.TypedValue;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MenuItem.OnMenuItemClickListener;
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.MetricsProto.MetricsEvent;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Locale;
|
||||
@@ -111,6 +113,9 @@ public class HelpUtils {
|
||||
helpMenuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
MetricsLogger.action(activity,
|
||||
MetricsEvent.ACTION_SETTING_HELP_AND_FEEDBACK,
|
||||
intent.getStringExtra(EXTRA_CONTEXT));
|
||||
try {
|
||||
activity.startActivityForResult(intent, 0);
|
||||
} catch (ActivityNotFoundException exc) {
|
||||
|
||||
@@ -2207,7 +2207,12 @@ message MetricsEvent {
|
||||
// CATEGORY: SETTINGS
|
||||
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 ----
|
||||
|
||||
// Add new aosp constants above this line.
|
||||
// END OF AOSP CONSTANTS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user