Skip to content

Commit 978ed46

Browse files
narayankAndroid (Google) Code Review
authored andcommitted
Merge "Deprecate old TTS settings that are no longer in use."
2 parents 1e3fac8 + 6d63296 commit 978ed46

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

api/current.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17144,14 +17144,14 @@ package android.provider {
1714417144
field public static final java.lang.String SETTINGS_CLASSNAME = "settings_classname";
1714517145
field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
1714617146
field public static final java.lang.String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
17147-
field public static final java.lang.String TTS_DEFAULT_COUNTRY = "tts_default_country";
17148-
field public static final java.lang.String TTS_DEFAULT_LANG = "tts_default_lang";
17147+
field public static final deprecated java.lang.String TTS_DEFAULT_COUNTRY = "tts_default_country";
17148+
field public static final deprecated java.lang.String TTS_DEFAULT_LANG = "tts_default_lang";
1714917149
field public static final java.lang.String TTS_DEFAULT_PITCH = "tts_default_pitch";
1715017150
field public static final java.lang.String TTS_DEFAULT_RATE = "tts_default_rate";
1715117151
field public static final java.lang.String TTS_DEFAULT_SYNTH = "tts_default_synth";
17152-
field public static final java.lang.String TTS_DEFAULT_VARIANT = "tts_default_variant";
17152+
field public static final deprecated java.lang.String TTS_DEFAULT_VARIANT = "tts_default_variant";
1715317153
field public static final java.lang.String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
17154-
field public static final java.lang.String TTS_USE_DEFAULTS = "tts_use_defaults";
17154+
field public static final deprecated java.lang.String TTS_USE_DEFAULTS = "tts_use_defaults";
1715517155
field public static final java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
1715617156
field public static final java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
1715717157
field public static final java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";

core/java/android/provider/Settings.java

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import android.os.Bundle;
3939
import android.os.RemoteException;
4040
import android.os.SystemProperties;
41+
import android.speech.tts.TextToSpeech;
4142
import android.text.TextUtils;
4243
import android.util.AndroidException;
4344
import android.util.Log;
@@ -1062,7 +1063,7 @@ public static void getConfiguration(ContentResolver cr, Configuration outConfig)
10621063
public static void clearConfiguration(Configuration inoutConfig) {
10631064
inoutConfig.fontScale = 0;
10641065
}
1065-
1066+
10661067
/**
10671068
* Convenience function to write a batch of configuration-related
10681069
* settings from a {@link Configuration} object.
@@ -2781,7 +2782,11 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
27812782
* of the application settings.
27822783
* 1 = override application settings,
27832784
* 0 = use application settings (if specified).
2785+
*
2786+
* @deprecated The value of this setting is no longer respected by
2787+
* the framework text to speech APIs as of the Ice Cream Sandwich release.
27842788
*/
2789+
@Deprecated
27852790
public static final String TTS_USE_DEFAULTS = "tts_use_defaults";
27862791

27872792
/**
@@ -2801,24 +2806,46 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
28012806

28022807
/**
28032808
* Default text-to-speech language.
2809+
*
2810+
* @deprecated this setting is no longer in use, as of the Ice Cream
2811+
* Sandwich release. Apps should never need to read this setting directly,
2812+
* instead can query the TextToSpeech framework classes for the default
2813+
* locale. {@link TextToSpeech#getLanguage()}.
28042814
*/
2815+
@Deprecated
28052816
public static final String TTS_DEFAULT_LANG = "tts_default_lang";
28062817

28072818
/**
28082819
* Default text-to-speech country.
2820+
*
2821+
* @deprecated this setting is no longer in use, as of the Ice Cream
2822+
* Sandwich release. Apps should never need to read this setting directly,
2823+
* instead can query the TextToSpeech framework classes for the default
2824+
* locale. {@link TextToSpeech#getLanguage()}.
28092825
*/
2826+
@Deprecated
28102827
public static final String TTS_DEFAULT_COUNTRY = "tts_default_country";
28112828

28122829
/**
28132830
* Default text-to-speech locale variant.
2831+
*
2832+
* @deprecated this setting is no longer in use, as of the Ice Cream
2833+
* Sandwich release. Apps should never need to read this setting directly,
2834+
* instead can query the TextToSpeech framework classes for the
2835+
* locale that is in use {@link TextToSpeech#getLanguage()}.
28142836
*/
2837+
@Deprecated
28152838
public static final String TTS_DEFAULT_VARIANT = "tts_default_variant";
28162839

28172840
/**
28182841
* Stores the default tts locales on a per engine basis. Stored as
28192842
* a comma seperated list of values, each value being of the form
28202843
* {@code engine_name:locale} for example,
2821-
* {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}.
2844+
* {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This
2845+
* supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and
2846+
* {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this
2847+
* setting directly, and can query the TextToSpeech framework classes
2848+
* for the locale that is in use.
28222849
*
28232850
* @hide
28242851
*/
@@ -4014,6 +4041,7 @@ public static final String getBluetoothInputDevicePriorityKey(String address) {
40144041
TTS_DEFAULT_LANG,
40154042
TTS_DEFAULT_COUNTRY,
40164043
TTS_ENABLED_PLUGINS,
4044+
TTS_DEFAULT_LOCALE,
40174045
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
40184046
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
40194047
WIFI_NUM_OPEN_NETWORKS_KEPT,

0 commit comments

Comments
 (0)