Merge "Log preference change as count (in addition to action)" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-18 20:29:10 +00:00
committed by Android (Google) Code Review

View File

@@ -111,6 +111,9 @@ public class SharedPreferencesLogger implements SharedPreferences {
mPreferenceKeySet.add(prefKey);
return;
}
// TODO: Remove count logging to save some resource.
mMetricsFeature.count(mContext, prefKey + "|" + value, 1);
// Pref key exists in set, log it's change in metrics.
mMetricsFeature.action(mContext, MetricsEvent.ACTION_SETTINGS_PREFERENCE_CHANGE,
Pair.create(MetricsEvent.FIELD_SETTINGS_PREFERENCE_CHANGE_NAME, prefKey),