Remove Language and Input duplicates

Change the keys in the Language and Input screen for the
gesture and tts-output settings so they can be disabled
in search. Then change the preference controllers to take
a key as input to avoid crashes on the other screens with
these settings.

Merge for: ag/2098173/

Test: make RunSettingsRoboTests
Bug: 33701673
Change-Id: I8bc0776131fcac5a6edf7e8271bc53252c2fc719
This commit is contained in:
Matthew Fritze
2017-04-11 16:35:48 -07:00
parent 803f0c96e8
commit 742467ec9f
32 changed files with 259 additions and 90 deletions

View File

@@ -35,7 +35,7 @@ public class AssistGesturePreferenceController extends GesturePreferenceControll
implements OnPause, OnResume {
private static final String PREF_KEY_VIDEO = "gesture_assist_video";
private static final String PREF_KEY_ASSIST_GESTURE = "gesture_assist";
private final String mAssistGesturePrefKey;
private final AssistGestureFeatureProvider mFeatureProvider;
private final SettingObserver mSettingObserver;
@@ -44,11 +44,12 @@ public class AssistGesturePreferenceController extends GesturePreferenceControll
private PreferenceScreen mScreen;
private Preference mPreference;
public AssistGesturePreferenceController(Context context, Lifecycle lifecycle) {
public AssistGesturePreferenceController(Context context, Lifecycle lifecycle, String key) {
super(context, lifecycle);
mFeatureProvider = FeatureFactory.getFactory(context).getAssistGestureFeatureProvider();
mSettingObserver = new SettingObserver();
mWasAvailable = isAvailable();
mAssistGesturePrefKey = key;
}
@Override
@@ -110,7 +111,7 @@ public class AssistGesturePreferenceController extends GesturePreferenceControll
@Override
public String getPreferenceKey() {
return PREF_KEY_ASSIST_GESTURE;
return mAssistGesturePrefKey;
}
@Override