Merge "Fix toggle button is enabled state but can't click" into qt-dev am: f9fd3b9e17

am: 5458399357

Change-Id: I048e88c4abf774b33b861b19cb523592ef805875
This commit is contained in:
Raff Tsai
2019-04-30 00:25:17 -07:00
committed by android-build-merger

View File

@@ -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(