Merge "Fix settings crash when enhanced notification shown in search results" into tm-qpr-dev am: 4d4bf61c4c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19641993

Change-Id: I11f45faad393404ba00d464d7caea674360428ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Chloris Kuo
2022-08-16 20:26:21 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 2 deletions

View File

@@ -107,7 +107,6 @@ public class ConfigureNotificationSettings extends DashboardFragment implements
mNotificationAssistantPreferenceController =
use(NotificationAssistantPreferenceController.class);
mNotificationAssistantPreferenceController.setFragment(this);
mNotificationAssistantPreferenceController.setBackend(new NotificationBackend());
}
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,

View File

@@ -44,6 +44,7 @@ public class NotificationAssistantPreferenceController extends TogglePreferenceC
public NotificationAssistantPreferenceController(Context context) {
super(context, KEY_NAS);
mUserManager = UserManager.get(context);
mNotificationBackend = new NotificationBackend();
}
@Override
@@ -101,4 +102,9 @@ public class NotificationAssistantPreferenceController extends TogglePreferenceC
void setBackend(NotificationBackend backend) {
mNotificationBackend = backend;
}
@Override
public boolean isSliceable() {
return (mFragment != null && mFragment instanceof ConfigureNotificationSettings);
}
}