diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-10-01 13:39:08 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-10-02 13:55:15 -0700 |
commit | 6e2bee75cea415621165698fdd9ce857bbb8872e (patch) | |
tree | 840286617a3603685bb9f134e2fe4c924b8afef4 | |
parent | 0944d625448209185452eb4e800daec49de51986 (diff) | |
download | frameworks_base-6e2bee75cea415621165698fdd9ce857bbb8872e.zip frameworks_base-6e2bee75cea415621165698fdd9ce857bbb8872e.tar.gz frameworks_base-6e2bee75cea415621165698fdd9ce857bbb8872e.tar.bz2 |
Migrate more System and Secure settings to Global.
Includes telephony, WindowManager, PackageManager, and debugging
settings. Update API to point towards moved values.
Bug: 7231764, 7231252, 7231156
Change-Id: I5828747205708872f19f83a5bc821ed0a801cb79
10 files changed, 262 insertions, 120 deletions
@@ -18810,11 +18810,14 @@ package android.provider { field public static final java.lang.String ADB_ENABLED = "adb_enabled"; field public static final java.lang.String AIRPLANE_MODE_ON = "airplane_mode_on"; field public static final java.lang.String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; + field public static final java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; + field public static final java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; field public static final java.lang.String AUTO_TIME = "auto_time"; field public static final java.lang.String AUTO_TIME_ZONE = "auto_time_zone"; field public static final java.lang.String BLUETOOTH_ON = "bluetooth_on"; field public static final android.net.Uri CONTENT_URI; field public static final java.lang.String DATA_ROAMING = "data_roaming"; + field public static final java.lang.String DEBUG_APP = "debug_app"; field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned"; field public static final java.lang.String HTTP_PROXY = "http_proxy"; @@ -18825,10 +18828,13 @@ package android.provider { field public static final java.lang.String RADIO_CELL = "cell"; field public static final java.lang.String RADIO_NFC = "nfc"; field public static final java.lang.String RADIO_WIFI = "wifi"; + field public static final java.lang.String SHOW_PROCESSES = "show_processes"; field public static final java.lang.String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_global_version"; + field public static final java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; 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 WAIT_FOR_DEBUGGER = "wait_for_debugger"; field public static final java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; field public static final java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms"; field public static final java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on"; @@ -18840,6 +18846,7 @@ package android.provider { field public static final int WIFI_SLEEP_POLICY_NEVER = 2; // 0x2 field public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; // 0x1 field public static final java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; + field public static final java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale"; } public static class Settings.NameValueTable implements android.provider.BaseColumns { @@ -18954,9 +18961,9 @@ package android.provider { field public static final deprecated java.lang.String AIRPLANE_MODE_ON = "airplane_mode_on"; field public static final deprecated java.lang.String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; field public static final java.lang.String ALARM_ALERT = "alarm_alert"; - field public static final java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; + field public static final deprecated java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; field public static final deprecated java.lang.String ANDROID_ID = "android_id"; - field public static final java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; + field public static final deprecated java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; field public static final java.lang.String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; field public static final deprecated java.lang.String AUTO_TIME = "auto_time"; field public static final deprecated java.lang.String AUTO_TIME_ZONE = "auto_time_zone"; @@ -18966,7 +18973,7 @@ package android.provider { field public static final android.net.Uri CONTENT_URI; field public static final deprecated java.lang.String DATA_ROAMING = "data_roaming"; field public static final java.lang.String DATE_FORMAT = "date_format"; - field public static final java.lang.String DEBUG_APP = "debug_app"; + field public static final deprecated java.lang.String DEBUG_APP = "debug_app"; field public static final android.net.Uri DEFAULT_ALARM_ALERT_URI; field public static final android.net.Uri DEFAULT_NOTIFICATION_URI; field public static final android.net.Uri DEFAULT_RINGTONE_URI; @@ -19005,7 +19012,7 @@ package android.provider { field public static final deprecated java.lang.String SETTINGS_CLASSNAME = "settings_classname"; field public static final java.lang.String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; field public static final java.lang.String SHOW_GTALK_SERVICE_STATUS = "SHOW_GTALK_SERVICE_STATUS"; - field public static final java.lang.String SHOW_PROCESSES = "show_processes"; + field public static final deprecated java.lang.String SHOW_PROCESSES = "show_processes"; field public static final deprecated java.lang.String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; field public static final java.lang.String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; field public static final deprecated java.lang.String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; @@ -19015,7 +19022,7 @@ package android.provider { field public static final java.lang.String TEXT_AUTO_REPLACE = "auto_replace"; field public static final java.lang.String TEXT_SHOW_PASSWORD = "show_password"; field public static final java.lang.String TIME_12_24 = "time_12_24"; - field public static final java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; + field public static final deprecated java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; field public static final deprecated java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; field public static final java.lang.String USER_ROTATION = "user_rotation"; field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail"; @@ -19028,8 +19035,8 @@ package android.provider { field public static final java.lang.String[] VOLUME_SETTINGS; field public static final java.lang.String VOLUME_SYSTEM = "volume_system"; field public static final java.lang.String VOLUME_VOICE = "volume_voice"; - field public static final java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger"; - field public static final java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity"; + field public static final deprecated java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger"; + field public static final deprecated java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity"; field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; field public static final deprecated java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms"; field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on"; @@ -19057,7 +19064,7 @@ package android.provider { 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"; - field public static final java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale"; + field public static final deprecated java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale"; } public class SyncStateContract { diff --git a/api/current.txt b/api/current.txt index d6c75d1..4e7d012 100644 --- a/api/current.txt +++ b/api/current.txt @@ -18815,11 +18815,14 @@ package android.provider { field public static final java.lang.String ADB_ENABLED = "adb_enabled"; field public static final java.lang.String AIRPLANE_MODE_ON = "airplane_mode_on"; field public static final java.lang.String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; + field public static final java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; + field public static final java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; field public static final java.lang.String AUTO_TIME = "auto_time"; field public static final java.lang.String AUTO_TIME_ZONE = "auto_time_zone"; field public static final java.lang.String BLUETOOTH_ON = "bluetooth_on"; field public static final android.net.Uri CONTENT_URI; field public static final java.lang.String DATA_ROAMING = "data_roaming"; + field public static final java.lang.String DEBUG_APP = "debug_app"; field public static final java.lang.String DEVELOPMENT_SETTINGS_ENABLED = "development_settings_enabled"; field public static final java.lang.String DEVICE_PROVISIONED = "device_provisioned"; field public static final java.lang.String HTTP_PROXY = "http_proxy"; @@ -18830,10 +18833,13 @@ package android.provider { field public static final java.lang.String RADIO_CELL = "cell"; field public static final java.lang.String RADIO_NFC = "nfc"; field public static final java.lang.String RADIO_WIFI = "wifi"; + field public static final java.lang.String SHOW_PROCESSES = "show_processes"; field public static final java.lang.String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; field public static final java.lang.String SYS_PROP_SETTING_VERSION = "sys.settings_global_version"; + field public static final java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; 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 WAIT_FOR_DEBUGGER = "wait_for_debugger"; field public static final java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; field public static final java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms"; field public static final java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on"; @@ -18845,6 +18851,7 @@ package android.provider { field public static final int WIFI_SLEEP_POLICY_NEVER = 2; // 0x2 field public static final int WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED = 1; // 0x1 field public static final java.lang.String WIFI_WATCHDOG_ON = "wifi_watchdog_on"; + field public static final java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale"; } public static class Settings.NameValueTable implements android.provider.BaseColumns { @@ -18959,9 +18966,9 @@ package android.provider { field public static final deprecated java.lang.String AIRPLANE_MODE_ON = "airplane_mode_on"; field public static final deprecated java.lang.String AIRPLANE_MODE_RADIOS = "airplane_mode_radios"; field public static final java.lang.String ALARM_ALERT = "alarm_alert"; - field public static final java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; + field public static final deprecated java.lang.String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; field public static final deprecated java.lang.String ANDROID_ID = "android_id"; - field public static final java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; + field public static final deprecated java.lang.String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; field public static final java.lang.String APPEND_FOR_LAST_AUDIBLE = "_last_audible"; field public static final deprecated java.lang.String AUTO_TIME = "auto_time"; field public static final deprecated java.lang.String AUTO_TIME_ZONE = "auto_time_zone"; @@ -18971,7 +18978,7 @@ package android.provider { field public static final android.net.Uri CONTENT_URI; field public static final deprecated java.lang.String DATA_ROAMING = "data_roaming"; field public static final java.lang.String DATE_FORMAT = "date_format"; - field public static final java.lang.String DEBUG_APP = "debug_app"; + field public static final deprecated java.lang.String DEBUG_APP = "debug_app"; field public static final android.net.Uri DEFAULT_ALARM_ALERT_URI; field public static final android.net.Uri DEFAULT_NOTIFICATION_URI; field public static final android.net.Uri DEFAULT_RINGTONE_URI; @@ -19010,7 +19017,7 @@ package android.provider { field public static final deprecated java.lang.String SETTINGS_CLASSNAME = "settings_classname"; field public static final java.lang.String SETUP_WIZARD_HAS_RUN = "setup_wizard_has_run"; field public static final java.lang.String SHOW_GTALK_SERVICE_STATUS = "SHOW_GTALK_SERVICE_STATUS"; - field public static final java.lang.String SHOW_PROCESSES = "show_processes"; + field public static final deprecated java.lang.String SHOW_PROCESSES = "show_processes"; field public static final deprecated java.lang.String SHOW_WEB_SUGGESTIONS = "show_web_suggestions"; field public static final java.lang.String SOUND_EFFECTS_ENABLED = "sound_effects_enabled"; field public static final deprecated java.lang.String STAY_ON_WHILE_PLUGGED_IN = "stay_on_while_plugged_in"; @@ -19020,7 +19027,7 @@ package android.provider { field public static final java.lang.String TEXT_AUTO_REPLACE = "auto_replace"; field public static final java.lang.String TEXT_SHOW_PASSWORD = "show_password"; field public static final java.lang.String TIME_12_24 = "time_12_24"; - field public static final java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; + field public static final deprecated java.lang.String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; field public static final deprecated java.lang.String USB_MASS_STORAGE_ENABLED = "usb_mass_storage_enabled"; field public static final java.lang.String USER_ROTATION = "user_rotation"; field public static final deprecated java.lang.String USE_GOOGLE_MAIL = "use_google_mail"; @@ -19033,8 +19040,8 @@ package android.provider { field public static final java.lang.String[] VOLUME_SETTINGS; field public static final java.lang.String VOLUME_SYSTEM = "volume_system"; field public static final java.lang.String VOLUME_VOICE = "volume_voice"; - field public static final java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger"; - field public static final java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity"; + field public static final deprecated java.lang.String WAIT_FOR_DEBUGGER = "wait_for_debugger"; + field public static final deprecated java.lang.String WALLPAPER_ACTIVITY = "wallpaper_activity"; field public static final deprecated java.lang.String WIFI_MAX_DHCP_RETRY_COUNT = "wifi_max_dhcp_retry_count"; field public static final deprecated java.lang.String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = "wifi_mobile_data_transition_wakelock_timeout_ms"; field public static final deprecated java.lang.String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON = "wifi_networks_available_notification_on"; @@ -19062,7 +19069,7 @@ package android.provider { 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"; - field public static final java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale"; + field public static final deprecated java.lang.String WINDOW_ANIMATION_SCALE = "window_animation_scale"; } public class SyncStateContract { diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index cf3b802..f07002e 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -683,8 +683,8 @@ public class InputMethodService extends AbstractInputMethodService { com.android.internal.R.layout.input_method, null); mWindow.setContentView(mRootView); mRootView.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsComputer); - if (Settings.System.getInt(getContentResolver(), - Settings.System.FANCY_IME_ANIMATIONS, 0) != 0) { + if (Settings.Global.getInt(getContentResolver(), + Settings.Global.FANCY_IME_ANIMATIONS, 0) != 0) { mWindow.getWindow().setWindowAnimations( com.android.internal.R.style.Animation_InputMethodFancy); } diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 8f1210b..2a8cf21 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -19,6 +19,7 @@ package android.provider; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.app.SearchManager; +import android.app.WallpaperManager; import android.content.ComponentName; import android.content.ContentResolver; import android.content.ContentValues; @@ -940,6 +941,17 @@ public final class Settings { MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); + MOVED_TO_GLOBAL.add(Settings.Global.WINDOW_ANIMATION_SCALE); + MOVED_TO_GLOBAL.add(Settings.Global.TRANSITION_ANIMATION_SCALE); + MOVED_TO_GLOBAL.add(Settings.Global.ANIMATOR_DURATION_SCALE); + MOVED_TO_GLOBAL.add(Settings.Global.FANCY_IME_ANIMATIONS); + MOVED_TO_GLOBAL.add(Settings.Global.COMPATIBILITY_MODE); + MOVED_TO_GLOBAL.add(Settings.Global.EMERGENCY_TONE); + MOVED_TO_GLOBAL.add(Settings.Global.CALL_AUTO_RETRY); + MOVED_TO_GLOBAL.add(Settings.Global.DEBUG_APP); + MOVED_TO_GLOBAL.add(Settings.Global.WAIT_FOR_DEBUGGER); + MOVED_TO_GLOBAL.add(Settings.Global.SHOW_PROCESSES); + MOVED_TO_GLOBAL.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); } /** @@ -1608,14 +1620,20 @@ public final class Settings { /** * Name of an application package to be debugged. + * + * @deprecated Use {@link Global#DEBUG_APP} instead */ - public static final String DEBUG_APP = "debug_app"; + @Deprecated + public static final String DEBUG_APP = Global.DEBUG_APP; /** * If 1, when launching DEBUG_APP it will wait for the debugger before * starting user code. If 0, it will run normally. + * + * @deprecated Use {@link Global#WAIT_FOR_DEBUGGER} instead */ - public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; + @Deprecated + public static final String WAIT_FOR_DEBUGGER = Global.WAIT_FOR_DEBUGGER; /** * Whether or not to dim the screen. 0=no 1=yes @@ -1630,14 +1648,6 @@ public final class Settings { public static final String SCREEN_OFF_TIMEOUT = "screen_off_timeout"; /** - * If 0, the compatibility mode is off for all applications. - * If 1, older applications run under compatibility mode. - * TODO: remove this settings before code freeze (bug/1907571) - * @hide - */ - public static final String COMPATIBILITY_MODE = "compatibility_mode"; - - /** * The screen backlight brightness between 0 and 255. */ public static final String SCREEN_BRIGHTNESS = "screen_brightness"; @@ -1666,16 +1676,21 @@ public final class Settings { /** * Control whether the process CPU usage meter should be shown. + * + * @deprecated Use {@link Global#SHOW_PROCESSES} instead */ - public static final String SHOW_PROCESSES = "show_processes"; + @Deprecated + public static final String SHOW_PROCESSES = Global.SHOW_PROCESSES; /** * If 1, the activity manager will aggressively finish activities and * processes as soon as they are no longer needed. If 0, the normal * extended lifetime is used. + * + * @deprecated Use {@link Global#ALWAYS_FINISH_ACTIVITIES} instead */ - public static final String ALWAYS_FINISH_ACTIVITIES = - "always_finish_activities"; + @Deprecated + public static final String ALWAYS_FINISH_ACTIVITIES = Global.ALWAYS_FINISH_ACTIVITIES; /** * Determines which streams are affected by ringer mode changes. The @@ -1899,7 +1914,10 @@ public final class Settings { /** * Name of activity to use for wallpaper on the home screen. + * + * @deprecated Use {@link WallpaperManager} instead. */ + @Deprecated public static final String WALLPAPER_ACTIVITY = "wallpaper_activity"; /** @@ -1943,28 +1961,30 @@ public final class Settings { /** * Scaling factor for normal window animations. Setting to 0 will disable window * animations. + * + * @deprecated Use {@link Global#WINDOW_ANIMATION_SCALE} instead */ - public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; + @Deprecated + public static final String WINDOW_ANIMATION_SCALE = Global.WINDOW_ANIMATION_SCALE; /** * Scaling factor for activity transition animations. Setting to 0 will disable window * animations. + * + * @deprecated Use {@link Global#TRANSITION_ANIMATION_SCALE} instead */ - public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; + @Deprecated + public static final String TRANSITION_ANIMATION_SCALE = Global.TRANSITION_ANIMATION_SCALE; /** * Scaling factor for Animator-based animations. This affects both the start delay and * duration of all such animations. Setting to 0 will cause animations to end immediately. * The default value is 1. + * + * @deprecated Use {@link Global#ANIMATOR_DURATION_SCALE} instead */ - public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; - - /** - * Scaling factor for normal window animations. Setting to 0 will disable window - * animations. - * @hide - */ - public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; + @Deprecated + public static final String ANIMATOR_DURATION_SCALE = Global.ANIMATOR_DURATION_SCALE; /** * Control whether the accelerometer will be used to change screen @@ -2028,23 +2048,6 @@ public final class Settings { public static final String DTMF_TONE_TYPE_WHEN_DIALING = "dtmf_tone_type"; /** - * CDMA only settings - * Emergency Tone 0 = Off - * 1 = Alert - * 2 = Vibrate - * @hide - */ - public static final String EMERGENCY_TONE = "emergency_tone"; - - /** - * CDMA only settings - * Whether the auto retry is enabled. The value is - * boolean (1 or 0). - * @hide - */ - public static final String CALL_AUTO_RETRY = "call_auto_retry"; - - /** * Whether the hearing aid is enabled. The value is * boolean (1 or 0). * @hide @@ -2296,8 +2299,8 @@ public final class Settings { DATE_FORMAT, DTMF_TONE_WHEN_DIALING, DTMF_TONE_TYPE_WHEN_DIALING, - EMERGENCY_TONE, - CALL_AUTO_RETRY, + Global.EMERGENCY_TONE, + Global.CALL_AUTO_RETRY, HEARING_AID, TTY_MODE, SOUND_EFFECTS_ENABLED, @@ -2695,6 +2698,8 @@ public final class Settings { MOVED_TO_GLOBAL.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); MOVED_TO_GLOBAL.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER); + MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE); + MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_CDMA_SUBSCRIPTION); } /** @@ -3653,20 +3658,6 @@ public final class Settings { = "allowed_geolocation_origins"; /** - * The preferred network mode 7 = Global - * 6 = EvDo only - * 5 = CDMA w/o EvDo - * 4 = CDMA / EvDo auto - * 3 = GSM / WCDMA auto - * 2 = WCDMA only - * 1 = GSM only - * 0 = GSM / WCDMA preferred - * @hide - */ - public static final String PREFERRED_NETWORK_MODE = - "preferred_network_mode"; - - /** * The preferred TTY mode 0 = TTy Off, CDMA default * 1 = TTY Full * 2 = TTY HCO @@ -3677,14 +3668,6 @@ public final class Settings { "preferred_tty_mode"; /** - * The cdma subscription 0 = Subscription from RUIM, when available - * 1 = Subscription from NV - * @hide - */ - public static final String PREFERRED_CDMA_SUBSCRIPTION = - "preferred_cdma_subscription"; - - /** * Whether the enhanced voice privacy mode is enabled. * 0 = normal voice privacy * 1 = enhanced voice privacy @@ -5170,6 +5153,104 @@ public final class Settings { return BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX + address.toUpperCase(); } + /** + * Scaling factor for normal window animations. Setting to 0 will + * disable window animations. + */ + public static final String WINDOW_ANIMATION_SCALE = "window_animation_scale"; + + /** + * Scaling factor for activity transition animations. Setting to 0 will + * disable window animations. + */ + public static final String TRANSITION_ANIMATION_SCALE = "transition_animation_scale"; + + /** + * Scaling factor for Animator-based animations. This affects both the + * start delay and duration of all such animations. Setting to 0 will + * cause animations to end immediately. The default value is 1. + */ + public static final String ANIMATOR_DURATION_SCALE = "animator_duration_scale"; + + /** + * Scaling factor for normal window animations. Setting to 0 will + * disable window animations. + * + * @hide + */ + public static final String FANCY_IME_ANIMATIONS = "fancy_ime_animations"; + + /** + * If 0, the compatibility mode is off for all applications. + * If 1, older applications run under compatibility mode. + * TODO: remove this settings before code freeze (bug/1907571) + * @hide + */ + public static final String COMPATIBILITY_MODE = "compatibility_mode"; + + /** + * CDMA only settings + * Emergency Tone 0 = Off + * 1 = Alert + * 2 = Vibrate + * @hide + */ + public static final String EMERGENCY_TONE = "emergency_tone"; + + /** + * CDMA only settings + * Whether the auto retry is enabled. The value is + * boolean (1 or 0). + * @hide + */ + public static final String CALL_AUTO_RETRY = "call_auto_retry"; + + /** + * The preferred network mode 7 = Global + * 6 = EvDo only + * 5 = CDMA w/o EvDo + * 4 = CDMA / EvDo auto + * 3 = GSM / WCDMA auto + * 2 = WCDMA only + * 1 = GSM only + * 0 = GSM / WCDMA preferred + * @hide + */ + public static final String PREFERRED_NETWORK_MODE = + "preferred_network_mode"; + + /** + * The cdma subscription 0 = Subscription from RUIM, when available + * 1 = Subscription from NV + * @hide + */ + public static final String PREFERRED_CDMA_SUBSCRIPTION = + "preferred_cdma_subscription"; + + /** + * Name of an application package to be debugged. + */ + public static final String DEBUG_APP = "debug_app"; + + /** + * If 1, when launching DEBUG_APP it will wait for the debugger before + * starting user code. If 0, it will run normally. + */ + public static final String WAIT_FOR_DEBUGGER = "wait_for_debugger"; + + /** + * Control whether the process CPU usage meter should be shown. + */ + public static final String SHOW_PROCESSES = "show_processes"; + + /** + * If 1, the activity manager will aggressively finish activities and + * processes as soon as they are no longer needed. If 0, the normal + * extended lifetime is used. + */ + public static final String ALWAYS_FINISH_ACTIVITIES = + "always_finish_activities"; + // Populated lazily, guarded by class object: private static NameValueCache sNameValueCache = new NameValueCache( SYS_PROP_SETTING_VERSION, diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index f69c0af..2716b04 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -68,7 +68,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion' // is properly propagated through your change. Not doing so will result in a loss of user // settings. - private static final int DATABASE_VERSION = 90; + private static final int DATABASE_VERSION = 91; private Context mContext; private int mUserHandle; @@ -1400,6 +1400,39 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 90; } + if (upgradeVersion == 90) { + if (mUserHandle == UserHandle.USER_OWNER) { + db.beginTransaction(); + try { + String[] systemToGlobal = { + Settings.Global.WINDOW_ANIMATION_SCALE, + Settings.Global.TRANSITION_ANIMATION_SCALE, + Settings.Global.ANIMATOR_DURATION_SCALE, + Settings.Global.FANCY_IME_ANIMATIONS, + Settings.Global.COMPATIBILITY_MODE, + Settings.Global.EMERGENCY_TONE, + Settings.Global.CALL_AUTO_RETRY, + Settings.Global.DEBUG_APP, + Settings.Global.WAIT_FOR_DEBUGGER, + Settings.Global.SHOW_PROCESSES, + Settings.Global.ALWAYS_FINISH_ACTIVITIES, + }; + String[] secureToGlobal = { + Settings.Global.PREFERRED_NETWORK_MODE, + Settings.Global.PREFERRED_CDMA_SUBSCRIPTION, + }; + + moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_GLOBAL, systemToGlobal, true); + moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, secureToGlobal, true); + + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + } + } + upgradeVersion = 91; + } + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { @@ -1816,12 +1849,6 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadIntegerSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT, R.integer.def_screen_off_timeout); - // Set default cdma emergency tone - loadSetting(stmt, Settings.System.EMERGENCY_TONE, 0); - - // Set default cdma call auto retry - loadSetting(stmt, Settings.System.CALL_AUTO_RETRY, 0); - // Set default cdma DTMF type loadSetting(stmt, Settings.System.DTMF_TONE_TYPE_WHEN_DIALING, 0); @@ -1846,9 +1873,6 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE, R.bool.def_notification_pulse); - loadSetting(stmt, Settings.Global.SET_INSTALL_LOCATION, 0); - loadSetting(stmt, Settings.Global.DEFAULT_INSTALL_LOCATION, - PackageHelper.APP_INSTALL_AUTO); loadUISoundEffectsSettings(stmt); @@ -1912,16 +1936,6 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadSetting(stmt, Settings.Secure.WIFI_WATCHDOG_WATCH_LIST, wifiWatchList); } - // Set the preferred network mode to 0 = Global, CDMA default - int type; - if (TelephonyManager.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE) { - type = Phone.NT_MODE_GLOBAL; - } else { - type = SystemProperties.getInt("ro.telephony.default_network", - RILConstants.PREFERRED_NETWORK_MODE); - } - loadSetting(stmt, Settings.Secure.PREFERRED_NETWORK_MODE, type); - // Don't do this. The SystemServer will initialize ADB_ENABLED from a // persistent system property instead. //loadSetting(stmt, Settings.Secure.ADB_ENABLED, 0); @@ -2105,6 +2119,26 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadStringSetting(stmt, Settings.Global.UNLOCK_SOUND, R.string.def_unlock_sound); + loadSetting(stmt, Settings.Global.SET_INSTALL_LOCATION, 0); + loadSetting(stmt, Settings.Global.DEFAULT_INSTALL_LOCATION, + PackageHelper.APP_INSTALL_AUTO); + + // Set default cdma emergency tone + loadSetting(stmt, Settings.Global.EMERGENCY_TONE, 0); + + // Set default cdma call auto retry + loadSetting(stmt, Settings.Global.CALL_AUTO_RETRY, 0); + + // Set the preferred network mode to 0 = Global, CDMA default + int type; + if (TelephonyManager.getLteOnCdmaModeStatic() == PhoneConstants.LTE_ON_CDMA_TRUE) { + type = Phone.NT_MODE_GLOBAL; + } else { + type = SystemProperties.getInt("ro.telephony.default_network", + RILConstants.PREFERRED_NETWORK_MODE); + } + loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type); + // --- New global settings start here } finally { if (stmt != null) stmt.close(); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 10f96cc..cc6656d 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -227,6 +227,8 @@ public class SettingsProvider extends ContentProvider { sSecureGlobalKeys.add(Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST); sSecureGlobalKeys.add(Settings.Global.SET_GLOBAL_HTTP_PROXY); sSecureGlobalKeys.add(Settings.Global.DEFAULT_DNS_SERVER); + sSecureGlobalKeys.add(Settings.Global.PREFERRED_NETWORK_MODE); + sSecureGlobalKeys.add(Settings.Global.PREFERRED_CDMA_SUBSCRIPTION); // Keys from the 'system' table now moved to 'global' // These must match Settings.System.MOVED_TO_GLOBAL @@ -249,6 +251,17 @@ public class SettingsProvider extends ContentProvider { sSystemGlobalKeys.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); sSystemGlobalKeys.add(Settings.Global.WIFI_SLEEP_POLICY); sSystemGlobalKeys.add(Settings.Global.MODE_RINGER); + sSystemGlobalKeys.add(Settings.Global.WINDOW_ANIMATION_SCALE); + sSystemGlobalKeys.add(Settings.Global.TRANSITION_ANIMATION_SCALE); + sSystemGlobalKeys.add(Settings.Global.ANIMATOR_DURATION_SCALE); + sSystemGlobalKeys.add(Settings.Global.FANCY_IME_ANIMATIONS); + sSystemGlobalKeys.add(Settings.Global.COMPATIBILITY_MODE); + sSystemGlobalKeys.add(Settings.Global.EMERGENCY_TONE); + sSystemGlobalKeys.add(Settings.Global.CALL_AUTO_RETRY); + sSystemGlobalKeys.add(Settings.Global.DEBUG_APP); + sSystemGlobalKeys.add(Settings.Global.WAIT_FOR_DEBUGGER); + sSystemGlobalKeys.add(Settings.Global.SHOW_PROCESSES); + sSystemGlobalKeys.add(Settings.Global.ALWAYS_FINISH_ACTIVITIES); } private boolean settingMovedToGlobal(final String name) { diff --git a/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardViewMediator.java index 8ff8dad..3de1428 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardViewMediator.java +++ b/policy/src/com/android/internal/policy/impl/keyguard_obsolete/KeyguardViewMediator.java @@ -392,14 +392,14 @@ public class KeyguardViewMediator implements KeyguardViewCallback { mScreenOn = mPM.isScreenOn(); mLockSounds = new SoundPool(1, AudioManager.STREAM_SYSTEM, 0); - String soundPath = Settings.System.getString(cr, Settings.System.LOCK_SOUND); + String soundPath = Settings.Global.getString(cr, Settings.Global.LOCK_SOUND); if (soundPath != null) { mLockSoundId = mLockSounds.load(soundPath, 1); } if (soundPath == null || mLockSoundId == 0) { if (DEBUG) Log.d(TAG, "failed to load sound from " + soundPath); } - soundPath = Settings.System.getString(cr, Settings.System.UNLOCK_SOUND); + soundPath = Settings.Global.getString(cr, Settings.Global.UNLOCK_SOUND); if (soundPath != null) { mUnlockSoundId = mLockSounds.load(soundPath, 1); } diff --git a/services/java/com/android/server/accessibility/ScreenMagnifier.java b/services/java/com/android/server/accessibility/ScreenMagnifier.java index f20eff1..14762a1 100644 --- a/services/java/com/android/server/accessibility/ScreenMagnifier.java +++ b/services/java/com/android/server/accessibility/ScreenMagnifier.java @@ -183,8 +183,8 @@ public final class ScreenMagnifier implements EventStreamTransformation { com.android.internal.R.integer.config_longAnimTime); mTapDistanceSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMultiTapDistanceSlop = ViewConfiguration.get(context).getScaledDoubleTapSlop(); - mWindowAnimationScale = Settings.System.getFloat(context.getContentResolver(), - Settings.System.WINDOW_ANIMATION_SCALE, DEFAULT_WINDOW_ANIMATION_SCALE); + mWindowAnimationScale = Settings.Global.getFloat(context.getContentResolver(), + Settings.Global.WINDOW_ANIMATION_SCALE, DEFAULT_WINDOW_ANIMATION_SCALE); mMagnificationController = new MagnificationController(mShortAnimationDuration); mDisplayProvider = new DisplayProvider(context, mWindowManager); diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java index 75bc265..564a805 100644 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -9027,9 +9027,9 @@ public class PackageManagerService extends IPackageManager.Stub { mSystemReady = true; // Read the compatibilty setting when the system is ready. - boolean compatibilityModeEnabled = android.provider.Settings.System.getInt( + boolean compatibilityModeEnabled = android.provider.Settings.Global.getInt( mContext.getContentResolver(), - android.provider.Settings.System.COMPATIBILITY_MODE, 1) == 1; + android.provider.Settings.Global.COMPATIBILITY_MODE, 1) == 1; PackageParser.setCompatibilityModeEnabled(compatibilityModeEnabled); if (DEBUG_SETTINGS) { Log.d(TAG, "compatibility mode:" + compatibilityModeEnabled); diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 3f7b67b..ae805c3 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -811,12 +811,12 @@ public class WindowManagerService extends IWindowManager.Stub mBatteryStats = BatteryStatsService.getService(); // Get persisted window scale setting - mWindowAnimationScale = Settings.System.getFloat(context.getContentResolver(), - Settings.System.WINDOW_ANIMATION_SCALE, mWindowAnimationScale); - mTransitionAnimationScale = Settings.System.getFloat(context.getContentResolver(), - Settings.System.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale); - setAnimatorDurationScale(Settings.System.getFloat(context.getContentResolver(), - Settings.System.ANIMATOR_DURATION_SCALE, mTransitionAnimationScale)); + mWindowAnimationScale = Settings.Global.getFloat(context.getContentResolver(), + Settings.Global.WINDOW_ANIMATION_SCALE, mWindowAnimationScale); + mTransitionAnimationScale = Settings.Global.getFloat(context.getContentResolver(), + Settings.Global.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale); + setAnimatorDurationScale(Settings.Global.getFloat(context.getContentResolver(), + Settings.Global.ANIMATOR_DURATION_SCALE, mTransitionAnimationScale)); // Track changes to DevicePolicyManager state so we can enable/disable keyguard. IntentFilter filter = new IntentFilter(); @@ -7480,12 +7480,12 @@ public class WindowManagerService extends IWindowManager.Stub } case PERSIST_ANIMATION_SCALE: { - Settings.System.putFloat(mContext.getContentResolver(), - Settings.System.WINDOW_ANIMATION_SCALE, mWindowAnimationScale); - Settings.System.putFloat(mContext.getContentResolver(), - Settings.System.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale); - Settings.System.putFloat(mContext.getContentResolver(), - Settings.System.ANIMATOR_DURATION_SCALE, mAnimatorDurationScale); + Settings.Global.putFloat(mContext.getContentResolver(), + Settings.Global.WINDOW_ANIMATION_SCALE, mWindowAnimationScale); + Settings.Global.putFloat(mContext.getContentResolver(), + Settings.Global.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale); + Settings.Global.putFloat(mContext.getContentResolver(), + Settings.Global.ANIMATOR_DURATION_SCALE, mAnimatorDurationScale); break; } |