Ensure default pitch is used when none is specified.

Test: Manual
Change-Id: I09ab4ccea439d01c65a06c3c44b4ff210ddf7f54
This commit is contained in:
Sergio Sancho
2017-01-26 20:39:05 +00:00
parent 2cff9319e8
commit b0cde2caba

View File

@@ -409,6 +409,10 @@ public abstract class TextToSpeechService extends Service {
return getSecureSettingInt(Settings.Secure.TTS_DEFAULT_RATE, Engine.DEFAULT_RATE);
}
private int getDefaultPitch() {
return getSecureSettingInt(Settings.Secure.TTS_DEFAULT_PITCH, Engine.DEFAULT_PITCH);
}
private String[] getSettingsLocale() {
final Locale locale = mEngineHelper.getLocalePrefForEngine(mPackageName);
return TtsEngines.toOldLocaleStringFormat(locale);
@@ -925,7 +929,7 @@ public abstract class TextToSpeechService extends Service {
}
int getPitch() {
return getIntParam(mParams, Engine.KEY_PARAM_PITCH, Engine.DEFAULT_PITCH);
return getIntParam(mParams, Engine.KEY_PARAM_PITCH, getDefaultPitch());
}
@Override