use of android.hardware.display.AmbientDisplayConfiguration in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class GesturesSettingPreferenceController method buildAllPreferenceControllers.
/**
* Get all controllers for their availability status when doing getAvailabilityStatus.
* Do not use this method to add controllers into fragment, most of below controllers already
* convert to TogglePreferenceController, please register them in xml.
* The key is fake because those controllers won't be use to control preference.
*/
private static List<AbstractPreferenceController> buildAllPreferenceControllers(@NonNull Context context) {
final AmbientDisplayConfiguration ambientDisplayConfiguration = new AmbientDisplayConfiguration(context);
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new AssistGestureSettingsPreferenceController(context, FAKE_PREF_KEY).setAssistOnly(false));
controllers.add(new SwipeToNotificationPreferenceController(context, FAKE_PREF_KEY));
controllers.add(new DoubleTwistPreferenceController(context, FAKE_PREF_KEY));
controllers.add(new DoubleTapPowerPreferenceController(context, FAKE_PREF_KEY));
controllers.add(new PickupGesturePreferenceController(context, FAKE_PREF_KEY).setConfig(ambientDisplayConfiguration));
controllers.add(new DoubleTapScreenPreferenceController(context, FAKE_PREF_KEY).setConfig(ambientDisplayConfiguration));
controllers.add(new PreventRingingParentPreferenceController(context, FAKE_PREF_KEY));
return controllers;
}
use of android.hardware.display.AmbientDisplayConfiguration in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class PickupGestureSettings method onAttach.
@Override
public void onAttach(Context context) {
super.onAttach(context);
SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
use(PickupGesturePreferenceController.class).setConfig(new AmbientDisplayConfiguration(context));
}
use of android.hardware.display.AmbientDisplayConfiguration in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class TapScreenGestureSettings method onAttach.
@Override
public void onAttach(Context context) {
super.onAttach(context);
SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
use(TapScreenGesturePreferenceController.class).setConfig(new AmbientDisplayConfiguration(context));
}
use of android.hardware.display.AmbientDisplayConfiguration in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class DoubleTapScreenSettings method onAttach.
@Override
public void onAttach(Context context) {
super.onAttach(context);
SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
use(DoubleTapScreenPreferenceController.class).setConfig(new AmbientDisplayConfiguration(context));
}
use of android.hardware.display.AmbientDisplayConfiguration in project android_packages_apps_Settings by omnirom.
the class TapScreenGestureSettings method onAttach.
@Override
public void onAttach(Context context) {
super.onAttach(context);
SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
use(TapScreenGesturePreferenceController.class).setConfig(new AmbientDisplayConfiguration(context));
}
Aggregations