Search in sources :

Example 21 with LockScreenNotificationPreferenceController

use of com.android.settings.notification.LockScreenNotificationPreferenceController in project android_packages_apps_Settings by omnirom.

the class LockscreenDashboardFragment method createPreferenceControllers.

@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    final Lifecycle lifecycle = getSettingsLifecycle();
    final LockScreenNotificationPreferenceController notificationController = new LockScreenNotificationPreferenceController(context, KEY_LOCK_SCREEN_NOTIFICATON, KEY_LOCK_SCREEN_NOTIFICATON_WORK_PROFILE_HEADER, KEY_LOCK_SCREEN_NOTIFICATON_WORK_PROFILE);
    lifecycle.addObserver(notificationController);
    controllers.add(notificationController);
    mOwnerInfoPreferenceController = new OwnerInfoPreferenceController(context, this);
    controllers.add(mOwnerInfoPreferenceController);
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) Lifecycle(com.android.settingslib.core.lifecycle.Lifecycle) ArrayList(java.util.ArrayList) LockScreenNotificationPreferenceController(com.android.settings.notification.LockScreenNotificationPreferenceController)

Aggregations

LockScreenNotificationPreferenceController (com.android.settings.notification.LockScreenNotificationPreferenceController)21 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)10 ArrayList (java.util.ArrayList)10 Lifecycle (com.android.settingslib.core.lifecycle.Lifecycle)8 Preference (android.support.v7.preference.Preference)6 PreferenceGroup (android.support.v7.preference.PreferenceGroup)6 Test (org.junit.Test)6 Activity (android.app.Activity)5 LockPatternUtils (com.android.internal.widget.LockPatternUtils)5 AddUserWhenLockedPreferenceController (com.android.settings.accounts.AddUserWhenLockedPreferenceController)5 EnterprisePrivacyPreferenceController (com.android.settings.enterprise.EnterprisePrivacyPreferenceController)5 ManageDeviceAdminPreferenceController (com.android.settings.enterprise.ManageDeviceAdminPreferenceController)5 ChooseLockSettingsHelper (com.android.settings.password.ChooseLockSettingsHelper)5 LineageLockPatternUtils (org.lineageos.internal.util.LineageLockPatternUtils)2