Search in sources :

Example 16 with AbstractPreferenceController

use of com.android.settingslib.core.AbstractPreferenceController in project android_packages_apps_Settings by omnirom.

the class DateTimeSettings method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    final Activity activity = getActivity();
    final Intent intent = activity.getIntent();
    final boolean isFromSUW = intent.getBooleanExtra(EXTRA_IS_FROM_SUW, false);
    final AutoTimeZonePreferenceController autoTimeZonePreferenceController = new AutoTimeZonePreferenceController(activity, this, /* UpdateTimeAndDateCallback */
    isFromSUW);
    final AutoTimePreferenceController autoTimePreferenceController = new AutoTimePreferenceController(activity, this);
    controllers.add(autoTimeZonePreferenceController);
    controllers.add(autoTimePreferenceController);
    controllers.add(new TimeFormatPreferenceController(activity, this, /* UpdateTimeAndDateCallback */
    isFromSUW));
    controllers.add(new TimeZonePreferenceController(activity, autoTimeZonePreferenceController));
    controllers.add(new TimePreferenceController(activity, this, /* UpdateTimeAndDateCallback */
    autoTimePreferenceController));
    controllers.add(new DatePreferenceController(activity, this, /* UpdateTimeAndDateCallback */
    autoTimePreferenceController));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) AutoTimeZonePreferenceController(com.android.settings.datetime.AutoTimeZonePreferenceController) TimePreferenceController(com.android.settings.datetime.TimePreferenceController) AutoTimePreferenceController(com.android.settings.datetime.AutoTimePreferenceController) TimeZonePreferenceController(com.android.settings.datetime.TimeZonePreferenceController) AutoTimeZonePreferenceController(com.android.settings.datetime.AutoTimeZonePreferenceController) TimeFormatPreferenceController(com.android.settings.datetime.TimeFormatPreferenceController) DatePreferenceController(com.android.settings.datetime.DatePreferenceController) ArrayList(java.util.ArrayList) Activity(android.app.Activity) AutoTimePreferenceController(com.android.settings.datetime.AutoTimePreferenceController) Intent(android.content.Intent)

Example 17 with AbstractPreferenceController

use of com.android.settingslib.core.AbstractPreferenceController in project android_packages_apps_Settings by omnirom.

the class DeviceInfoSettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Activity activity, Fragment fragment, Lifecycle lifecycle) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new BuildNumberPreferenceController(context, activity, fragment, lifecycle));
    controllers.add(new AdditionalSystemUpdatePreferenceController(context));
    controllers.add(new ManualPreferenceController(context));
    controllers.add(new FeedbackPreferenceController(fragment, context));
    controllers.add(new KernelVersionPreferenceController(context));
    controllers.add(new BasebandVersionPreferenceController(context));
    controllers.add(new FirmwareVersionPreferenceController(context, lifecycle));
    controllers.add(new RegulatoryInfoPreferenceController(context));
    controllers.add(new DeviceModelPreferenceController(context, fragment));
    controllers.add(new SecurityPatchPreferenceController(context));
    controllers.add(new FccEquipmentIdPreferenceController(context));
    controllers.add(new SELinuxStatusPreferenceController(context));
    controllers.add(new SafetyInfoPreferenceController(context));
    controllers.add(new OmniVersionPreferenceController(context));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) ManualPreferenceController(com.android.settings.deviceinfo.ManualPreferenceController) SecurityPatchPreferenceController(com.android.settings.deviceinfo.SecurityPatchPreferenceController) BasebandVersionPreferenceController(com.android.settings.deviceinfo.BasebandVersionPreferenceController) AdditionalSystemUpdatePreferenceController(com.android.settings.deviceinfo.AdditionalSystemUpdatePreferenceController) OmniVersionPreferenceController(com.android.settings.deviceinfo.OmniVersionPreferenceController) KernelVersionPreferenceController(com.android.settings.deviceinfo.KernelVersionPreferenceController) FccEquipmentIdPreferenceController(com.android.settings.deviceinfo.FccEquipmentIdPreferenceController) BuildNumberPreferenceController(com.android.settings.deviceinfo.BuildNumberPreferenceController) FeedbackPreferenceController(com.android.settings.deviceinfo.FeedbackPreferenceController) FirmwareVersionPreferenceController(com.android.settings.deviceinfo.FirmwareVersionPreferenceController) RegulatoryInfoPreferenceController(com.android.settings.deviceinfo.RegulatoryInfoPreferenceController) SafetyInfoPreferenceController(com.android.settings.deviceinfo.SafetyInfoPreferenceController) SELinuxStatusPreferenceController(com.android.settings.deviceinfo.SELinuxStatusPreferenceController) DeviceModelPreferenceController(com.android.settings.deviceinfo.DeviceModelPreferenceController)

Example 18 with AbstractPreferenceController

use of com.android.settingslib.core.AbstractPreferenceController in project android_packages_apps_Settings by omnirom.

the class AppAndNotificationDashboardFragment method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Application app, Fragment host) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new EmergencyBroadcastPreferenceController(context, "app_and_notif_cell_broadcast_settings"));
    controllers.add(new SpecialAppAccessPreferenceController(context));
    controllers.add(new AppPermissionsPreferenceController(context));
    controllers.add(new RecentAppsPreferenceController(context, app, host));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) EmergencyBroadcastPreferenceController(com.android.settings.notification.EmergencyBroadcastPreferenceController) ArrayList(java.util.ArrayList)

Example 19 with AbstractPreferenceController

use of com.android.settingslib.core.AbstractPreferenceController in project android_packages_apps_Settings by omnirom.

the class DefaultAppSettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new DefaultAssistPreferenceController(context, KEY_ASSIST_VOICE_INPUT, false));
    controllers.add(new DefaultBrowserPreferenceController(context));
    controllers.add(new DefaultWorkBrowserPreferenceController(context));
    controllers.add(new DefaultPhonePreferenceController(context));
    controllers.add(new DefaultWorkPhonePreferenceController(context));
    controllers.add(new DefaultSmsPreferenceController(context));
    controllers.add(new DefaultEmergencyPreferenceController(context));
    controllers.add(new DefaultHomePreferenceController(context));
    controllers.add(new DefaultPaymentSettingsPreferenceController(context));
    return controllers;
}
Also used : DefaultWorkPhonePreferenceController(com.android.settings.applications.defaultapps.DefaultWorkPhonePreferenceController) DefaultPhonePreferenceController(com.android.settings.applications.defaultapps.DefaultPhonePreferenceController) DefaultBrowserPreferenceController(com.android.settings.applications.defaultapps.DefaultBrowserPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) DefaultHomePreferenceController(com.android.settings.applications.defaultapps.DefaultHomePreferenceController) DefaultPaymentSettingsPreferenceController(com.android.settings.applications.defaultapps.DefaultPaymentSettingsPreferenceController) ArrayList(java.util.ArrayList) DefaultWorkBrowserPreferenceController(com.android.settings.applications.defaultapps.DefaultWorkBrowserPreferenceController) DefaultEmergencyPreferenceController(com.android.settings.applications.defaultapps.DefaultEmergencyPreferenceController) DefaultAssistPreferenceController(com.android.settings.applications.assist.DefaultAssistPreferenceController) DefaultSmsPreferenceController(com.android.settings.applications.defaultapps.DefaultSmsPreferenceController)

Example 20 with AbstractPreferenceController

use of com.android.settingslib.core.AbstractPreferenceController in project android_packages_apps_Settings by omnirom.

the class BluetoothSettings method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    final Lifecycle lifecycle = getLifecycle();
    mDeviceNamePrefController = new BluetoothDeviceNamePreferenceController(context, lifecycle);
    mPairingPrefController = new BluetoothPairingPreferenceController(context, this, (SettingsActivity) getActivity());
    controllers.add(mDeviceNamePrefController);
    controllers.add(mPairingPrefController);
    controllers.add(new BluetoothFilesPreferenceController(context));
    controllers.add(new BluetoothDeviceRenamePreferenceController(context, this, lifecycle));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) Lifecycle(com.android.settingslib.core.lifecycle.Lifecycle) ArrayList(java.util.ArrayList) SettingsActivity(com.android.settings.SettingsActivity)

Aggregations

AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)344 ArrayList (java.util.ArrayList)245 Test (org.junit.Test)86 UserInfo (android.content.pm.UserInfo)33 Lifecycle (com.android.settingslib.core.lifecycle.Lifecycle)33 Context (android.content.Context)31 SettingsActivity (com.android.settings.SettingsActivity)18 StorageManager (android.os.storage.StorageManager)16 StorageItemPreferenceController (com.android.settings.deviceinfo.storage.StorageItemPreferenceController)16 StorageManagerVolumeProvider (com.android.settingslib.deviceinfo.StorageManagerVolumeProvider)16 AdditionalSystemUpdatePreferenceController (com.android.settings.deviceinfo.AdditionalSystemUpdatePreferenceController)12 Activity (android.app.Activity)11 BasePreferenceController (com.android.settings.core.BasePreferenceController)11 PreferenceScreen (android.support.v7.preference.PreferenceScreen)10 UserManager (android.os.UserManager)9 PreferenceControllerMixin (com.android.settings.core.PreferenceControllerMixin)9 TimeoutPreferenceController (com.android.settings.display.TimeoutPreferenceController)9 Intent (android.content.Intent)8 AmbientDisplayConfiguration (com.android.internal.hardware.AmbientDisplayConfiguration)8 PreferenceScreen (androidx.preference.PreferenceScreen)7