log as counters instead of histograms

this will interoperate better with UMA

Bug: 26687914
Change-Id: Ie63b2be2d457054c96b070ada3bb92141ab1fb5a
This commit is contained in:
Chris Wren
2016-06-15 11:44:16 -04:00
parent f4ad4434f1
commit 1753dfd5cd
2 changed files with 4 additions and 4 deletions

View File

@@ -95,11 +95,11 @@ public class SharedPreferencesLogger implements SharedPreferences {
} }
private void logValue(String key, String value) { private void logValue(String key, String value) {
MetricsLogger.histogram(mContext, mTag + "/" + key + "|" + value, 1); MetricsLogger.count(mContext, mTag + "/" + key + "|" + value, 1);
} }
private void logPackageName(String key, String value) { private void logPackageName(String key, String value) {
MetricsLogger.histogram(mContext, mTag + "/" + key, 1); MetricsLogger.count(mContext, mTag + "/" + key, 1);
MetricsLogger.action(mContext, MetricsEvent.ACTION_GENERIC_PACKAGE, MetricsLogger.action(mContext, MetricsEvent.ACTION_GENERIC_PACKAGE,
mTag + "/" + key + "|" + value); mTag + "/" + key + "|" + value);
} }

View File

@@ -229,11 +229,11 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (mDisabledByAdmin) { if (mDisabledByAdmin) {
MetricsLogger.histogram(mContext, mMetricsTag + "/switch_bar|restricted", 1); MetricsLogger.count(mContext, mMetricsTag + "/switch_bar|restricted", 1);
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(mContext, mEnforcedAdmin); RestrictedLockUtils.sendShowAdminSupportDetailsIntent(mContext, mEnforcedAdmin);
} else { } else {
final boolean isChecked = !mSwitch.isChecked(); final boolean isChecked = !mSwitch.isChecked();
MetricsLogger.histogram(mContext, mMetricsTag + "/switch_bar|" + isChecked, 1); MetricsLogger.count(mContext, mMetricsTag + "/switch_bar|" + isChecked, 1);
setChecked(isChecked); setChecked(isChecked);
} }
} }