Search in sources :

Example 1 with DoubleTapScreenPreferenceController

use of com.android.settings.gestures.DoubleTapScreenPreferenceController in project android_packages_apps_Settings by LineageOS.

the class AmbientDisplaySettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle, AmbientDisplayConfiguration config, MetricsFeatureProvider metricsFeatureProvider, AmbientDisplayAlwaysOnPreferenceController.OnPreferenceChangedCallback aodCallback) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new AmbientDisplayNotificationsPreferenceController(context, config, metricsFeatureProvider));
    controllers.add(new AmbientDisplayAlwaysOnPreferenceController(context, config, aodCallback));
    controllers.add(new DoubleTapScreenPreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_DOUBLE_TAP));
    controllers.add(new PickupGesturePreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_PICK_UP));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) DoubleTapScreenPreferenceController(com.android.settings.gestures.DoubleTapScreenPreferenceController) PickupGesturePreferenceController(com.android.settings.gestures.PickupGesturePreferenceController)

Example 2 with DoubleTapScreenPreferenceController

use of com.android.settings.gestures.DoubleTapScreenPreferenceController in project android_packages_apps_Settings by omnirom.

the class AmbientDisplaySettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle, AmbientDisplayConfiguration config, MetricsFeatureProvider metricsFeatureProvider, AmbientDisplayAlwaysOnPreferenceController.OnPreferenceChangedCallback aodCallback) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new AmbientDisplayNotificationsPreferenceController(context, config, metricsFeatureProvider));
    controllers.add(new AmbientDisplayAlwaysOnPreferenceController(context, config, aodCallback));
    controllers.add(new DoubleTapScreenPreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_DOUBLE_TAP));
    controllers.add(new PickupGesturePreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_PICK_UP));
    controllers.add(new AmbientDisplayMusicController(context));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) DoubleTapScreenPreferenceController(com.android.settings.gestures.DoubleTapScreenPreferenceController) PickupGesturePreferenceController(com.android.settings.gestures.PickupGesturePreferenceController)

Example 3 with DoubleTapScreenPreferenceController

use of com.android.settings.gestures.DoubleTapScreenPreferenceController in project android_packages_apps_Settings by SudaMod.

the class AmbientDisplaySettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle, AmbientDisplayConfiguration config, MetricsFeatureProvider metricsFeatureProvider, AmbientDisplayAlwaysOnPreferenceController.OnPreferenceChangedCallback aodCallback) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new AmbientDisplayNotificationsPreferenceController(context, config, metricsFeatureProvider));
    controllers.add(new AmbientDisplayAlwaysOnPreferenceController(context, config, aodCallback));
    controllers.add(new DoubleTapScreenPreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_DOUBLE_TAP));
    controllers.add(new PickupGesturePreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_PICK_UP));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) DoubleTapScreenPreferenceController(com.android.settings.gestures.DoubleTapScreenPreferenceController) PickupGesturePreferenceController(com.android.settings.gestures.PickupGesturePreferenceController)

Example 4 with DoubleTapScreenPreferenceController

use of com.android.settings.gestures.DoubleTapScreenPreferenceController in project platform_packages_apps_Settings by BlissRoms.

the class AmbientDisplaySettings method buildPreferenceControllers.

private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Lifecycle lifecycle, AmbientDisplayConfiguration config, MetricsFeatureProvider metricsFeatureProvider, AmbientDisplayAlwaysOnPreferenceController.OnPreferenceChangedCallback aodCallback) {
    final List<AbstractPreferenceController> controllers = new ArrayList<>();
    controllers.add(new AmbientDisplayNotificationsPreferenceController(context, config, metricsFeatureProvider));
    controllers.add(new AmbientDisplayAlwaysOnPreferenceController(context, config, aodCallback));
    controllers.add(new DoubleTapScreenPreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_DOUBLE_TAP));
    controllers.add(new PickupGesturePreferenceController(context, lifecycle, config, MY_USER_ID, KEY_AMBIENT_DISPLAY_PICK_UP));
    return controllers;
}
Also used : AbstractPreferenceController(com.android.settingslib.core.AbstractPreferenceController) ArrayList(java.util.ArrayList) DoubleTapScreenPreferenceController(com.android.settings.gestures.DoubleTapScreenPreferenceController) PickupGesturePreferenceController(com.android.settings.gestures.PickupGesturePreferenceController)

Example 5 with DoubleTapScreenPreferenceController

use of com.android.settings.gestures.DoubleTapScreenPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class LockscreenDashboardFragmentTest method onAttach_doubleTap_shouldInvokeSetters.

@Test
public void onAttach_doubleTap_shouldInvokeSetters() {
    final DoubleTapScreenPreferenceController controller = spy(new DoubleTapScreenPreferenceController(mContext, "key"));
    doReturn(controller).when(mTestFragment).use(DoubleTapScreenPreferenceController.class);
    mTestFragment.onAttach(mContext);
    verify(controller).setConfig(any());
}
Also used : DoubleTapScreenPreferenceController(com.android.settings.gestures.DoubleTapScreenPreferenceController) Test(org.junit.Test)

Aggregations

DoubleTapScreenPreferenceController (com.android.settings.gestures.DoubleTapScreenPreferenceController)7 PickupGesturePreferenceController (com.android.settings.gestures.PickupGesturePreferenceController)6 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)6 ArrayList (java.util.ArrayList)6 Test (org.junit.Test)1