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

@@ -23,6 +23,7 @@ import static android.service.notification.ZenPolicy.PRIORITY_CATEGORY_MEDIA;
import static android.service.notification.ZenPolicy.PRIORITY_CATEGORY_REMINDERS;
import static android.service.notification.ZenPolicy.PRIORITY_CATEGORY_SYSTEM;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.service.notification.ZenPolicy;
@@ -65,10 +66,9 @@ class ZenModeOtherLinkPreferenceController extends AbstractZenModePreferenceCont
@Override
public void updateState(Preference preference, @NonNull ZenMode zenMode) {
// TODO: b/332937635 - Update metrics category
preference.setIntent(
ZenSubSettingLauncher.forModeFragment(mContext, ZenModeOtherFragment.class,
zenMode.getId(), 0).toIntent());
zenMode.getId(), SettingsEnums.ZEN_PRIORITY_MODE).toIntent());
preference.setEnabled(zenMode.isEnabled());
preference.setSummary(mSummaryHelper.getOtherSoundCategoriesSummary(zenMode));