Merge "Fix bug 3421125 Use default TTS rate for demo in Settings"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9a777a8513
@@ -265,6 +265,9 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment implements
|
|||||||
}
|
}
|
||||||
mDefaultRatePref.setValue(String.valueOf(mDefaultRate));
|
mDefaultRatePref.setValue(String.valueOf(mDefaultRate));
|
||||||
mDefaultRatePref.setOnPreferenceChangeListener(this);
|
mDefaultRatePref.setOnPreferenceChangeListener(this);
|
||||||
|
// apply the default rate so the TTS demo in the Settings screen uses it, even if
|
||||||
|
// the use of default settings is not enforced
|
||||||
|
mTts.setSpeechRate(mDefaultRate/100.0f);
|
||||||
|
|
||||||
// Default language / country / variant : these three values map to a single ListPref
|
// Default language / country / variant : these three values map to a single ListPref
|
||||||
// representing the matching Locale
|
// representing the matching Locale
|
||||||
@@ -355,7 +358,6 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment implements
|
|||||||
mDefaultLocVariant = new String();
|
mDefaultLocVariant = new String();
|
||||||
}
|
}
|
||||||
mTts.setLanguage(new Locale(mDefaultLanguage, mDefaultCountry, mDefaultLocVariant));
|
mTts.setLanguage(new Locale(mDefaultLanguage, mDefaultCountry, mDefaultLocVariant));
|
||||||
mTts.setSpeechRate(mDefaultRate/100.0f);
|
|
||||||
initDefaultSettings();
|
initDefaultSettings();
|
||||||
updateWidgetState();
|
updateWidgetState();
|
||||||
checkVoiceData();
|
checkVoiceData();
|
||||||
|
|||||||
Reference in New Issue
Block a user