port settings over to new metrics enum

Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
This commit is contained in:
Chris Wren
2016-01-26 18:04:01 -05:00
parent 6a83d7537d
commit 9d1bfd1e8d
143 changed files with 328 additions and 314 deletions

View File

@@ -40,6 +40,7 @@ import android.support.v7.preference.PreferenceViewHolder;
import android.view.View;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.notification.ManagedServiceSettings.Config;
@@ -106,7 +107,7 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
new ZenRuleNameDialog(mContext, null) {
@Override
public void onOk(String ruleName) {
MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ADD_RULE_OK);
MetricsLogger.action(mContext, MetricsEvent.ACTION_ZEN_ADD_RULE_OK);
AutomaticZenRule rule = new AutomaticZenRule(ruleName, ri.serviceComponent,
ri.defaultConditionId, NotificationManager.INTERRUPTION_FILTER_PRIORITY,
true);
@@ -126,7 +127,7 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_DELETE_RULE_OK);
MetricsLogger.action(mContext, MetricsEvent.ACTION_ZEN_DELETE_RULE_OK);
removeZenRule(ruleId);
}
})
@@ -169,7 +170,7 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
p.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
MetricsLogger.action(mContext, MetricsLogger.ACTION_ZEN_ADD_RULE);
MetricsLogger.action(mContext, MetricsEvent.ACTION_ZEN_ADD_RULE);
showAddRuleDialog();
return true;
}
@@ -179,7 +180,7 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
@Override
protected int getMetricsCategory() {
return MetricsLogger.NOTIFICATION_ZEN_MODE_AUTOMATION;
return MetricsEvent.NOTIFICATION_ZEN_MODE_AUTOMATION;
}
private String computeRuleSummary(AutomaticZenRule rule, boolean isSystemRule,