From 64def2e3ce5cac2ffc677421fa96cc1970a7db20 Mon Sep 17 00:00:00 2001 From: Chaohui Wang Date: Sat, 28 Oct 2023 18:19:17 +0800 Subject: [PATCH] Migrate Enhanced notifications to SwitchPreferenceCompat Settings use SwitchPreferenceCompat instead of SwitchPreference in the future, for new Material 3 UI. Also clean up unused fields in its controller. Bug: 306658427 Test: manual - on Notifications page Change-Id: I0c4dd3f088e68852a1f63ed46447c306f7c0f65a --- res/xml/configure_notification_settings.xml | 2 +- ...ficationAssistantPreferenceController.java | 20 --------- ...tionAssistantPreferenceControllerTest.java | 45 ++----------------- 3 files changed, 5 insertions(+), 62 deletions(-) diff --git a/res/xml/configure_notification_settings.xml b/res/xml/configure_notification_settings.xml index c52140c4711..59c0c218faa 100644 --- a/res/xml/configure_notification_settings.xml +++ b/res/xml/configure_notification_settings.xml @@ -174,7 +174,7 @@ android:title="@string/notification_pulse_title" settings:controller="com.android.settings.notification.PulseNotificationPreferenceController"/> - resolvers1 = new ArrayList<>(); - resolvers1.add(resolveInfo1); - when(mPackageManager.queryIntentActivities(any(Intent.class), any())) - .thenReturn(resolvers1); } @Test