Merge "Fix settings crash when enhanced notification shown in search results"
This commit is contained in:
@@ -107,7 +107,6 @@ public class ConfigureNotificationSettings extends DashboardFragment implements
|
|||||||
mNotificationAssistantPreferenceController =
|
mNotificationAssistantPreferenceController =
|
||||||
use(NotificationAssistantPreferenceController.class);
|
use(NotificationAssistantPreferenceController.class);
|
||||||
mNotificationAssistantPreferenceController.setFragment(this);
|
mNotificationAssistantPreferenceController.setFragment(this);
|
||||||
mNotificationAssistantPreferenceController.setBackend(new NotificationBackend());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
|
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
|
||||||
|
@@ -43,6 +43,7 @@ public class NotificationAssistantPreferenceController extends TogglePreferenceC
|
|||||||
public NotificationAssistantPreferenceController(Context context) {
|
public NotificationAssistantPreferenceController(Context context) {
|
||||||
super(context, KEY_NAS);
|
super(context, KEY_NAS);
|
||||||
mUserManager = UserManager.get(context);
|
mUserManager = UserManager.get(context);
|
||||||
|
mNotificationBackend = new NotificationBackend();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -100,4 +101,9 @@ public class NotificationAssistantPreferenceController extends TogglePreferenceC
|
|||||||
void setBackend(NotificationBackend backend) {
|
void setBackend(NotificationBackend backend) {
|
||||||
mNotificationBackend = backend;
|
mNotificationBackend = backend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSliceable() {
|
||||||
|
return (mFragment != null && mFragment instanceof ConfigureNotificationSettings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user