diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-09-26 20:19:32 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-26 20:19:32 -0700 |
commit | 031c410adc368a6242a834e23741afa09db69fa0 (patch) | |
tree | aab4f5125870569e1620618e0f9c1a391de4b416 | |
parent | 177bb01c7d23dfb08eb59adbf89af5ebbea7801a (diff) | |
parent | 68b7a6d14b68b38324ffd275c7227805c7d99b2d (diff) | |
download | frameworks_base-031c410adc368a6242a834e23741afa09db69fa0.zip frameworks_base-031c410adc368a6242a834e23741afa09db69fa0.tar.gz frameworks_base-031c410adc368a6242a834e23741afa09db69fa0.tar.bz2 |
am 68b7a6d1: Merge "First step towards cleaning up Global settings." into jb-mr1-dev
* commit '68b7a6d14b68b38324ffd275c7227805c7d99b2d':
First step towards cleaning up Global settings.
10 files changed, 166 insertions, 736 deletions
diff --git a/api/current.txt b/api/current.txt index ffba303..2cdc0d2 100644 --- a/api/current.txt +++ b/api/current.txt @@ -18917,7 +18917,7 @@ package android.provider { field public static final deprecated java.lang.String WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS = "wifi_watchdog_background_check_timeout_ms"; field public static final deprecated java.lang.String WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT = "wifi_watchdog_initial_ignored_ping_count"; field public static final deprecated java.lang.String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; - field public static final java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; + field public static final deprecated java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count"; field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_DELAY_MS = "wifi_watchdog_ping_delay_ms"; field public static final deprecated java.lang.String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 965e488..0817672 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3054,6 +3054,7 @@ public final class Settings { /** * @deprecated Use {@link android.provider.Settings.Global#DATA_ROAMING} instead */ + @Deprecated public static final String DATA_ROAMING = Global.DATA_ROAMING; /** @@ -3215,27 +3216,6 @@ public final class Settings { "lock_screen_owner_info_enabled"; /** - * @deprecated Use {@link android.provider.Settings.Global#DISPLAY_SIZE_FORCED} instead - * @hide - */ - @Deprecated - public static final String DISPLAY_SIZE_FORCED = Global.DISPLAY_SIZE_FORCED; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DISPLAY_DENSITY_FORCED} instead - * @hide - */ - @Deprecated - public static final String DISPLAY_DENSITY_FORCED = Global.DISPLAY_DENSITY_FORCED; - - /** - * @deprecated Use {@link android.provider.Settings.Global#ASSISTED_GPS_ENABLED} instead - * @hide - */ - @Deprecated - public static final String ASSISTED_GPS_ENABLED = Global.ASSISTED_GPS_ENABLED; - - /** * The Logging ID (a unique 64-bit value) as a hex string. * Used as a pseudonymous identifier for logging. * @deprecated This identifier is poorly initialized and has @@ -3251,44 +3231,6 @@ public final class Settings { public static final String NETWORK_PREFERENCE = Global.NETWORK_PREFERENCE; /** - * @deprecated Use {@link android.provider.Settings.Global#TETHER_SUPPORTED} instead - * @hide - */ - @Deprecated - public static final String TETHER_SUPPORTED = Global.TETHER_SUPPORTED; - - /** - * @deprecated Use {@link android.provider.Settings.Global#TETHER_DUN_REQUIRED} instead - * @hide - */ - @Deprecated - public static final String TETHER_DUN_REQUIRED = Global.TETHER_DUN_REQUIRED; - - /** - * @deprecated Use {@link android.provider.Settings.Global#TETHER_DUN_REQUIRED} instead - * @hide - */ - @Deprecated - public static final String TETHER_DUN_APN = Global.TETHER_DUN_APN; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DATA_ACTIVITY_TIMEOUT_MOBILE} - * instead - * @hide - */ - @Deprecated - public static final String DATA_ACTIVITY_TIMEOUT_MOBILE = - Global.DATA_ACTIVITY_TIMEOUT_MOBILE; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DATA_ACTIVITY_TIMEOUT_MOBILE} - * instead - * @hide - */ - @Deprecated - public static final String DATA_ACTIVITY_TIMEOUT_WIFI = Global.DATA_ACTIVITY_TIMEOUT_WIFI; - - /** * No longer supported. */ public static final String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; @@ -3304,13 +3246,6 @@ public final class Settings { public static final String PARENTAL_CONTROL_REDIRECT_URL = "parental_control_redirect_url"; /** - * @deprecated Use {@link android.provider.Settings.Global#SAMPLING_PROFILER_MS} instead - * @hide - */ - @Deprecated - public static final String SAMPLING_PROFILER_MS = Global.SAMPLING_PROFILER_MS; - - /** * Settings classname to launch when Settings is clicked from All * Applications. Needed because of user testing between the old * and new Settings apps. @@ -3562,14 +3497,6 @@ public final class Settings { @Deprecated public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON; - /** - * @deprecated Use {@link android.provider.Settings.Global#WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON} - * instead. - * {@hide} - */ - @Deprecated - public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON = - Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON; /** * @deprecated Use {@link android.provider.Settings.Global#WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY} @@ -3580,15 +3507,6 @@ public final class Settings { Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY; /** - * @deprecated Use {@link android.provider.Settings.Global#WIFI_COUNTRY_CODE} - * instead. - * @hide - */ - @Deprecated - public static final String WIFI_COUNTRY_CODE = Global.WIFI_COUNTRY_CODE; - - - /** * @deprecated Use {@link android.provider.Settings.Global#WIFI_NUM_OPEN_NETWORKS_KEPT} * instead. */ @@ -3604,39 +3522,6 @@ public final class Settings { public static final String WIFI_ON = Global.WIFI_ON; /** - * Used to save the Wifi_ON state prior to tethering. - * This state will be checked to restore Wifi after - * the user turns off tethering. - * - * @hide - * @deprecated Use {@link android.provider.Settings.Global#WIFI_SAVED_STATE} - * instead. - */ - @Deprecated - public static final String WIFI_SAVED_STATE = Global.WIFI_SAVED_STATE; - - /** - * AP SSID - * - * @hide - */ - public static final String WIFI_AP_SSID = "wifi_ap_ssid"; - - /** - * AP security - * - * @hide - */ - public static final String WIFI_AP_SECURITY = "wifi_ap_security"; - - /** - * AP passphrase - * - * @hide - */ - public static final String WIFI_AP_PASSWD = "wifi_ap_passwd"; - - /** * The acceptable packet loss percentage (range 0 - 100) before trying * another AP on the same network. * @deprecated This setting is not used. @@ -3700,8 +3585,9 @@ public final class Settings { public static final String WIFI_WATCHDOG_MAX_AP_CHECKS = "wifi_watchdog_max_ap_checks"; /** - * Whether the Wi-Fi watchdog is enabled. + * @deprecated Use {@link android.provider.Settings.Global#WIFI_WATCHDOG_ON} instead */ + @Deprecated public static final String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; /** @@ -3733,66 +3619,6 @@ public final class Settings { public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS = "wifi_watchdog_ping_timeout_ms"; /** - * ms delay before rechecking an 'online' wifi connection when it is thought to be unstable. - * @deprecated This setting is not used. - * @hide - */ - @Deprecated - public static final String WIFI_WATCHDOG_ARP_CHECK_INTERVAL_MS = - "wifi_watchdog_arp_interval_ms"; - - /** - * ms delay interval between rssi polling when the signal is known to be weak - * @deprecated This setting is not used. - * @hide - */ - @Deprecated - public static final String WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS = - "wifi_watchdog_rssi_fetch_interval_ms"; - - /** - * Number of ARP pings per check. - * @deprecated This setting is not used. - * @hide - */ - @Deprecated - public static final String WIFI_WATCHDOG_NUM_ARP_PINGS = "wifi_watchdog_num_arp_pings"; - - /** - * Minimum number of responses to the arp pings to consider the test 'successful'. - * @deprecated This setting is not used. - * @hide - */ - @Deprecated - public static final String WIFI_WATCHDOG_MIN_ARP_RESPONSES = - "wifi_watchdog_min_arp_responses"; - - /** - * Timeout on ARP pings - * @deprecated This setting is not used. - * @hide - */ - @Deprecated - public static final String WIFI_WATCHDOG_ARP_PING_TIMEOUT_MS = - "wifi_watchdog_arp_ping_timeout_ms"; - - /** - * Setting to turn off poor network avoidance on Wi-Fi. Feature is enabled by default and - * the setting needs to be set to 0 to disable it. - * @hide - */ - public static final String WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED = - "wifi_watchdog_poor_network_test_enabled"; - - /** - * Setting to turn on suspend optimizations at screen off on Wi-Fi. Enabled by default and - * needs to be set to 0 to disable it. - * @hide - */ - public static final String WIFI_SUSPEND_OPTIMIZATIONS_ENABLED = - "wifi_suspend_optimizations_enabled"; - - /** * @deprecated Use * {@link android.provider.Settings.Global#WIFI_MAX_DHCP_RETRY_COUNT} instead */ @@ -3800,22 +3626,6 @@ public final class Settings { public static final String WIFI_MAX_DHCP_RETRY_COUNT = Global.WIFI_MAX_DHCP_RETRY_COUNT; /** - * The operational wifi frequency band - * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO}, - * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or - * {@link WifiManager#WIFI_FREQUENCY_BAND_2GHZ} - * - * @hide - */ - public static final String WIFI_FREQUENCY_BAND = "wifi_frequency_band"; - - /** - * The Wi-Fi peer-to-peer device name - * @hide - */ - public static final String WIFI_P2P_DEVICE_NAME = "wifi_p2p_device_name"; - - /** * Setting to turn off captive portal detection. Feature is enabled by default and * the setting needs to be set to 0 to disable it. * @hide @@ -3834,6 +3644,7 @@ public final class Settings { * @deprecated Use * {@link android.provider.Settings.Global#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead */ + @Deprecated public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; @@ -3858,27 +3669,6 @@ public final class Settings { = "allowed_geolocation_origins"; /** - * @deprecated Use {@link android.provider.Settings.Global#MOBILE_DATA} instead - * @hide - */ - @Deprecated - public static final String MOBILE_DATA = Global.MOBILE_DATA; - - /** - * @deprecated Use {@link android.provider.Settings.Global#CDMA_ROAMING_MODE} instead - * @hide - */ - @Deprecated - public static final String CDMA_ROAMING_MODE = Global.CDMA_ROAMING_MODE; - - /** - * @deprecated Use {@link android.provider.Settings.Global#CDMA_ROAMING_MODE} instead - * @hide - */ - @Deprecated - public static final String CDMA_SUBSCRIPTION_MODE = Global.CDMA_SUBSCRIPTION_MODE; - - /** * The preferred network mode 7 = Global * 6 = EvDo only * 5 = CDMA w/o EvDo @@ -3902,14 +3692,6 @@ public final class Settings { public static final String PREFERRED_TTY_MODE = "preferred_tty_mode"; - - /** - * @deprecated Use {@link android.provider.Settings.Global#CDMA_CELL_BROADCAST_SMS} instead - * @hide - */ - @Deprecated - public static final String CDMA_CELL_BROADCAST_SMS = Global.CDMA_CELL_BROADCAST_SMS; - /** * The cdma subscription 0 = Subscription from RUIM, when available * 1 = Subscription from NV @@ -4128,13 +3910,6 @@ public final class Settings { public static final String SEND_ACTION_APP_ERROR = "send_action_app_error"; /** - * @deprecated Use {@link android.provider.Settings.Global#WTF_IS_FATAL} instead - * @hide - */ - @Deprecated - public static final String WTF_IS_FATAL = Global.WTF_IS_FATAL; - - /** * Maximum age of entries kept by {@link com.android.internal.os.IDropBoxManagerService}. * @hide */ @@ -4239,121 +4014,6 @@ public final class Settings { public static final String WIFI_IDLE_MS = Global.WIFI_IDLE_MS; /** - * The interval in milliseconds to issue wake up scans when wifi needs - * to connect. This is necessary to connect to an access point when - * device is on the move and the screen is off. - * @hide - * @deprecated Use {@link android.provider.Settings.Global#WIFI_FRAMEWORK_SCAN_INTERVAL_MS} - * instead. - */ - @Deprecated - public static final String WIFI_FRAMEWORK_SCAN_INTERVAL_MS = - Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS; - - /** - * The interval in milliseconds to scan as used by the wifi supplicant - * @hide - * @deprecated Use {@link android.provider.Settings.Global#WIFI_SUPPLICANT_SCAN_INTERVAL_MS} - * instead. - */ - @Deprecated - public static final String WIFI_SUPPLICANT_SCAN_INTERVAL_MS = - Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_POLL_INTERVAL_MS} - * instead. - * @hide - */ - @Deprecated - public static final String PDP_WATCHDOG_POLL_INTERVAL_MS = - Global.PDP_WATCHDOG_POLL_INTERVAL_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_LONG_POLL_INTERVAL_MS} - * instead. - * @hide - */ - @Deprecated - public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS = - Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS} - * instead. - * @hide - */ - @Deprecated - public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS = - Global.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_TRIGGER_PACKET_COUNT} - * instead. - * @hide - */ - @Deprecated - public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT = - Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT; - - /** - * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_ERROR_POLL_COUNT} - * instead. - * @hide - */ - @Deprecated - public static final String PDP_WATCHDOG_ERROR_POLL_COUNT = - Global.PDP_WATCHDOG_ERROR_POLL_COUNT; - - /** - * @deprecated Use {@link android.provider.Settings.Global#PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT} - * instead. - * @hide - */ - @Deprecated - public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT = - Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS} - * instead. - * @hide - */ - @Deprecated - public static final String DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS = - Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS} - * instead. - * @hide - */ - @Deprecated - public static final String DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS = - Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#GPRS_REGISTER_CHECK_PERIOD_MS} - * instead. - * @hide - */ - @Deprecated - public static final String GPRS_REGISTER_CHECK_PERIOD_MS = - Global.GPRS_REGISTER_CHECK_PERIOD_MS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead - * @hide - */ - public static final String NITZ_UPDATE_SPACING = Global.NITZ_UPDATE_SPACING; - - /** - * @deprecated Use {@link android.provider.Settings.Global#NITZ_UPDATE_SPACING} instead - * @hide - */ - public static final String NITZ_UPDATE_DIFF = Global.NITZ_UPDATE_DIFF; - - /** * The maximum reconnect delay for short network outages or when the network is suspended * due to phone use. * @hide @@ -4362,20 +4022,6 @@ public final class Settings { "sync_max_retry_delay_in_seconds"; /** - * @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_INTERVAL_MS} instead. - * @hide - */ - public static final String SMS_OUTGOING_CHECK_INTERVAL_MS = - Global.SMS_OUTGOING_CHECK_INTERVAL_MS; - - /** - * @deprecated Use {@link Settings.Global#SMS_OUTGOING_CHECK_MAX_COUNT} instead. - * @hide - */ - public static final String SMS_OUTGOING_CHECK_MAX_COUNT = - Global.SMS_OUTGOING_CHECK_MAX_COUNT; - - /** * The global search provider chosen by the user (if multiple global * search providers are installed). This will be the provider returned * by {@link SearchManager#getGlobalSearchActivity()} if it's still @@ -4610,72 +4256,6 @@ public final class Settings { public static final String DEFAULT_INSTALL_LOCATION = "default_install_location"; /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_POLLING_SEC} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_POLLING_SEC = Global.THROTTLE_POLLING_SEC; - - /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_THRESHOLD_BYTES} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_THRESHOLD_BYTES = Global.THROTTLE_THRESHOLD_BYTES; - - /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_VALUE_KBITSPS} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_VALUE_KBITSPS = Global.THROTTLE_VALUE_KBITSPS; - - /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_VALUE_KBITSPS} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_RESET_DAY = Global.THROTTLE_RESET_DAY; - - /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_NOTIFICATION_TYPE} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_NOTIFICATION_TYPE = Global.THROTTLE_NOTIFICATION_TYPE; - - /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_HELP_URI} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_HELP_URI = Global.THROTTLE_HELP_URI; - - /** - * @deprecated Use {@link android.provider.Settings.Global#THROTTLE_MAX_NTP_CACHE_AGE_SEC} instead - * @hide - */ - @Deprecated - public static final String THROTTLE_MAX_NTP_CACHE_AGE_SEC = - Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DOWNLOAD_MAX_BYTES_OVER_MOBILE} instead - * @hide - */ - @Deprecated - public static final String DOWNLOAD_MAX_BYTES_OVER_MOBILE = - Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE; - - /** - * @deprecated Use {@link android.provider.Settings.Global#DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE} instead - * @hide - */ - @Deprecated - public static final String DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = - Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE; - - /** * ms during which to consume extra events related to Inet connection condition * after a transtion to fully-connected * @hide @@ -4692,30 +4272,6 @@ public final class Settings { "inet_condition_debounce_down_delay"; /** - * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DATA_SERVICE_URL} instead - * @hide - */ - @Deprecated - public static final String SETUP_PREPAID_DATA_SERVICE_URL = - Global.SETUP_PREPAID_DATA_SERVICE_URL; - - /** - * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DETECTION_TARGET_URL} instead - * @hide - */ - @Deprecated - public static final String SETUP_PREPAID_DETECTION_TARGET_URL = - Global.SETUP_PREPAID_DETECTION_TARGET_URL; - - /** - * @deprecated Use {@link android.provider.Settings.Global#SETUP_PREPAID_DETECTION_REDIR_HOST} instead - * @hide - */ - @Deprecated - public static final String SETUP_PREPAID_DETECTION_REDIR_HOST = - Global.SETUP_PREPAID_DETECTION_REDIR_HOST; - - /** * Whether screensavers are enabled. * @hide */ @@ -4750,118 +4306,6 @@ public final class Settings { */ public static final String SCREENSAVER_DEFAULT_COMPONENT = "screensaver_default_component"; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_ENABLED = Global.NETSTATS_ENABLED; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_POLL_INTERVAL = Global.NETSTATS_POLL_INTERVAL; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_TIME_CACHE_MAX_AGE = Global.NETSTATS_TIME_CACHE_MAX_AGE; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_GLOBAL_ALERT_BYTES = Global.NETSTATS_GLOBAL_ALERT_BYTES; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_SAMPLE_ENABLED = Global.NETSTATS_SAMPLE_ENABLED; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_REPORT_XT_OVER_DEV = Global.NETSTATS_REPORT_XT_OVER_DEV; - - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_DEV_BUCKET_DURATION = Global.NETSTATS_DEV_BUCKET_DURATION; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_DEV_PERSIST_BYTES = Global.NETSTATS_DEV_PERSIST_BYTES; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_DEV_ROTATE_AGE = Global.NETSTATS_DEV_ROTATE_AGE; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_DEV_DELETE_AGE = Global.NETSTATS_DEV_DELETE_AGE; - - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_BUCKET_DURATION = Global.NETSTATS_UID_BUCKET_DURATION; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_PERSIST_BYTES = Global.NETSTATS_UID_PERSIST_BYTES; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_ROTATE_AGE = Global.NETSTATS_UID_ROTATE_AGE; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_DELETE_AGE = Global.NETSTATS_UID_DELETE_AGE; - - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_TAG_BUCKET_DURATION = Global.NETSTATS_UID_TAG_BUCKET_DURATION; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_TAG_PERSIST_BYTES = Global.NETSTATS_UID_TAG_PERSIST_BYTES; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_TAG_ROTATE_AGE = Global.NETSTATS_UID_TAG_ROTATE_AGE; - /** @deprecated The NETSTATS_* symbols live in Settings.Global.* now - * {@hide} */ - @Deprecated - public static final String NETSTATS_UID_TAG_DELETE_AGE = Global.NETSTATS_UID_TAG_DELETE_AGE; - - /** Preferred NTP server. {@hide} - * @deprecated moved to Settings.Global */ - public static final String NTP_SERVER = Global.NTP_SERVER; - - /** Timeout in milliseconds to wait for NTP server. {@hide} - * @deprecated moved to Settings.Global */ - public static final String NTP_TIMEOUT = Global.NTP_TIMEOUT; - - /** Autofill server address (Used in WebView/browser). - * @deprecated moved to Settings.Global - * {@hide} */ - public static final String WEB_AUTOFILL_QUERY_URL = Global.WEB_AUTOFILL_QUERY_URL; - - /** - * Whether the package manager should send package verification broadcasts for verifiers to - * review apps prior to installation. - * @deprecated moved to Settings.Global - * 1 = request apps to be verified prior to installation, if a verifier exists. - * 0 = do not verify apps before installation - * {@hide} - */ - @Deprecated - public static final String PACKAGE_VERIFIER_ENABLE = "package_verifier_enable"; - - /** Timeout for package verification. - * @deprecated moved to Settings.Global - * {@hide} */ - @Deprecated - public static final String PACKAGE_VERIFIER_TIMEOUT = "verifier_timeout"; - - /** Default response code for package verification. - * @deprecated moved to Settings.Global - * {@hide} */ - @Deprecated - public static final String PACKAGE_VERIFIER_DEFAULT_RESPONSE = "verifier_default_response"; - /** {@hide} */ public static final String READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT = "read_external_storage_enforced_default"; diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 8275b25..dc4213e 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -472,7 +472,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { String value = mContext.getResources().getBoolean(R.bool.assisted_gps_enabled) ? "1" : "0"; db.execSQL("INSERT OR IGNORE INTO secure(name,value) values('" + - Settings.Secure.ASSISTED_GPS_ENABLED + "','" + value + "');"); + Settings.Global.ASSISTED_GPS_ENABLED + "','" + value + "');"); db.setTransactionSuccessful(); } finally { db.endTransaction(); @@ -1190,7 +1190,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { try { stmt = db.compileStatement("INSERT OR REPLACE INTO secure(name,value)" + " VALUES(?,?);"); - loadBooleanSetting(stmt, Settings.Secure.PACKAGE_VERIFIER_ENABLE, + loadBooleanSetting(stmt, Settings.Global.PACKAGE_VERIFIER_ENABLE, R.bool.def_package_verifier_enable); db.setTransactionSuccessful(); } finally { @@ -1300,9 +1300,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { db.beginTransaction(); try { String[] settingsToMove = { - Settings.Secure.PACKAGE_VERIFIER_ENABLE, - Settings.Secure.PACKAGE_VERIFIER_TIMEOUT, - Settings.Secure.PACKAGE_VERIFIER_DEFAULT_RESPONSE + Settings.Global.PACKAGE_VERIFIER_ENABLE, + Settings.Global.PACKAGE_VERIFIER_TIMEOUT, + Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE }; moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true); @@ -1319,9 +1319,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { db.beginTransaction(); try { String[] settingsToMove = { - Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS, - Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS, - Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS + Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS, + Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS, + Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS }; moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 6d8b08f..2c0bf75 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -110,94 +110,94 @@ public class SettingsProvider extends ContentProvider { // table, shared across all users // These must match Settings.Secure.MOVED_TO_GLOBAL sSecureGlobalKeys = new HashSet<String>(); - sSecureGlobalKeys.add(Settings.Secure.ADB_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.ASSISTED_GPS_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.BLUETOOTH_ON); - sSecureGlobalKeys.add(Settings.Secure.CDMA_CELL_BROADCAST_SMS); - sSecureGlobalKeys.add(Settings.Secure.CDMA_ROAMING_MODE); - sSecureGlobalKeys.add(Settings.Secure.CDMA_SUBSCRIPTION_MODE); - sSecureGlobalKeys.add(Settings.Secure.DATA_ACTIVITY_TIMEOUT_MOBILE); - sSecureGlobalKeys.add(Settings.Secure.DATA_ACTIVITY_TIMEOUT_WIFI); - sSecureGlobalKeys.add(Settings.Secure.DATA_ROAMING); - sSecureGlobalKeys.add(Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.DEVICE_PROVISIONED); - sSecureGlobalKeys.add(Settings.Secure.DISPLAY_DENSITY_FORCED); - sSecureGlobalKeys.add(Settings.Secure.DISPLAY_SIZE_FORCED); - sSecureGlobalKeys.add(Settings.Secure.DOWNLOAD_MAX_BYTES_OVER_MOBILE); - sSecureGlobalKeys.add(Settings.Secure.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); - sSecureGlobalKeys.add(Settings.Secure.INSTALL_NON_MARKET_APPS); - sSecureGlobalKeys.add(Settings.Secure.MOBILE_DATA); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_DEV_BUCKET_DURATION); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_DEV_DELETE_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_DEV_PERSIST_BYTES); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_DEV_ROTATE_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_GLOBAL_ALERT_BYTES); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_POLL_INTERVAL); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_REPORT_XT_OVER_DEV); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_SAMPLE_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_TIME_CACHE_MAX_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_BUCKET_DURATION); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_DELETE_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_PERSIST_BYTES); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_ROTATE_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_TAG_BUCKET_DURATION); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_TAG_DELETE_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_TAG_PERSIST_BYTES); - sSecureGlobalKeys.add(Settings.Secure.NETSTATS_UID_TAG_ROTATE_AGE); - sSecureGlobalKeys.add(Settings.Secure.NETWORK_PREFERENCE); - sSecureGlobalKeys.add(Settings.Secure.NITZ_UPDATE_DIFF); - sSecureGlobalKeys.add(Settings.Secure.NITZ_UPDATE_SPACING); - sSecureGlobalKeys.add(Settings.Secure.NTP_SERVER); - sSecureGlobalKeys.add(Settings.Secure.NTP_TIMEOUT); - sSecureGlobalKeys.add(Settings.Secure.PDP_WATCHDOG_ERROR_POLL_COUNT); - sSecureGlobalKeys.add(Settings.Secure.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); - sSecureGlobalKeys.add(Settings.Secure.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); - sSecureGlobalKeys.add(Settings.Secure.PDP_WATCHDOG_POLL_INTERVAL_MS); - sSecureGlobalKeys.add(Settings.Secure.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); - sSecureGlobalKeys.add(Settings.Secure.SAMPLING_PROFILER_MS); - sSecureGlobalKeys.add(Settings.Secure.SETUP_PREPAID_DATA_SERVICE_URL); - sSecureGlobalKeys.add(Settings.Secure.SETUP_PREPAID_DETECTION_REDIR_HOST); - sSecureGlobalKeys.add(Settings.Secure.SETUP_PREPAID_DETECTION_TARGET_URL); - sSecureGlobalKeys.add(Settings.Secure.TETHER_DUN_APN); - sSecureGlobalKeys.add(Settings.Secure.TETHER_DUN_REQUIRED); - sSecureGlobalKeys.add(Settings.Secure.TETHER_SUPPORTED); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_HELP_URI); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_MAX_NTP_CACHE_AGE_SEC); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_NOTIFICATION_TYPE); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_POLLING_SEC); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_RESET_DAY); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_THRESHOLD_BYTES); - sSecureGlobalKeys.add(Settings.Secure.THROTTLE_VALUE_KBITSPS); - sSecureGlobalKeys.add(Settings.Secure.USB_MASS_STORAGE_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.USE_GOOGLE_MAIL); - sSecureGlobalKeys.add(Settings.Secure.WEB_AUTOFILL_QUERY_URL); - sSecureGlobalKeys.add(Settings.Secure.WIFI_COUNTRY_CODE); - sSecureGlobalKeys.add(Settings.Secure.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); - sSecureGlobalKeys.add(Settings.Secure.WIFI_FREQUENCY_BAND); - sSecureGlobalKeys.add(Settings.Secure.WIFI_IDLE_MS); - sSecureGlobalKeys.add(Settings.Secure.WIFI_MAX_DHCP_RETRY_COUNT); - sSecureGlobalKeys.add(Settings.Secure.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); - sSecureGlobalKeys.add(Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); - sSecureGlobalKeys.add(Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); - sSecureGlobalKeys.add(Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT); - sSecureGlobalKeys.add(Settings.Secure.WIFI_ON); - sSecureGlobalKeys.add(Settings.Secure.WIFI_P2P_DEVICE_NAME); - sSecureGlobalKeys.add(Settings.Secure.WIFI_SAVED_STATE); - sSecureGlobalKeys.add(Settings.Secure.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); - sSecureGlobalKeys.add(Settings.Secure.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_NUM_ARP_PINGS); - sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_ON); - sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); - sSecureGlobalKeys.add(Settings.Secure.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS); - sSecureGlobalKeys.add(Settings.Secure.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); - sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_ENABLE); - sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_TIMEOUT); - sSecureGlobalKeys.add(Settings.Secure.PACKAGE_VERIFIER_DEFAULT_RESPONSE); - sSecureGlobalKeys.add(Settings.Secure.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); - sSecureGlobalKeys.add(Settings.Secure.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); - sSecureGlobalKeys.add(Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS); - sSecureGlobalKeys.add(Settings.Secure.WTF_IS_FATAL); + sSecureGlobalKeys.add(Settings.Global.ADB_ENABLED); + sSecureGlobalKeys.add(Settings.Global.ASSISTED_GPS_ENABLED); + sSecureGlobalKeys.add(Settings.Global.BLUETOOTH_ON); + sSecureGlobalKeys.add(Settings.Global.CDMA_CELL_BROADCAST_SMS); + sSecureGlobalKeys.add(Settings.Global.CDMA_ROAMING_MODE); + sSecureGlobalKeys.add(Settings.Global.CDMA_SUBSCRIPTION_MODE); + sSecureGlobalKeys.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE); + sSecureGlobalKeys.add(Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI); + sSecureGlobalKeys.add(Settings.Global.DATA_ROAMING); + sSecureGlobalKeys.add(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED); + sSecureGlobalKeys.add(Settings.Global.DEVICE_PROVISIONED); + sSecureGlobalKeys.add(Settings.Global.DISPLAY_DENSITY_FORCED); + sSecureGlobalKeys.add(Settings.Global.DISPLAY_SIZE_FORCED); + sSecureGlobalKeys.add(Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE); + sSecureGlobalKeys.add(Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE); + sSecureGlobalKeys.add(Settings.Global.INSTALL_NON_MARKET_APPS); + sSecureGlobalKeys.add(Settings.Global.MOBILE_DATA); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_DEV_BUCKET_DURATION); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_DEV_DELETE_AGE); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_DEV_PERSIST_BYTES); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_DEV_ROTATE_AGE); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_ENABLED); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_POLL_INTERVAL); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_REPORT_XT_OVER_DEV); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_SAMPLE_ENABLED); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_BUCKET_DURATION); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_DELETE_AGE); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_PERSIST_BYTES); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_ROTATE_AGE); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_TAG_DELETE_AGE); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES); + sSecureGlobalKeys.add(Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE); + sSecureGlobalKeys.add(Settings.Global.NETWORK_PREFERENCE); + sSecureGlobalKeys.add(Settings.Global.NITZ_UPDATE_DIFF); + sSecureGlobalKeys.add(Settings.Global.NITZ_UPDATE_SPACING); + sSecureGlobalKeys.add(Settings.Global.NTP_SERVER); + sSecureGlobalKeys.add(Settings.Global.NTP_TIMEOUT); + sSecureGlobalKeys.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); + sSecureGlobalKeys.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); + sSecureGlobalKeys.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); + sSecureGlobalKeys.add(Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS); + sSecureGlobalKeys.add(Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT); + sSecureGlobalKeys.add(Settings.Global.SAMPLING_PROFILER_MS); + sSecureGlobalKeys.add(Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL); + sSecureGlobalKeys.add(Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST); + sSecureGlobalKeys.add(Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL); + sSecureGlobalKeys.add(Settings.Global.TETHER_DUN_APN); + sSecureGlobalKeys.add(Settings.Global.TETHER_DUN_REQUIRED); + sSecureGlobalKeys.add(Settings.Global.TETHER_SUPPORTED); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_HELP_URI); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_NOTIFICATION_TYPE); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_POLLING_SEC); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_RESET_DAY); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_THRESHOLD_BYTES); + sSecureGlobalKeys.add(Settings.Global.THROTTLE_VALUE_KBITSPS); + sSecureGlobalKeys.add(Settings.Global.USB_MASS_STORAGE_ENABLED); + sSecureGlobalKeys.add(Settings.Global.USE_GOOGLE_MAIL); + sSecureGlobalKeys.add(Settings.Global.WEB_AUTOFILL_QUERY_URL); + sSecureGlobalKeys.add(Settings.Global.WIFI_COUNTRY_CODE); + sSecureGlobalKeys.add(Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS); + sSecureGlobalKeys.add(Settings.Global.WIFI_FREQUENCY_BAND); + sSecureGlobalKeys.add(Settings.Global.WIFI_IDLE_MS); + sSecureGlobalKeys.add(Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT); + sSecureGlobalKeys.add(Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS); + sSecureGlobalKeys.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON); + sSecureGlobalKeys.add(Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY); + sSecureGlobalKeys.add(Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT); + sSecureGlobalKeys.add(Settings.Global.WIFI_ON); + sSecureGlobalKeys.add(Settings.Global.WIFI_P2P_DEVICE_NAME); + sSecureGlobalKeys.add(Settings.Global.WIFI_SAVED_STATE); + sSecureGlobalKeys.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS); + sSecureGlobalKeys.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED); + sSecureGlobalKeys.add(Settings.Global.WIFI_WATCHDOG_NUM_ARP_PINGS); + sSecureGlobalKeys.add(Settings.Global.WIFI_WATCHDOG_ON); + sSecureGlobalKeys.add(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED); + sSecureGlobalKeys.add(Settings.Global.WIFI_WATCHDOG_RSSI_FETCH_INTERVAL_MS); + sSecureGlobalKeys.add(Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON); + sSecureGlobalKeys.add(Settings.Global.PACKAGE_VERIFIER_ENABLE); + sSecureGlobalKeys.add(Settings.Global.PACKAGE_VERIFIER_TIMEOUT); + sSecureGlobalKeys.add(Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE); + sSecureGlobalKeys.add(Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS); + sSecureGlobalKeys.add(Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS); + sSecureGlobalKeys.add(Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS); + sSecureGlobalKeys.add(Settings.Global.WTF_IS_FATAL); // Keys from the 'system' table now moved to 'global' // These must match Settings.System.MOVED_TO_GLOBAL diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index ceb17c7..891cac7 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -1509,8 +1509,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { // which is where we store the value and maybe make this // asynchronous. enforceAccessPermission(); - boolean retVal = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.MOBILE_DATA, 1) == 1; + boolean retVal = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.MOBILE_DATA, 1) == 1; if (VDBG) log("getMobileDataEnabled returning " + retVal); return retVal; } diff --git a/services/java/com/android/server/ThrottleService.java b/services/java/com/android/server/ThrottleService.java index f36d73a..75eb3c4 100644 --- a/services/java/com/android/server/ThrottleService.java +++ b/services/java/com/android/server/ThrottleService.java @@ -211,20 +211,20 @@ public class ThrottleService extends IThrottleManager.Stub { void register(Context context) { ContentResolver resolver = context.getContentResolver(); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_POLLING_SEC), false, this); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_THRESHOLD_BYTES), false, this); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_VALUE_KBITSPS), false, this); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_RESET_DAY), false, this); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_NOTIFICATION_TYPE), false, this); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_HELP_URI), false, this); - resolver.registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.THROTTLE_MAX_NTP_CACHE_AGE_SEC), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_POLLING_SEC), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_THRESHOLD_BYTES), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_VALUE_KBITSPS), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_RESET_DAY), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_NOTIFICATION_TYPE), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_HELP_URI), false, this); + resolver.registerContentObserver(Settings.Global.getUriFor( + Settings.Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC), false, this); } void unregister(Context context) { @@ -297,8 +297,8 @@ public class ThrottleService extends IThrottleManager.Stub { public String getHelpUri() { enforceAccessPermission(); - return Settings.Secure.getString(mContext.getContentResolver(), - Settings.Secure.THROTTLE_HELP_URI); + return Settings.Global.getString(mContext.getContentResolver(), + Settings.Global.THROTTLE_HELP_URI); } // TODO - fetch for the iface @@ -436,18 +436,18 @@ public class ThrottleService extends IThrottleManager.Stub { int pollingPeriod = mContext.getResources().getInteger( R.integer.config_datause_polling_period_sec); - mPolicyPollPeriodSec = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.THROTTLE_POLLING_SEC, pollingPeriod); + mPolicyPollPeriodSec = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.THROTTLE_POLLING_SEC, pollingPeriod); // TODO - remove testing stuff? long defaultThreshold = mContext.getResources().getInteger( R.integer.config_datause_threshold_bytes); int defaultValue = mContext.getResources().getInteger( R.integer.config_datause_throttle_kbitsps); - long threshold = Settings.Secure.getLong(mContext.getContentResolver(), - Settings.Secure.THROTTLE_THRESHOLD_BYTES, defaultThreshold); - int value = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.THROTTLE_VALUE_KBITSPS, defaultValue); + long threshold = Settings.Global.getLong(mContext.getContentResolver(), + Settings.Global.THROTTLE_THRESHOLD_BYTES, defaultThreshold); + int value = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.THROTTLE_VALUE_KBITSPS, defaultValue); mPolicyThreshold.set(threshold); mPolicyThrottleValue.set(value); @@ -456,14 +456,14 @@ public class ThrottleService extends IThrottleManager.Stub { mPolicyThreshold.set(TESTING_THRESHOLD); } - mPolicyResetDay = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.THROTTLE_RESET_DAY, -1); + mPolicyResetDay = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.THROTTLE_RESET_DAY, -1); if (mPolicyResetDay == -1 || ((mPolicyResetDay < 1) || (mPolicyResetDay > 28))) { Random g = new Random(); mPolicyResetDay = 1 + g.nextInt(28); // 1-28 - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.THROTTLE_RESET_DAY, mPolicyResetDay); + Settings.Global.putInt(mContext.getContentResolver(), + Settings.Global.THROTTLE_RESET_DAY, mPolicyResetDay); } if (mIface == null) { mPolicyThreshold.set(0); @@ -471,11 +471,11 @@ public class ThrottleService extends IThrottleManager.Stub { int defaultNotificationType = mContext.getResources().getInteger( R.integer.config_datause_notification_type); - mPolicyNotificationsAllowedMask = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.THROTTLE_NOTIFICATION_TYPE, defaultNotificationType); + mPolicyNotificationsAllowedMask = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.THROTTLE_NOTIFICATION_TYPE, defaultNotificationType); - final int maxNtpCacheAgeSec = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.THROTTLE_MAX_NTP_CACHE_AGE_SEC, + final int maxNtpCacheAgeSec = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.THROTTLE_MAX_NTP_CACHE_AGE_SEC, (int) (MAX_NTP_CACHE_AGE / 1000)); mMaxNtpCacheAge = maxNtpCacheAgeSec * 1000; diff --git a/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java b/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java index afa0eec..569acee 100644 --- a/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/ThrottleServiceTest.java @@ -242,9 +242,9 @@ public class ThrottleServiceTest extends AndroidTestCase { */ public void setThrottlePolicy(long thresholdBytes, int valueKbitps, int resetDay) { final ContentResolver resolver = getContext().getContentResolver(); - Settings.Secure.putLong(resolver, Settings.Secure.THROTTLE_THRESHOLD_BYTES, thresholdBytes); - Settings.Secure.putInt(resolver, Settings.Secure.THROTTLE_VALUE_KBITSPS, valueKbitps); - Settings.Secure.putInt(resolver, Settings.Secure.THROTTLE_RESET_DAY, resetDay); + Settings.Global.putLong(resolver, Settings.Global.THROTTLE_THRESHOLD_BYTES, thresholdBytes); + Settings.Global.putInt(resolver, Settings.Global.THROTTLE_VALUE_KBITSPS, valueKbitps); + Settings.Global.putInt(resolver, Settings.Global.THROTTLE_RESET_DAY, resetDay); } /** @@ -252,9 +252,9 @@ public class ThrottleServiceTest extends AndroidTestCase { */ public void clearThrottlePolicy() { final ContentResolver resolver = getContext().getContentResolver(); - Settings.Secure.putString(resolver, Settings.Secure.THROTTLE_THRESHOLD_BYTES, null); - Settings.Secure.putString(resolver, Settings.Secure.THROTTLE_VALUE_KBITSPS, null); - Settings.Secure.putString(resolver, Settings.Secure.THROTTLE_RESET_DAY, null); + Settings.Global.putString(resolver, Settings.Global.THROTTLE_THRESHOLD_BYTES, null); + Settings.Global.putString(resolver, Settings.Global.THROTTLE_VALUE_KBITSPS, null); + Settings.Global.putString(resolver, Settings.Global.THROTTLE_RESET_DAY, null); } /** diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index e7927ae..ab9db88 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -608,8 +608,8 @@ public class WifiStateMachine extends StateMachine { mPrimaryDeviceType = mContext.getResources().getString( R.string.config_wifi_p2p_device_type); - mUserWantsSuspendOpt.set(Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED, 1) == 1); + mUserWantsSuspendOpt.set(Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED, 1) == 1); mContext.registerReceiver( new BroadcastReceiver() { @@ -659,13 +659,13 @@ public class WifiStateMachine extends StateMachine { }, new IntentFilter(ACTION_DELAYED_DRIVER_STOP)); - mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor( - Settings.Secure.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED), false, + mContext.getContentResolver().registerContentObserver(Settings.Global.getUriFor( + Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED), false, new ContentObserver(getHandler()) { @Override public void onChange(boolean selfChange) { - mUserWantsSuspendOpt.set(Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED, 1) == 1); + mUserWantsSuspendOpt.set(Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED, 1) == 1); } }); @@ -1074,8 +1074,8 @@ public class WifiStateMachine extends StateMachine { */ public void setFrequencyBand(int band, boolean persist) { if (persist) { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.WIFI_FREQUENCY_BAND, + Settings.Global.putInt(mContext.getContentResolver(), + Settings.Global.WIFI_FREQUENCY_BAND, band); } sendMessage(obtainMessage(CMD_SET_FREQUENCY_BAND, band, 0)); @@ -1331,8 +1331,8 @@ public class WifiStateMachine extends StateMachine { * Set the frequency band from the system setting value, if any. */ private void setFrequencyBand() { - int band = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.WIFI_FREQUENCY_BAND, WifiManager.WIFI_FREQUENCY_BAND_AUTO); + int band = Settings.Global.getInt(mContext.getContentResolver(), + Settings.Global.WIFI_FREQUENCY_BAND, WifiManager.WIFI_FREQUENCY_BAND_AUTO); setFrequencyBand(band, false); } diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java index 7fa6aac..4440145 100644 --- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java +++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java @@ -343,13 +343,13 @@ public class WifiWatchdogStateMachine extends StateMachine { // Watchdog is always enabled. Poor network detection can be seperately turned on/off // TODO: Remove this setting & clean up state machine since we always have // watchdog in an enabled state - putSettingsBoolean(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON, true); + putSettingsGlobalBoolean(contentResolver, Settings.Global.WIFI_WATCHDOG_ON, true); // disable poor network avoidance if (sWifiOnly) { logd("Disabling poor network avoidance for wi-fi only device"); - putSettingsBoolean(contentResolver, - Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false); + putSettingsGlobalBoolean(contentResolver, + Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false); } WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context); @@ -402,7 +402,7 @@ public class WifiWatchdogStateMachine extends StateMachine { }; mContext.getContentResolver().registerContentObserver( - Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_ON), + Settings.Global.getUriFor(Settings.Global.WIFI_WATCHDOG_ON), false, contentObserver); } @@ -418,7 +418,7 @@ public class WifiWatchdogStateMachine extends StateMachine { }; mContext.getContentResolver().registerContentObserver( - Settings.Secure.getUriFor(Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED), + Settings.Global.getUriFor(Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED), false, contentObserver); } @@ -432,7 +432,8 @@ public class WifiWatchdogStateMachine extends StateMachine { } private boolean isWatchdogEnabled() { - boolean ret = getSettingsBoolean(mContentResolver, Settings.Secure.WIFI_WATCHDOG_ON, true); + boolean ret = getSettingsGlobalBoolean( + mContentResolver, Settings.Global.WIFI_WATCHDOG_ON, true); if (DBG) logd("Watchdog enabled " + ret); return ret; } @@ -440,8 +441,8 @@ public class WifiWatchdogStateMachine extends StateMachine { private void updateSettings() { if (DBG) logd("Updating secure settings"); - mPoorNetworkDetectionEnabled = getSettingsBoolean(mContentResolver, - Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, true); + mPoorNetworkDetectionEnabled = getSettingsGlobalBoolean(mContentResolver, + Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, true); } /** @@ -927,21 +928,6 @@ public class WifiWatchdogStateMachine extends StateMachine { } /** - * Convenience function for retrieving a single secure settings value - * as a string with a default value. - * - * @param cr The ContentResolver to access. - * @param name The name of the setting to retrieve. - * @param def Value to return if the setting is not defined. - * - * @return The setting's current value, or 'def' if it is not defined - */ - private static String getSettingsStr(ContentResolver cr, String name, String def) { - String v = Settings.Secure.getString(cr, name); - return v != null ? v : def; - } - - /** * Convenience function for retrieving a single secure settings value as a * boolean. Note that internally setting values are always stored as * strings; this function converts the string to a boolean for you. The @@ -954,8 +940,8 @@ public class WifiWatchdogStateMachine extends StateMachine { * @return The setting's current value, or 'def' if it is not defined or not * a valid boolean. */ - private static boolean getSettingsBoolean(ContentResolver cr, String name, boolean def) { - return Settings.Secure.getInt(cr, name, def ? 1 : 0) == 1; + private static boolean getSettingsGlobalBoolean(ContentResolver cr, String name, boolean def) { + return Settings.Global.getInt(cr, name, def ? 1 : 0) == 1; } /** @@ -970,8 +956,8 @@ public class WifiWatchdogStateMachine extends StateMachine { * @param value The new value for the setting. * @return true if the value was set, false on database errors */ - private static boolean putSettingsBoolean(ContentResolver cr, String name, boolean value) { - return Settings.Secure.putInt(cr, name, value ? 1 : 0); + private static boolean putSettingsGlobalBoolean(ContentResolver cr, String name, boolean value) { + return Settings.Global.putInt(cr, name, value ? 1 : 0); } private static void logd(String s) { diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 8f0d8f0..8670650 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -2039,8 +2039,8 @@ public class WifiP2pService extends IWifiP2pManager.Stub { } private String getPersistedDeviceName() { - String deviceName = Settings.Secure.getString(mContext.getContentResolver(), - Settings.Secure.WIFI_P2P_DEVICE_NAME); + String deviceName = Settings.Global.getString(mContext.getContentResolver(), + Settings.Global.WIFI_P2P_DEVICE_NAME); if (deviceName == null) { /* We use the 4 digits of the ANDROID_ID to have a friendly * default that has low likelihood of collision with a peer */ @@ -2062,8 +2062,8 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mThisDevice.deviceName = devName; mWifiNative.setP2pSsidPostfix("-" + mThisDevice.deviceName); - Settings.Secure.putString(mContext.getContentResolver(), - Settings.Secure.WIFI_P2P_DEVICE_NAME, devName); + Settings.Global.putString(mContext.getContentResolver(), + Settings.Global.WIFI_P2P_DEVICE_NAME, devName); sendThisDeviceChangedBroadcast(); return true; } |