use of com.android.settings.gestures.SwipeToNotificationPreferenceController in project android_packages_apps_Settings by crdroidandroid.
the class ConfigureNotificationSettings method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final BadgingNotificationPreferenceController badgeController = new BadgingNotificationPreferenceController(context);
final PulseNotificationPreferenceController pulseController = new PulseNotificationPreferenceController(context);
final LockScreenNotificationPreferenceController lockScreenNotificationController = new LockScreenNotificationPreferenceController(context, KEY_LOCKSCREEN, KEY_LOCKSCREEN_WORK_PROFILE_HEADER, KEY_LOCKSCREEN_WORK_PROFILE);
if (lifecycle != null) {
lifecycle.addObserver(pulseController);
lifecycle.addObserver(lockScreenNotificationController);
}
controllers.add(new SwipeToNotificationPreferenceController(context, lifecycle, KEY_SWIPE_DOWN));
controllers.add(badgeController);
controllers.add(pulseController);
controllers.add(lockScreenNotificationController);
controllers.add(new NotificationRingtonePreferenceController(context) {
@Override
public String getPreferenceKey() {
return KEY_NOTI_DEFAULT_RINGTONE;
}
});
return controllers;
}
use of com.android.settings.gestures.SwipeToNotificationPreferenceController in project android_packages_apps_Settings by SudaMod.
the class ConfigureNotificationSettings method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final BadgingNotificationPreferenceController badgeController = new BadgingNotificationPreferenceController(context);
final PulseNotificationPreferenceController pulseController = new PulseNotificationPreferenceController(context);
final LockScreenNotificationPreferenceController lockScreenNotificationController = new LockScreenNotificationPreferenceController(context, KEY_LOCKSCREEN, KEY_LOCKSCREEN_WORK_PROFILE_HEADER, KEY_LOCKSCREEN_WORK_PROFILE);
if (lifecycle != null) {
lifecycle.addObserver(pulseController);
lifecycle.addObserver(lockScreenNotificationController);
}
controllers.add(new SwipeToNotificationPreferenceController(context, lifecycle, KEY_SWIPE_DOWN));
controllers.add(badgeController);
controllers.add(pulseController);
controllers.add(lockScreenNotificationController);
controllers.add(new NotificationRingtonePreferenceController(context) {
@Override
public String getPreferenceKey() {
return KEY_NOTI_DEFAULT_RINGTONE;
}
});
return controllers;
}
use of com.android.settings.gestures.SwipeToNotificationPreferenceController in project android_packages_apps_Settings by LineageOS.
the class ConfigureNotificationSettings method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final BadgingNotificationPreferenceController badgeController = new BadgingNotificationPreferenceController(context);
final PulseNotificationPreferenceController pulseController = new PulseNotificationPreferenceController(context);
final LockScreenNotificationPreferenceController lockScreenNotificationController = new LockScreenNotificationPreferenceController(context, KEY_LOCKSCREEN, KEY_LOCKSCREEN_WORK_PROFILE_HEADER, KEY_LOCKSCREEN_WORK_PROFILE);
if (lifecycle != null) {
lifecycle.addObserver(pulseController);
lifecycle.addObserver(lockScreenNotificationController);
}
controllers.add(new SwipeToNotificationPreferenceController(context, lifecycle, KEY_SWIPE_DOWN));
controllers.add(badgeController);
controllers.add(pulseController);
controllers.add(lockScreenNotificationController);
controllers.add(new NotificationRingtonePreferenceController(context) {
@Override
public String getPreferenceKey() {
return KEY_NOTI_DEFAULT_RINGTONE;
}
});
return controllers;
}
use of com.android.settings.gestures.SwipeToNotificationPreferenceController in project platform_packages_apps_Settings by BlissRoms.
the class ConfigureNotificationSettings method buildPreferenceControllers.
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final BadgingNotificationPreferenceController badgeController = new BadgingNotificationPreferenceController(context);
final PulseNotificationPreferenceController pulseController = new PulseNotificationPreferenceController(context);
final LockScreenNotificationPreferenceController lockScreenNotificationController = new LockScreenNotificationPreferenceController(context, KEY_LOCKSCREEN, KEY_LOCKSCREEN_WORK_PROFILE_HEADER, KEY_LOCKSCREEN_WORK_PROFILE);
if (lifecycle != null) {
lifecycle.addObserver(pulseController);
lifecycle.addObserver(lockScreenNotificationController);
}
controllers.add(new SwipeToNotificationPreferenceController(context, lifecycle, KEY_SWIPE_DOWN));
controllers.add(badgeController);
controllers.add(pulseController);
controllers.add(lockScreenNotificationController);
controllers.add(new NotificationRingtonePreferenceController(context) {
@Override
public String getPreferenceKey() {
return KEY_NOTI_DEFAULT_RINGTONE;
}
});
return controllers;
}
Aggregations