speech: Remove hard-coded preference key from the controllers
OnDeviceRecognitionPreferenceController and TtsPreferenceController had their preference keys hard-coded which was breaking AccessibilitySettingsTest. The key is now left to be read from the super constructor. Bug: 283449837 Test: Manual, already existing robotests Change-Id: Ibe11a2134fffea0a081ca9f5e2f9441911574efa
This commit is contained in:
@@ -26,15 +26,9 @@ import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
public class TtsPreferenceController extends BasePreferenceController {
|
||||
|
||||
private static final String KEY_TEXT_TO_SPEECH = "tts_settings_summary";
|
||||
|
||||
@VisibleForTesting
|
||||
TtsEngines mTtsEngines;
|
||||
|
||||
public TtsPreferenceController(Context context) {
|
||||
this(context, KEY_TEXT_TO_SPEECH);
|
||||
}
|
||||
|
||||
public TtsPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mTtsEngines = new TtsEngines(context);
|
||||
@@ -46,8 +40,4 @@ public class TtsPreferenceController extends BasePreferenceController {
|
||||
mContext.getResources().getBoolean(R.bool.config_show_tts_settings_summary)
|
||||
? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
|
||||
public String getPreferenceKey() {
|
||||
return KEY_TEXT_TO_SPEECH;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user