Clean up AssistGesturePreferenceController

The preference controller shouldn't be shared between the
"Assist Gesture" parent setting, and the child setting within

Fixes: 64318213

Test: manual test of settings && make -j RunSettingsRoboTests
Change-Id: I2d2437e2036881a08977924dc1386aa1fab67070
This commit is contained in:
Kevin Chyn
2017-08-03 17:03:13 -07:00
parent b1c0e38284
commit bd947c7ba9
6 changed files with 46 additions and 89 deletions

View File

@@ -35,8 +35,6 @@ public class AssistGestureSettings extends DashboardFragment {
private static final String TAG = "AssistGesture";
private static final String KEY_ASSIST = "gesture_assist";
@Override
public int getMetricsCategory() {
return MetricsProto.MetricsEvent.SETTINGS_ASSIST_GESTURE;
@@ -60,8 +58,6 @@ public class AssistGestureSettings extends DashboardFragment {
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
Lifecycle lifecycle) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
controllers.add(new AssistGesturePreferenceController(context, lifecycle, KEY_ASSIST,
false /* assistOnly */));
controllers.addAll(FeatureFactory.getFactory(context).getAssistGestureFeatureProvider()
.getControllers(context, lifecycle));
@@ -86,8 +82,8 @@ public class AssistGestureSettings extends DashboardFragment {
@Override
protected boolean isPageSearchEnabled(Context context) {
return new AssistGesturePreferenceController(context, null /* lifecycle */,
null /* key */, false /* assistOnly */)
return new AssistGestureSettingsPreferenceController(context,
null /* lifecycle */, null /* key */, false /* assistOnly */)
.isAvailable();
}
};