Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d632962 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Deprecate old TTS settings that are no longer in use.

These settings can never be written to by engines and apps
anyway, and reading them does not serve any useful purpose.
The only code that needs to read these settings are the framework
TTS classes.

bug:5149036
Change-Id: I1f95977d241eb6b550105f45d29fee889da3fbd1
parent cfc0f2c2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -17120,14 +17120,14 @@ package android.provider {
    field public static final java.lang.String SETTINGS_CLASSNAME = "settings_classname";
    field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
    field public static final java.lang.String TOUCH_EXPLORATION_ENABLED = "touch_exploration_enabled";
    field public static final java.lang.String TTS_DEFAULT_COUNTRY = "tts_default_country";
    field public static final java.lang.String TTS_DEFAULT_LANG = "tts_default_lang";
    field public static final deprecated java.lang.String TTS_DEFAULT_COUNTRY = "tts_default_country";
    field public static final deprecated java.lang.String TTS_DEFAULT_LANG = "tts_default_lang";
    field public static final java.lang.String TTS_DEFAULT_PITCH = "tts_default_pitch";
    field public static final java.lang.String TTS_DEFAULT_RATE = "tts_default_rate";
    field public static final java.lang.String TTS_DEFAULT_SYNTH = "tts_default_synth";
    field public static final java.lang.String TTS_DEFAULT_VARIANT = "tts_default_variant";
    field public static final deprecated java.lang.String TTS_DEFAULT_VARIANT = "tts_default_variant";
    field public static final java.lang.String TTS_ENABLED_PLUGINS = "tts_enabled_plugins";
    field public static final java.lang.String TTS_USE_DEFAULTS = "tts_use_defaults";
    field public static final deprecated java.lang.String TTS_USE_DEFAULTS = "tts_use_defaults";
    field public static final java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled";
    field public static final java.lang.String USE_GOOGLE_MAIL = "use_google_mail";
    field public static final java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count";
+30 −2
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.os.BatteryManager;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.speech.tts.TextToSpeech;
import android.text.TextUtils;
import android.util.AndroidException;
import android.util.Log;
@@ -2781,7 +2782,11 @@ public final class Settings {
         * of the application settings.
         * 1 = override application settings,
         * 0 = use application settings (if specified).
         *
         * @deprecated  The value of this setting is no longer respected by
         * the framework text to speech APIs as of the Ice Cream Sandwich release.
         */
        @Deprecated
        public static final String TTS_USE_DEFAULTS = "tts_use_defaults";

        /**
@@ -2801,24 +2806,46 @@ public final class Settings {

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

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

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

        /**
         * Stores the default tts locales on a per engine basis. Stored as
         * a comma seperated list of values, each value being of the form
         * {@code engine_name:locale} for example,
         * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}.
         * {@code com.foo.ttsengine:eng-USA,com.bar.ttsengine:esp-ESP}. This
         * supersedes {@link #TTS_DEFAULT_LANG}, {@link #TTS_DEFAULT_COUNTRY} and
         * {@link #TTS_DEFAULT_VARIANT}. Apps should never need to read this
         * setting directly, and can query the TextToSpeech framework classes
         * for the locale that is in use.
         *
         * @hide
         */
@@ -4007,6 +4034,7 @@ public final class Settings {
            TTS_DEFAULT_LANG,
            TTS_DEFAULT_COUNTRY,
            TTS_ENABLED_PLUGINS,
            TTS_DEFAULT_LOCALE,
            WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
            WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
            WIFI_NUM_OPEN_NETWORKS_KEPT,