summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/VoiceInputOutputSettings.java
diff options
context:
space:
mode:
authorXiyuan Xia <xiyuan@google.com>2015-06-02 14:55:32 -0700
committerXiyuan Xia <xiyuan@google.com>2015-06-10 08:43:28 -0700
commit86a554091d0705f2152fcf1d78ca1c7720d9842c (patch)
treee168fef6ad80da3a545c80101935d68198e438f1 /src/com/android/settings/VoiceInputOutputSettings.java
parent275e6f75208c08eb925048a330ed4aab96e51033 (diff)
downloadpackages_apps_Settings-86a554091d0705f2152fcf1d78ca1c7720d9842c.zip
packages_apps_Settings-86a554091d0705f2152fcf1d78ca1c7720d9842c.tar.gz
packages_apps_Settings-86a554091d0705f2152fcf1d78ca1c7720d9842c.tar.bz2
Implement default assist app setting
- Add "None" support to AppListPreference - Add DefaultAssistPreference to manage assist; - Add AppListPreferenceWithSettings to show a settings icon; - Implement DefaultAssistPreference based on AppListPreferenceWithSettings; - Move voice input settings into ManageAssist and implement it based on AppListPreferenceWithSettings; Bug:20210110 Change-Id: If283b8b55a46b428ecfa6e45dc2123292b1d4302
Diffstat (limited to 'src/com/android/settings/VoiceInputOutputSettings.java')
-rw-r--r--src/com/android/settings/VoiceInputOutputSettings.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/com/android/settings/VoiceInputOutputSettings.java b/src/com/android/settings/VoiceInputOutputSettings.java
index e052f8e..a264d50 100644
--- a/src/com/android/settings/VoiceInputOutputSettings.java
+++ b/src/com/android/settings/VoiceInputOutputSettings.java
@@ -31,7 +31,6 @@ public class VoiceInputOutputSettings {
private static final String TAG = "VoiceInputOutputSettings";
private static final String KEY_VOICE_CATEGORY = "voice_category";
- private static final String KEY_VOICE_INPUT_SETTINGS = "voice_input_settings";
private static final String KEY_TTS_SETTINGS = "tts_settings";
private PreferenceGroup mParent;
@@ -47,19 +46,16 @@ public class VoiceInputOutputSettings {
}
public void onCreate() {
-
mParent = mFragment.getPreferenceScreen();
mVoiceCategory = (PreferenceCategory) mParent.findPreference(KEY_VOICE_CATEGORY);
- mVoiceInputSettingsPref = mVoiceCategory.findPreference(KEY_VOICE_INPUT_SETTINGS);
mTtsSettingsPref = mVoiceCategory.findPreference(KEY_TTS_SETTINGS);
populateOrRemovePreferences();
}
private void populateOrRemovePreferences() {
- boolean hasVoiceInputPrefs = populateOrRemoveVoiceInputPrefs();
boolean hasTtsPrefs = populateOrRemoveTtsPrefs();
- if (!hasVoiceInputPrefs && !hasTtsPrefs) {
+ if (!hasTtsPrefs) {
// There were no TTS settings and no recognizer settings,
// so it should be safe to hide the preference category
// entirely.
@@ -67,16 +63,6 @@ public class VoiceInputOutputSettings {
}
}
- private boolean populateOrRemoveVoiceInputPrefs() {
- VoiceInputHelper helper = new VoiceInputHelper(mFragment.getActivity());
- if (!helper.hasItems()) {
- mVoiceCategory.removePreference(mVoiceInputSettingsPref);
- return false;
- }
-
- return true;
- }
-
private boolean populateOrRemoveTtsPrefs() {
if (mTtsEngines.getEngines().isEmpty()) {
mVoiceCategory.removePreference(mTtsSettingsPref);