Search in sources :

Example 1 with SwipeToNotificationPreferenceController

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;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) SwipeToNotificationPreferenceController(com.android.settings.gestures.SwipeToNotificationPreferenceController) ArrayList(java.util.ArrayList)

Example 2 with SwipeToNotificationPreferenceController

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;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) SwipeToNotificationPreferenceController(com.android.settings.gestures.SwipeToNotificationPreferenceController) ArrayList(java.util.ArrayList)

Example 3 with SwipeToNotificationPreferenceController

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;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) SwipeToNotificationPreferenceController(com.android.settings.gestures.SwipeToNotificationPreferenceController) ArrayList(java.util.ArrayList)

Example 4 with SwipeToNotificationPreferenceController

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;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) SwipeToNotificationPreferenceController(com.android.settings.gestures.SwipeToNotificationPreferenceController) ArrayList(java.util.ArrayList)

Aggregations

SwipeToNotificationPreferenceController (com.android.settings.gestures.SwipeToNotificationPreferenceController)4 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)4 ArrayList (java.util.ArrayList)4