Migrate all MetricsProto enums to SettingsEnums

Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
This commit is contained in:
Fan Zhang
2019-01-16 13:49:47 -08:00
parent dbaa5459b8
commit 31b210017b
502 changed files with 1184 additions and 1347 deletions

View File

@@ -24,11 +24,11 @@ import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_NOTIFICAT
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK;
import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_STATUS_BAR;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.os.Bundle;
import android.provider.SearchIndexableResource;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
@@ -59,26 +59,26 @@ public class ZenModeBlockedEffectsSettings extends ZenModeSettingsBase implement
List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_intent", SUPPRESSED_EFFECT_FULL_SCREEN_INTENT,
MetricsEvent.ACTION_ZEN_BLOCK_FULL_SCREEN_INTENTS, null));
SettingsEnums.ACTION_ZEN_BLOCK_FULL_SCREEN_INTENTS, null));
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_light", SUPPRESSED_EFFECT_LIGHTS,
MetricsEvent.ACTION_ZEN_BLOCK_LIGHT, null));
SettingsEnums.ACTION_ZEN_BLOCK_LIGHT, null));
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_peek", SUPPRESSED_EFFECT_PEEK,
MetricsEvent.ACTION_ZEN_BLOCK_PEEK, null));
SettingsEnums.ACTION_ZEN_BLOCK_PEEK, null));
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_status", SUPPRESSED_EFFECT_STATUS_BAR,
MetricsEvent.ACTION_ZEN_BLOCK_STATUS,
SettingsEnums.ACTION_ZEN_BLOCK_STATUS,
new int[] {SUPPRESSED_EFFECT_NOTIFICATION_LIST}));
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_badge", SUPPRESSED_EFFECT_BADGE,
MetricsEvent.ACTION_ZEN_BLOCK_BADGE, null));
SettingsEnums.ACTION_ZEN_BLOCK_BADGE, null));
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_ambient", SUPPRESSED_EFFECT_AMBIENT,
MetricsEvent.ACTION_ZEN_BLOCK_AMBIENT, null));
SettingsEnums.ACTION_ZEN_BLOCK_AMBIENT, null));
controllers.add(new ZenModeVisEffectPreferenceController(context, lifecycle,
"zen_effect_list", SUPPRESSED_EFFECT_NOTIFICATION_LIST,
MetricsEvent.ACTION_ZEN_BLOCK_NOTIFICATION_LIST, null));
SettingsEnums.ACTION_ZEN_BLOCK_NOTIFICATION_LIST, null));
return controllers;
}
@@ -89,7 +89,7 @@ public class ZenModeBlockedEffectsSettings extends ZenModeSettingsBase implement
@Override
public int getMetricsCategory() {
return MetricsEvent.ZEN_WHAT_TO_BLOCK;
return SettingsEnums.ZEN_WHAT_TO_BLOCK;
}
/**