Search in sources :

Example 1 with PickupGesturePreferenceController

use of com.android.settings.gestures.PickupGesturePreferenceController 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 PickupGesturePreferenceController

use of com.android.settings.gestures.PickupGesturePreferenceController 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 PickupGesturePreferenceController

use of com.android.settings.gestures.PickupGesturePreferenceController 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 PickupGesturePreferenceController

use of com.android.settings.gestures.PickupGesturePreferenceController 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 PickupGesturePreferenceController

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

the class LockscreenDashboardFragmentTest method onAttach_pickUp_shouldInvokeSetters.

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

Aggregations

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