Search in sources :

Example 1 with BatteryPercentagePreferenceController

use of com.android.settings.display.BatteryPercentagePreferenceController in project android_packages_apps_Settings by omnirom.

the class PowerUsageSummary method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    mBatteryHeaderPreferenceController = new BatteryHeaderPreferenceController(context, getActivity(), this, /* host */
    getLifecycle());
    controllers.add(mBatteryHeaderPreferenceController);
    // controllers.add(new AutoBrightnessPreferenceController(context, KEY_AUTO_BRIGHTNESS));
    // controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
    controllers.add(new BatterySaverController(context, getLifecycle()));
    controllers.add(new BatteryPercentagePreferenceController(context));
    controllers.add(new BatteryImagePreferenceController(context));
    /*controllers.add(new AmbientDisplayPreferenceController(
                context,
                new AmbientDisplayConfiguration(context),
                KEY_AMBIENT_DISPLAY));*/
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) BatteryImagePreferenceController(com.android.settings.display.BatteryImagePreferenceController) BatteryPercentagePreferenceController(com.android.settings.display.BatteryPercentagePreferenceController)

Example 2 with BatteryPercentagePreferenceController

use of com.android.settings.display.BatteryPercentagePreferenceController in project android_packages_apps_Settings by SudaMod.

the class PowerUsageSummary method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    mBatteryHeaderPreferenceController = new BatteryHeaderPreferenceController(context, getActivity(), this, /* host */
    getLifecycle());
    controllers.add(mBatteryHeaderPreferenceController);
    controllers.add(new AutoBrightnessPreferenceController(context, KEY_AUTO_BRIGHTNESS));
    controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
    controllers.add(new BatterySaverController(context, getLifecycle()));
    controllers.add(new BatteryPercentagePreferenceController(context));
    controllers.add(new AmbientDisplayPreferenceController(context, new AmbientDisplayConfiguration(context), KEY_AMBIENT_DISPLAY));
    return controllers;
}
Also used : AutoBrightnessPreferenceController(com.android.settings.display.AutoBrightnessPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) AmbientDisplayPreferenceController(com.android.settings.display.AmbientDisplayPreferenceController) ArrayList(java.util.ArrayList) TimeoutPreferenceController(com.android.settings.display.TimeoutPreferenceController) BatteryPercentagePreferenceController(com.android.settings.display.BatteryPercentagePreferenceController) AmbientDisplayConfiguration(com.android.internal.hardware.AmbientDisplayConfiguration)

Example 3 with BatteryPercentagePreferenceController

use of com.android.settings.display.BatteryPercentagePreferenceController in project android_packages_apps_Settings by DirtyUnicorns.

the class PowerUsageSummary method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    mBatteryHeaderPreferenceController = new BatteryHeaderPreferenceController(context, getActivity(), this, /* host */
    getLifecycle());
    controllers.add(mBatteryHeaderPreferenceController);
    // controllers.add(new AutoBrightnessPreferenceController(context, KEY_AUTO_BRIGHTNESS));
    // controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
    controllers.add(new BatterySaverController(context, getLifecycle()));
    controllers.add(new BatteryPercentagePreferenceController(context));
    // KEY_AMBIENT_DISPLAY));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) BatteryPercentagePreferenceController(com.android.settings.display.BatteryPercentagePreferenceController)

Example 4 with BatteryPercentagePreferenceController

use of com.android.settings.display.BatteryPercentagePreferenceController in project android_packages_apps_Settings by LineageOS.

the class PowerUsageSummary method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    mBatteryHeaderPreferenceController = new BatteryHeaderPreferenceController(context, getActivity(), this, /* host */
    getLifecycle());
    controllers.add(mBatteryHeaderPreferenceController);
    controllers.add(new AutoBrightnessPreferenceController(context, KEY_AUTO_BRIGHTNESS));
    controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
    controllers.add(new BatterySaverController(context, getLifecycle()));
    controllers.add(new BatteryPercentagePreferenceController(context));
    controllers.add(new AmbientDisplayPreferenceController(context, new AmbientDisplayConfiguration(context), KEY_AMBIENT_DISPLAY));
    return controllers;
}
Also used : AutoBrightnessPreferenceController(com.android.settings.display.AutoBrightnessPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) AmbientDisplayPreferenceController(com.android.settings.display.AmbientDisplayPreferenceController) ArrayList(java.util.ArrayList) TimeoutPreferenceController(com.android.settings.display.TimeoutPreferenceController) BatteryPercentagePreferenceController(com.android.settings.display.BatteryPercentagePreferenceController) AmbientDisplayConfiguration(com.android.internal.hardware.AmbientDisplayConfiguration)

Example 5 with BatteryPercentagePreferenceController

use of com.android.settings.display.BatteryPercentagePreferenceController in project platform_packages_apps_Settings by BlissRoms.

the class PowerUsageSummary method getPreferenceControllers.

@Override
protected List<AbstractPreferenceController> getPreferenceControllers(Context context) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    mBatteryHeaderPreferenceController = new BatteryHeaderPreferenceController(context, getActivity(), this, /* host */
    getLifecycle());
    controllers.add(mBatteryHeaderPreferenceController);
    controllers.add(new AutoBrightnessPreferenceController(context, KEY_AUTO_BRIGHTNESS));
    controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
    controllers.add(new BatterySaverController(context, getLifecycle()));
    controllers.add(new BatteryPercentagePreferenceController(context));
    controllers.add(new AmbientDisplayPreferenceController(context, new AmbientDisplayConfiguration(context), KEY_AMBIENT_DISPLAY));
    return controllers;
}
Also used : AutoBrightnessPreferenceController(com.android.settings.display.AutoBrightnessPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) AmbientDisplayPreferenceController(com.android.settings.display.AmbientDisplayPreferenceController) ArrayList(java.util.ArrayList) TimeoutPreferenceController(com.android.settings.display.TimeoutPreferenceController) BatteryPercentagePreferenceController(com.android.settings.display.BatteryPercentagePreferenceController) AmbientDisplayConfiguration(com.android.internal.hardware.AmbientDisplayConfiguration)

Aggregations

BatteryPercentagePreferenceController (com.android.settings.display.BatteryPercentagePreferenceController)5 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)5 ArrayList (java.util.ArrayList)5 AmbientDisplayConfiguration (com.android.internal.hardware.AmbientDisplayConfiguration)3 AmbientDisplayPreferenceController (com.android.settings.display.AmbientDisplayPreferenceController)3 AutoBrightnessPreferenceController (com.android.settings.display.AutoBrightnessPreferenceController)3 TimeoutPreferenceController (com.android.settings.display.TimeoutPreferenceController)3 BatteryImagePreferenceController (com.android.settings.display.BatteryImagePreferenceController)1