log as counters instead of histograms
this will interoperate better with UMA Bug: 26687914 Change-Id: Ie63b2be2d457054c96b070ada3bb92141ab1fb5a
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user