From af4180cf2429444de0cdc2c9bcae47f5ff566748 Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Thu, 25 Apr 2019 12:08:21 +0800 Subject: [PATCH] Fix toggle button is enabled state but can't click Fixes: 131197520 Test: manual Change-Id: Id9f83b4abea55d2569049a48622d473d7f51042f --- .../notification/RecentNotifyingAppsPreferenceController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java b/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java index 1ec3c4f66db..8122df7bdc0 100644 --- a/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java +++ b/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java @@ -214,7 +214,7 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC .setSourceMetricsCategory( SettingsEnums.MANAGE_APPLICATIONS_NOTIFICATIONS) .toIntent()); - pref.setEnabled(mNotificationBackend.isBlockable(mContext, appEntry.info)); + pref.setSwitchEnabled(mNotificationBackend.isBlockable(mContext, appEntry.info)); pref.setOnPreferenceChangeListener((preference, newValue) -> { boolean blocked = !(Boolean) newValue; mNotificationBackend.setNotificationsEnabledForPackage(