Adds Zen metrics categories

Assigns metrics categories to all modes pages under
ZenModesListFragment. Includes new metrics categories where appropriate.

Bug: 332937635
Test: Build and flash
Flag: android.app.modes_ui
Change-Id: Ic19862ec194b40eae294d3c30240fe3f51304665
This commit is contained in:
Alexander Roederer
2024-08-06 16:01:54 +00:00
parent 21ef302524
commit 64593a873a
33 changed files with 60 additions and 73 deletions

View File

@@ -24,6 +24,7 @@ import static android.service.notification.ZenModeConfig.tryParseScheduleConditi
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
@@ -97,9 +98,9 @@ class ZenModeTriggerUpdatePreferenceController extends AbstractZenModePreference
private void setUpForSystemOwnedTrigger(Preference preference, ZenMode mode) {
if (mode.getType() == TYPE_SCHEDULE_TIME) {
// TODO: b/332937635 - set correct metrics category
preference.setIntent(ZenSubSettingLauncher.forModeFragment(mContext,
ZenModeSetScheduleFragment.class, mode.getId(), 0).toIntent());
ZenModeSetScheduleFragment.class, mode.getId(),
SettingsEnums.ZEN_PRIORITY_MODE).toIntent());
// [Clock Icon] 9:00 - 17:00 / Sun-Mon
preference.setIcon(com.android.internal.R.drawable.ic_zen_mode_type_schedule_time);
@@ -115,9 +116,9 @@ class ZenModeTriggerUpdatePreferenceController extends AbstractZenModePreference
preference.setSummary(null);
}
} else if (mode.getType() == TYPE_SCHEDULE_CALENDAR) {
// TODO: b/332937635 - set correct metrics category
preference.setIntent(ZenSubSettingLauncher.forModeFragment(mContext,
ZenModeSetCalendarFragment.class, mode.getId(), 0).toIntent());
ZenModeSetCalendarFragment.class, mode.getId(),
SettingsEnums.ZEN_PRIORITY_MODE).toIntent());
// [Event Icon] Calendar Events / <Calendar name>
preference.setIcon(