import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.gestures.DoubleTapScreenPreferenceController;
import com.android.settings.gestures.PickupGesturePreferenceController;
+import com.android.settings.overlay.FeatureFactory;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import com.android.settingslib.core.AbstractPreferenceController;
private AmbientDisplayConfiguration mConfig;
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
- Lifecycle lifecycle, AmbientDisplayConfiguration config,
- MetricsFeatureProvider metricsFeatureProvider) {
+ Lifecycle lifecycle, AmbientDisplayConfiguration config) {
+
final List<AbstractPreferenceController> controllers = new ArrayList<>();
- controllers.add(new AmbientDisplayNotificationsPreferenceController(context, config,
- metricsFeatureProvider));
controllers.add(new DoubleTapScreenPreferenceController(context, lifecycle, config,
MY_USER_ID, KEY_AMBIENT_DISPLAY_DOUBLE_TAP));
controllers.add(new PickupGesturePreferenceController(context, lifecycle, config,
AmbientDisplayAlwaysOnPreferenceController.class);
controller.setConfig(getConfig(context));
controller.setCallback(this::updatePreferenceStates);
+ final AmbientDisplayNotificationsPreferenceController notificationController = use(
+ AmbientDisplayNotificationsPreferenceController.class);
+ notificationController.setConfig(getConfig(context));
}
@Override
@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
- return buildPreferenceControllers(context, getLifecycle(),
- getConfig(context), mMetricsFeatureProvider);
+ return buildPreferenceControllers(context, getLifecycle(), getConfig(context));
}
@Override
public List<AbstractPreferenceController> createPreferenceControllers(
Context context) {
return buildPreferenceControllers(context, null,
- new AmbientDisplayConfiguration(context), null);
+ new AmbientDisplayConfiguration(context));
}
};