Don't register DndConditionCardController anymore

This card links to the deprecated Zen pages that become unavailable with MODES_UI.

Bug: 346789065
Test: atest ConditionManagerTest
Flag: android.app.modes_ui
Change-Id: Ifd097eb7100fa71a871b23ad4a44e3418d05fe61
This commit is contained in:
Matías Hernández
2024-09-27 19:53:44 +02:00
parent 9b36ed51a2
commit 97cbb8cba1
3 changed files with 28 additions and 2 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.homepage.contextualcards.conditional;
import android.app.Flags;
import android.content.Context;
import android.util.Log;
@@ -153,7 +154,9 @@ public class ConditionManager {
new BackgroundDataConditionController(mAppContext, this /* manager */));
mCardControllers.add(new BatterySaverConditionController(mAppContext, this /* manager */));
mCardControllers.add(new CellularDataConditionController(mAppContext, this /* manager */));
mCardControllers.add(new DndConditionCardController(mAppContext, this /* manager */));
if (!Flags.modesUi()) {
mCardControllers.add(new DndConditionCardController(mAppContext, this /* manager */));
}
mCardControllers.add(new HotspotConditionController(mAppContext, this /* manager */));
mCardControllers.add(new NightDisplayConditionController(mAppContext, this /* manager */));
mCardControllers.add(new RingerVibrateConditionController(mAppContext, this /* manager */));

View File

@@ -35,7 +35,7 @@ import com.android.settings.notification.zen.ZenModeSettings;
import java.util.Objects;
// TODO: b/368247671 - Remove entirely when inlining MODES_UI
public class DndConditionCardController implements ConditionalCardController {
static final int ID = Objects.hash("DndConditionCardController");