Search in sources :

Example 6 with AutoTimePreferenceController

use of com.android.settings.datetime.AutoTimePreferenceController in project platform_packages_apps_Settings by BlissRoms.

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 7 with AutoTimePreferenceController

use of com.android.settings.datetime.AutoTimePreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class DateTimeSettings method createPreferenceControllers.

@Override
protected List<AbstractPreferenceController> createPreferenceControllers(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);
    final AutoTimeFormatPreferenceController autoTimeFormatPreferenceController = new AutoTimeFormatPreferenceController(activity, this);
    controllers.add(autoTimeZonePreferenceController);
    controllers.add(autoTimePreferenceController);
    controllers.add(autoTimeFormatPreferenceController);
    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) TimePreferenceController(com.android.settings.datetime.TimePreferenceController) AutoTimePreferenceController(com.android.settings.datetime.AutoTimePreferenceController) DatePreferenceController(com.android.settings.datetime.DatePreferenceController) ArrayList(java.util.ArrayList) Activity(android.app.Activity) AutoTimeFormatPreferenceController(com.android.settings.datetime.AutoTimeFormatPreferenceController) Intent(android.content.Intent) AutoTimeZonePreferenceController(com.android.settings.datetime.AutoTimeZonePreferenceController) TimeZonePreferenceController(com.android.settings.datetime.TimeZonePreferenceController) AutoTimeZonePreferenceController(com.android.settings.datetime.AutoTimeZonePreferenceController) AutoTimeFormatPreferenceController(com.android.settings.datetime.AutoTimeFormatPreferenceController) TimeFormatPreferenceController(com.android.settings.datetime.TimeFormatPreferenceController) AutoTimePreferenceController(com.android.settings.datetime.AutoTimePreferenceController)

Aggregations

Activity (android.app.Activity)7 Intent (android.content.Intent)7 AutoTimePreferenceController (com.android.settings.datetime.AutoTimePreferenceController)7 AutoTimeZonePreferenceController (com.android.settings.datetime.AutoTimeZonePreferenceController)7 DatePreferenceController (com.android.settings.datetime.DatePreferenceController)7 TimeFormatPreferenceController (com.android.settings.datetime.TimeFormatPreferenceController)7 TimePreferenceController (com.android.settings.datetime.TimePreferenceController)7 TimeZonePreferenceController (com.android.settings.datetime.TimeZonePreferenceController)7 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)7 ArrayList (java.util.ArrayList)7 AutoTimeFormatPreferenceController (com.android.settings.datetime.AutoTimeFormatPreferenceController)1