Search in sources :

Example 6 with WallpaperPreferenceController

use of com.android.settings.display.WallpaperPreferenceController in project android_packages_apps_Settings by crdroidandroid.

the class DisplaySettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new AutoBrightnessPreferenceController(context, KEY_AUTO_BRIGHTNESS));
    // controllers.add(new AutoRotatePreferenceController(context, lifecycle));
    controllers.add(new CameraGesturePreferenceController(context));
    controllers.add(new FontSizePreferenceController(context));
    controllers.add(new LiftToWakePreferenceController(context));
    controllers.add(new NightDisplayPreferenceController(context));
    controllers.add(new NightModePreferenceController(context));
    controllers.add(new ScreenSaverPreferenceController(context));
    controllers.add(new AmbientDisplayPreferenceController(context, new AmbientDisplayConfiguration(context), KEY_AMBIENT_DISPLAY));
    controllers.add(new TapToWakePreferenceController(context));
    controllers.add(new TimeoutPreferenceController(context, KEY_SCREEN_TIMEOUT));
    controllers.add(new VrDisplayPreferenceController(context));
    controllers.add(new WallpaperPreferenceController(context));
    // controllers.add(new ThemePreferenceController(context));
    controllers.add(new BrightnessLevelPreferenceController(context, lifecycle));
    controllers.add(new ColorModePreferenceController(context));
    return controllers;
}
Also used : ScreenSaverPreferenceController(com.android.settings.display.ScreenSaverPreferenceController) AutoBrightnessPreferenceController(com.android.settings.display.AutoBrightnessPreferenceController) BrightnessLevelPreferenceController(com.android.settings.display.BrightnessLevelPreferenceController) AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) VrDisplayPreferenceController(com.android.settings.display.VrDisplayPreferenceController) ArrayList(java.util.ArrayList) CameraGesturePreferenceController(com.android.settings.display.CameraGesturePreferenceController) TimeoutPreferenceController(com.android.settings.display.TimeoutPreferenceController) AmbientDisplayConfiguration(com.android.internal.hardware.AmbientDisplayConfiguration) TapToWakePreferenceController(com.android.settings.display.TapToWakePreferenceController) AmbientDisplayPreferenceController(com.android.settings.display.AmbientDisplayPreferenceController) LiftToWakePreferenceController(com.android.settings.display.LiftToWakePreferenceController) NightModePreferenceController(com.android.settings.display.NightModePreferenceController) ColorModePreferenceController(com.android.settings.display.ColorModePreferenceController) FontSizePreferenceController(com.android.settings.display.FontSizePreferenceController) WallpaperPreferenceController(com.android.settings.display.WallpaperPreferenceController) NightDisplayPreferenceController(com.android.settings.display.NightDisplayPreferenceController)

Example 7 with WallpaperPreferenceController

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

the class StyleSuggestionActivityBase method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final PackageManager pm = getPackageManager();
    final Intent intent = new Intent().setComponent(new WallpaperPreferenceController(this, "unused key").getComponentName()).addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
    // passing the necessary extra to next page
    WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
    addExtras(intent);
    if (pm.resolveActivity(intent, 0) != null) {
        startActivity(intent);
    } else {
        startFallbackSuggestion();
    }
    finish();
}
Also used : PackageManager(android.content.pm.PackageManager) Intent(android.content.Intent) WallpaperPreferenceController(com.android.settings.display.WallpaperPreferenceController)

Aggregations

WallpaperPreferenceController (com.android.settings.display.WallpaperPreferenceController)7 AmbientDisplayConfiguration (com.android.internal.hardware.AmbientDisplayConfiguration)5 AmbientDisplayPreferenceController (com.android.settings.display.AmbientDisplayPreferenceController)5 AutoBrightnessPreferenceController (com.android.settings.display.AutoBrightnessPreferenceController)5 BrightnessLevelPreferenceController (com.android.settings.display.BrightnessLevelPreferenceController)5 CameraGesturePreferenceController (com.android.settings.display.CameraGesturePreferenceController)5 ColorModePreferenceController (com.android.settings.display.ColorModePreferenceController)5 FontSizePreferenceController (com.android.settings.display.FontSizePreferenceController)5 LiftToWakePreferenceController (com.android.settings.display.LiftToWakePreferenceController)5 NightDisplayPreferenceController (com.android.settings.display.NightDisplayPreferenceController)5 NightModePreferenceController (com.android.settings.display.NightModePreferenceController)5 ScreenSaverPreferenceController (com.android.settings.display.ScreenSaverPreferenceController)5 TapToWakePreferenceController (com.android.settings.display.TapToWakePreferenceController)5 TimeoutPreferenceController (com.android.settings.display.TimeoutPreferenceController)5 VrDisplayPreferenceController (com.android.settings.display.VrDisplayPreferenceController)5 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)5 ArrayList (java.util.ArrayList)5 Intent (android.content.Intent)2 PackageManager (android.content.pm.PackageManager)2 AutoRotatePreferenceController (com.android.settings.display.AutoRotatePreferenceController)2