aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDanesh M <daneshm90@gmail.com>2015-11-12 17:16:56 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-16 15:53:56 -0800
commitc25b6157bce75223e77ea0c5615804d721b50a06 (patch)
tree09a332f6ef432c7fa2fe4286faa0fd627936d7f1 /packages
parenta63e78ba9288efe237070e7e28aeb5750cd275ed (diff)
downloadvendor_cmsdk-c25b6157bce75223e77ea0c5615804d721b50a06.zip
vendor_cmsdk-c25b6157bce75223e77ea0c5615804d721b50a06.tar.gz
vendor_cmsdk-c25b6157bce75223e77ea0c5615804d721b50a06.tar.bz2
CMSDK : Keep track of legacy settings
Change-Id: I192d8033f2cd65cffc88f97089cb2ef2b02a566d
Diffstat (limited to 'packages')
-rw-r--r--packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java1027
1 files changed, 8 insertions, 1019 deletions
diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java
index 2fab5a7..9521364 100644
--- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java
+++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMSettingsProvider.java
@@ -158,785 +158,6 @@ public class CMSettingsProvider extends ContentProvider {
}
}
- /* @hide */
- public static class LegacyCMSettings {
- /**
- * Whether to allow one finger quick settings expansion on the right side of the statusbar.
- * @deprecated Use {@link android.provider.Settings.System#QS_QUICK_PULLDOWN} instead
- * @hide
- */
- public static final String STATUS_BAR_QUICK_QS_PULLDOWN =
- CMSettings.System.QS_QUICK_PULLDOWN;
-
- /**
- * Whether to enable "advanced mode" for the current user.
- * Boolean setting. 0 = no, 1 = yes.
- * @hide
- */
- public static final String ADVANCED_MODE = CMSettings.Secure.ADVANCED_MODE;
-
- /**
- * The button brightness to be used while the screen is on or after a button press,
- * depending on the value of {@link BUTTON_BACKLIGHT_TIMEOUT}.
- * Valid value range is between 0 and {@link PowerManager#getMaximumButtonBrightness()}
- * @hide
- */
- public static final String BUTTON_BRIGHTNESS = CMSettings.Secure.BUTTON_BRIGHTNESS;
-
- /**
- * The time in ms to keep the button backlight on after pressing a button.
- * A value of 0 will keep the buttons on for as long as the screen is on.
- * @hide
- */
- public static final String BUTTON_BACKLIGHT_TIMEOUT =
- CMSettings.Secure.BUTTON_BACKLIGHT_TIMEOUT;
-
- /**
- * Default theme to use. If empty, use holo.
- * @hide
- */
- public static final String DEFAULT_THEME_PACKAGE = CMSettings.Secure.DEFAULT_THEME_PACKAGE;
-
- /**
- * A '|' delimited list of theme components to apply from the default theme on first boot.
- * Components can be one or more of the "mods_XXXXXXX" found in
- * {@link ThemesContract$ThemesColumns}. Leaving this field blank assumes all components
- * will be applied.
- *
- * ex: mods_icons|mods_overlays|mods_homescreen
- *
- * @hide
- */
- public static final String DEFAULT_THEME_COMPONENTS =
- CMSettings.Secure.DEFAULT_THEME_COMPONENTS;
-
- /**
- * Developer options - Navigation Bar show switch
- * @hide
- */
- public static final String DEV_FORCE_SHOW_NAVBAR = CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR;
-
- /**
- * The keyboard brightness to be used while the screen is on.
- * Valid value range is between 0 and {@link PowerManager#getMaximumKeyboardBrightness()}
- * @hide
- */
- public static final String KEYBOARD_BRIGHTNESS = CMSettings.Secure.KEYBOARD_BRIGHTNESS;
-
- /**
- * String to contain power menu actions
- * @hide
- */
- public static final String POWER_MENU_ACTIONS = CMSettings.Secure.POWER_MENU_ACTIONS;
-
- /**
- * Global stats collection
- * @hide
- */
- public static final String STATS_COLLECTION = CMSettings.Secure.STATS_COLLECTION;
-
- /**
- * Whether to show the brightness slider in quick settings panel.
- * @hide
- */
- public static final String QS_SHOW_BRIGHTNESS_SLIDER =
- CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER;
-
- /**
- * List of QS tile names
- * @hide
- */
- public static final String QS_TILES = CMSettings.Secure.QS_TILES;
-
- /**
- * Use "main" tiles on the first row of the quick settings panel
- * 0 = no, 1 = yes
- * @hide
- */
- public static final String QS_USE_MAIN_TILES = CMSettings.Secure.QS_USE_MAIN_TILES;
-
- /**
- * Boolean value whether to link ringtone and notification volume
- *
- * @hide
- */
- public static final String VOLUME_LINK_NOTIFICATION =
- CMSettings.Secure.VOLUME_LINK_NOTIFICATION;
-
- /**
- * Custom navring actions
- * @hide
- */
- public static final String[] NAVIGATION_RING_TARGETS =
- CMSettings.Secure.NAVIGATION_RING_TARGETS;
-
- /**
- * If an app does not have a specific theme set then it will use the 'default' theme+
- * example: 'default' -> overlayPkgName: 'org.blue.theme'
- * 'com.android.phone' -> 'com.red.theme'
- * 'com.google.vending' -> 'com.white.theme'
- */
- public static final String THEME_PKG_CONFIGURATION_PERSISTENCE_PROPERTY = "themeConfig";
-
- /**
- * The global recents long press activity chosen by the user.
- * This setting is stored as a flattened component name as
- * per {@link ComponentName#flattenToString()}.
- *
- * @hide
- */
- public static final String RECENTS_LONG_PRESS_ACTIVITY =
- CMSettings.Secure.RECENTS_LONG_PRESS_ACTIVITY;
-
- /**
- * Whether to display the ADB notification.
- * @hide
- */
- public static final String ADB_NOTIFY = CMSettings.Secure.ADB_NOTIFY;
-
- /**
- * The TCP/IP port to run ADB on, or -1 for USB
- * @hide
- */
- public static final String ADB_PORT = CMSettings.Secure.ADB_PORT;
-
- /**
- * The hostname for this device
- * @hide
- */
- public static final String DEVICE_HOSTNAME = CMSettings.Secure.DEVICE_HOSTNAME;
-
- /**
- * Whether to allow killing of the foreground app by long-pressing the Back button
- * @hide
- */
- public static final String KILL_APP_LONGPRESS_BACK =
- CMSettings.Secure.KILL_APP_LONGPRESS_BACK;
-
- /** Protected Components
- * @hide
- */
- public static final String PROTECTED_COMPONENTS = "protected_components";
-
- /**
- * Stored color matrix for LiveDisplay. This is used to allow co-existence with
- * display tuning done by DisplayAdjustmentUtils when hardware support isn't
- * available.
- * @hide
- */
- public static final String LIVE_DISPLAY_COLOR_MATRIX = "live_display_color_matrix";
-
- /**
- * Whether to include options in power menu for rebooting into recovery or bootloader
- * @hide
- */
- public static final String ADVANCED_REBOOT = CMSettings.Secure.ADVANCED_REBOOT;
-
- /**
- * This will be set to the system's current theme API version when ThemeService starts.
- * It is useful for when an upgrade from one version of CM to another occurs.
- * For example, after a user upgrades from CM11 to CM12, the value of this field
- * might be 19. ThemeService would then change the value to 21. This is useful
- * when an API change breaks a theme. Themeservice can identify old themes and
- * unapply them from the system.
- * @hide
- */
- public static final String THEME_PREV_BOOT_API_LEVEL =
- CMSettings.Secure.THEME_PREV_BOOT_API_LEVEL;
-
- /**
- * Navigation controls to Use
- * @hide
- */
- public static final String NAV_BUTTONS = CMSettings.System.NAV_BUTTONS;
-
- /**
- * Action to perform when the home key is long-pressed.
- * (Default can be configured via config_longPressOnHomeBehavior)
- * 0 - Nothing
- * 1 - Menu
- * 2 - App-switch
- * 3 - Search
- * 4 - Voice search
- * 5 - In-app search
- * 6 - Launch Camera
- * 7 - Action Sleep
- * 8 - Last app
- * @hide
- */
- public static final String KEY_HOME_LONG_PRESS_ACTION =
- CMSettings.System.KEY_HOME_LONG_PRESS_ACTION;
-
- /**
- * Action to perform when the home key is double-tapped.
- * (Default can be configured via config_doubleTapOnHomeBehavior)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_HOME_DOUBLE_TAP_ACTION =
- CMSettings.System.KEY_HOME_DOUBLE_TAP_ACTION;
-
- /**
- * Whether to wake the screen with the back key, the value is boolean.
- * @hide
- */
- public static final String BACK_WAKE_SCREEN = CMSettings.System.BACK_WAKE_SCREEN;
-
- /**
- * Whether to wake the screen with the menu key, the value is boolean.
- * @hide
- */
- public static final String MENU_WAKE_SCREEN = CMSettings.System.MENU_WAKE_SCREEN;
-
- /**
- * Whether to wake the screen with the volume keys, the value is boolean.
- * @hide
- */
- public static final String VOLUME_WAKE_SCREEN = CMSettings.System.VOLUME_WAKE_SCREEN;
-
- /**
- * Action to perform when the menu key is pressed. (Default is 1)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_MENU_ACTION = CMSettings.System.KEY_MENU_ACTION;
-
- /**
- * Action to perform when the menu key is long-pressed.
- * (Default is 0 on devices with a search key, 3 on devices without)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_MENU_LONG_PRESS_ACTION =
- CMSettings.System.KEY_MENU_LONG_PRESS_ACTION;
-
- /**
- * Action to perform when the assistant (search) key is pressed. (Default is 3)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_ASSIST_ACTION = CMSettings.System.KEY_ASSIST_ACTION;
-
- /**
- * Action to perform when the assistant (search) key is long-pressed. (Default is 4)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_ASSIST_LONG_PRESS_ACTION =
- CMSettings.System.KEY_ASSIST_LONG_PRESS_ACTION;
-
- /**
- * Action to perform when the app switch key is pressed. (Default is 2)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_APP_SWITCH_ACTION = CMSettings.System.KEY_APP_SWITCH_ACTION;
-
- /**
- * Action to perform when the app switch key is long-pressed. (Default is 0)
- * (See KEY_HOME_LONG_PRESS_ACTION for valid values)
- * @hide
- */
- public static final String KEY_APP_SWITCH_LONG_PRESS_ACTION =
- CMSettings.System.KEY_APP_SWITCH_LONG_PRESS_ACTION;
-
- /**
- * Whether to wake the screen with the home key, the value is boolean.
- * @hide
- */
- public static final String HOME_WAKE_SCREEN = CMSettings.System.HOME_WAKE_SCREEN;
-
- /**
- * Whether to wake the screen with the assist key, the value is boolean.
- * @hide
- */
- public static final String ASSIST_WAKE_SCREEN = CMSettings.System.ASSIST_WAKE_SCREEN;
-
- /**
- * Whether to wake the screen with the app switch key, the value is boolean.
- * @hide
- */
- public static final String APP_SWITCH_WAKE_SCREEN =
- CMSettings.System.APP_SWITCH_WAKE_SCREEN;
-
- /**
- * Whether to wake the screen with the camera key half-press.
- * @hide
- */
- public static final String CAMERA_WAKE_SCREEN = CMSettings.System.CAMERA_WAKE_SCREEN;
-
- /**
- * Whether or not to send device back to sleep if Camera button is released ("Peek")
- * @hide
- */
- public static final String CAMERA_SLEEP_ON_RELEASE =
- CMSettings.System.CAMERA_SLEEP_ON_RELEASE;
-
- /**
- * Whether to launch secure camera app when key is longpressed
- * @hide
- */
- public static final String CAMERA_LAUNCH = CMSettings.System.CAMERA_LAUNCH;
-
- /**
- * Swap volume buttons when the screen is rotated
- * 0 - Disabled
- * 1 - Enabled (screen is rotated by 90 or 180 degrees: phone, hybrid)
- * 2 - Enabled (screen is rotated by 180 or 270 degrees: tablet)
- * @hide
- */
- public static final String SWAP_VOLUME_KEYS_ON_ROTATION =
- CMSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION;
-
- /**
- * What happens when the user presses the Power button while in-call
- * and the screen is on.<br/>
- * <b>Values:</b><br/>
- * 1 - The Power button turns off the screen and locks the device. (Default behavior)<br/>
- * 2 - The Power button hangs up the current call.<br/>
- *
- * @hide
- */
- public static final String INCALL_POWER_BUTTON_BEHAVIOR =
- CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR;
-
- /**
- * INCALL_POWER_BUTTON_BEHAVIOR value for "turn off screen".
- * @hide
- */
- public static final int INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF = 0x1;
-
- /**
- * INCALL_POWER_BUTTON_BEHAVIOR value for "hang up".
- * @hide
- */
- public static final int INCALL_POWER_BUTTON_BEHAVIOR_HANGUP = 0x2;
-
- /**
- * INCALL_POWER_BUTTON_BEHAVIOR default value.
- * @hide
- */
- public static final int INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT =
- INCALL_POWER_BUTTON_BEHAVIOR_SCREEN_OFF;
-
- /**
- * Whether the battery light should be enabled (if hardware supports it)
- * The value is boolean (1 or 0).
- * @hide
- */
- public static final String BATTERY_LIGHT_ENABLED = CMSettings.System.BATTERY_LIGHT_ENABLED;
-
- /**
- * Whether the battery LED should repeatedly flash when the battery is low
- * on charge. The value is boolean (1 or 0).
- * @hide
- */
- public static final String BATTERY_LIGHT_PULSE = CMSettings.System.BATTERY_LIGHT_PULSE;
-
- /**
- * What color to use for the battery LED while charging - low
- * @hide
- */
- public static final String BATTERY_LIGHT_LOW_COLOR =
- CMSettings.System.BATTERY_LIGHT_LOW_COLOR;
-
- /**
- * What color to use for the battery LED while charging - medium
- * @hide
- */
- public static final String BATTERY_LIGHT_MEDIUM_COLOR =
- CMSettings.System.BATTERY_LIGHT_MEDIUM_COLOR;
-
- /**
- * What color to use for the battery LED while charging - full
- * @hide
- */
- public static final String BATTERY_LIGHT_FULL_COLOR =
- CMSettings.System.BATTERY_LIGHT_FULL_COLOR;
-
- /**
- * Sprint MWI Quirk: Show message wait indicator notifications
- * @hide
- */
- public static final String ENABLE_MWI_NOTIFICATION =
- CMSettings.System.ENABLE_MWI_NOTIFICATION;
-
- /**
- * Check the proximity sensor during wakeup
- * @hide
- */
- public static final String PROXIMITY_ON_WAKE = CMSettings.System.PROXIMITY_ON_WAKE;
-
- /**
- * Enable looking up of phone numbers of nearby places
- *
- * @hide
- */
- public static final String ENABLE_FORWARD_LOOKUP = CMSettings.System.ENABLE_FORWARD_LOOKUP;
-
- /**
- * Enable looking up of phone numbers of people
- *
- * @hide
- */
- public static final String ENABLE_PEOPLE_LOOKUP = CMSettings.System.ENABLE_PEOPLE_LOOKUP;
-
- /**
- * Enable looking up of information of phone numbers not in the contacts
- *
- * @hide
- */
- public static final String ENABLE_REVERSE_LOOKUP = CMSettings.System.ENABLE_REVERSE_LOOKUP;
-
- /**
- * The forward lookup provider
- *
- * @hide
- */
- public static final String FORWARD_LOOKUP_PROVIDER =
- CMSettings.System.FORWARD_LOOKUP_PROVIDER;
-
- /**
- * The people lookup provider
- *
- * @hide
- */
- public static final String PEOPLE_LOOKUP_PROVIDER =
- CMSettings.System.PEOPLE_LOOKUP_PROVIDER;
-
- /**
- * The reverse lookup provider
- *
- * @hide
- */
- public static final String REVERSE_LOOKUP_PROVIDER =
- CMSettings.System.REVERSE_LOOKUP_PROVIDER;
-
- /**
- * The OpenCNAM paid account ID
- *
- * @hide
- */
- public static final String DIALER_OPENCNAM_ACCOUNT_SID =
- CMSettings.System.DIALER_OPENCNAM_ACCOUNT_SID;
-
- /**
- * The OpenCNAM authentication token
- *
- * @hide
- */
- public static final String DIALER_OPENCNAM_AUTH_TOKEN =
- CMSettings.System.DIALER_OPENCNAM_AUTH_TOKEN;
-
- /**
- * Whether wifi settings will connect to access point automatically
- * 0 = automatically
- * 1 = manually
- * @hide
- */
- public static final String WIFI_AUTO_CONNECT_TYPE =
- CMSettings.System.WIFI_AUTO_CONNECT_TYPE;
-
- /**
- * Color temperature of the display during the day
- * @hide
- */
- public static final String DISPLAY_TEMPERATURE_DAY =
- CMSettings.System.DISPLAY_TEMPERATURE_DAY;
-
- /**
- * Color temperature of the display at night
- * @hide
- */
- public static final String DISPLAY_TEMPERATURE_NIGHT =
- CMSettings.System.DISPLAY_TEMPERATURE_NIGHT;
-
- /**
- * Display color temperature adjustment mode, one of DAY (default), NIGHT, or AUTO.
- * @hide
- */
- public static final String DISPLAY_TEMPERATURE_MODE =
- CMSettings.System.DISPLAY_TEMPERATURE_MODE;
-
- /**
- * Automatic outdoor mode
- * @hide
- */
- public static final String DISPLAY_AUTO_OUTDOOR_MODE =
- CMSettings.System.DISPLAY_AUTO_OUTDOOR_MODE;
-
- /**
- * Use display power saving features such as CABC or CABL
- * @hide
- */
- public static final String DISPLAY_LOW_POWER = CMSettings.System.DISPLAY_LOW_POWER;
-
- /**
- * Use color enhancement feature of display
- * @hide
- */
- public static final String DISPLAY_COLOR_ENHANCE = CMSettings.System.DISPLAY_COLOR_ENHANCE;
-
- /**
- * Manual display color adjustments (RGB values as floats, separated by spaces)
- * @hide
- */
- public static final String DISPLAY_COLOR_ADJUSTMENT =
- CMSettings.System.DISPLAY_COLOR_ADJUSTMENT;
-
- /**
- * Did we tell about how they can stop breaking their eyes?
- * @hide
- */
- public static final String LIVE_DISPLAY_HINTED = CMSettings.System.LIVE_DISPLAY_HINTED;
-
- /**
- * Enable statusbar double tap gesture on to put device to sleep
- * @hide
- */
- public static final String DOUBLE_TAP_SLEEP_GESTURE =
- CMSettings.System.DOUBLE_TAP_SLEEP_GESTURE;
-
- /**
- * Boolean value on whether to show weather in the statusbar
- * @hide
- */
- public static final String STATUS_BAR_SHOW_WEATHER =
- CMSettings.System.STATUS_BAR_SHOW_WEATHER;
-
- /**
- * Show search bar in recents
- * @hide
- */
- public static final String RECENTS_SHOW_SEARCH_BAR =
- CMSettings.System.RECENTS_SHOW_SEARCH_BAR;
-
- /**
- * Whether navigation bar is placed on the left side in landscape mode
- * @hide
- */
- public static final String NAVBAR_LEFT_IN_LANDSCAPE =
- CMSettings.System.NAVBAR_LEFT_IN_LANDSCAPE;
-
- /**
- * Locale for secondary overlay on dialer for t9 search input
- * @hide
- */
- public static final String T9_SEARCH_INPUT_LOCALE =
- CMSettings.System.T9_SEARCH_INPUT_LOCALE;
-
- /**
- * If all file types can be accepted over Bluetooth OBEX.
- * @hide
- */
- public static final String BLUETOOTH_ACCEPT_ALL_FILES =
- CMSettings.System.BLUETOOTH_ACCEPT_ALL_FILES;
-
- /**
- * Whether to scramble a pin unlock layout
- * @hide
- */
- public static final String LOCKSCREEN_PIN_SCRAMBLE_LAYOUT =
- CMSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT;
-
- /**
- * @hide
- */
- public static final String SHOW_ALARM_ICON = CMSettings.System.SHOW_ALARM_ICON;
-
- /**
- * Whether to show the IME switcher in the status bar
- * @hide
- */
- public static final String STATUS_BAR_IME_SWITCHER =
- CMSettings.System.STATUS_BAR_IME_SWITCHER;
-
- /**
- * Whether to control brightness from status bar
- *
- * @hide
- */
- public static final String STATUS_BAR_BRIGHTNESS_CONTROL =
- CMSettings.System.STATUS_BAR_BRIGHTNESS_CONTROL;
-
- /**
- * Whether or not volume button music controls should be enabled to seek media tracks
- * @hide
- */
- public static final String VOLBTN_MUSIC_CONTROLS =
- CMSettings.System.VOLBTN_MUSIC_CONTROLS;
-
- /**
- * Use EdgeGesture Service for system gestures in PhoneWindowManager
- * @hide
- */
- public static final String USE_EDGE_SERVICE_FOR_GESTURES =
- CMSettings.System.USE_EDGE_SERVICE_FOR_GESTURES;
-
- /**
- * Show the pending notification counts as overlays on the status bar
- * @hide
- */
- public static final String STATUS_BAR_NOTIF_COUNT =
- CMSettings.System.STATUS_BAR_NOTIF_COUNT;
-
- /**
- * Call recording format value
- * 0: AMR_WB
- * 1: MPEG_4
- * Default: 0
- * @hide
- */
- public static final String CALL_RECORDING_FORMAT =
- CMSettings.System.CALL_RECORDING_FORMAT;
-
- /**
- * Contains the notifications light maximum brightness to use.
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL =
- CMSettings.System.NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL;
-
- /**
- * Whether to use the all the LEDs for the notifications or just one.
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE =
- CMSettings.System.NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE;
-
- /**
- * Whether to allow notifications with the screen on or DayDreams.
- * The value is boolean (1 or 0). Default will always be false.
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_SCREEN_ON =
- CMSettings.System.NOTIFICATION_LIGHT_SCREEN_ON;
-
- /**
- * What color to use for the notification LED by default
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR;
-
- /**
- * How long to flash the notification LED by default
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON;
-
- /**
- * How long to wait between flashes for the notification LED by default
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF;
-
- /**
- * What color to use for the missed call notification LED
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_CALL_COLOR =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_COLOR;
-
- /**
- * How long to flash the missed call notification LED
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_CALL_LED_ON =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_ON;
-
- /**
- * How long to wait between flashes for the missed call notification LED
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF;
- /**
- * What color to use for the voicemail notification LED
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR;
-
- /**
- * How long to flash the voicemail notification LED
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON;
-
- /**
- * How long to wait between flashes for the voicemail notification LED
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF;
-
- /**
- * Whether to use the custom LED values for the notification pulse LED.
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE;
-
- /**
- * Which custom LED values to use for the notification pulse LED.
- * @hide
- */
- public static final String NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES =
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES;
-
- /**
- * Whether to wake the display when plugging or unplugging the charger
- *
- * @hide
- */
- public static final String WAKE_WHEN_PLUGGED_OR_UNPLUGGED =
- CMSettings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED;
-
- /** {@hide} */
- public static final String BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX =
- CMSettings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX;
-
- /**
- * Whether to sound when charger power is connected/disconnected
- * @hide
- */
- public static final String POWER_NOTIFICATIONS_ENABLED =
- CMSettings.Global.POWER_NOTIFICATIONS_ENABLED;
-
- /**
- * Whether to vibrate when charger power is connected/disconnected
- * @hide
- */
- public static final String POWER_NOTIFICATIONS_VIBRATE =
- CMSettings.Global.POWER_NOTIFICATIONS_VIBRATE;
-
- /**
- * URI for power notification sounds
- * @hide
- */
- public static final String POWER_NOTIFICATIONS_RINGTONE =
- CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE;
-
- /**
- * @hide
- */
- public static final String ZEN_DISABLE_DUCKING_DURING_MEDIA_PLAYBACK =
- CMSettings.Global.ZEN_DISABLE_DUCKING_DURING_MEDIA_PLAYBACK;
-
- /**
- * Whether the system auto-configure the priority of the wifi ap's or use
- * the manual settings established by the user.
- * <> 0 to autoconfigure, 0 to manual settings. Default is <> 0.
- * @hide
- */
- public static final String WIFI_AUTO_PRIORITIES_CONFIGURATION =
- CMSettings.Global.WIFI_AUTO_PRIORITIES_CONFIGURATION;
- }
-
/**
* Migrates CM settings for a specific user.
* @param userId The id of the user to run CM settings migration for.
@@ -946,246 +167,18 @@ public class CMSettingsProvider extends ContentProvider {
if (LOCAL_LOGV) Log.d(TAG, "CM settings will be migrated for user id: " + userId);
// Migrate system settings
- HashMap<String, String> systemToCmSettingsMap = new HashMap<String, String>();
- systemToCmSettingsMap.put(LegacyCMSettings.STATUS_BAR_QUICK_QS_PULLDOWN,
- CMSettings.System.QS_QUICK_PULLDOWN);
- systemToCmSettingsMap.put(LegacyCMSettings.NAV_BUTTONS,
- CMSettings.System.NAV_BUTTONS);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_HOME_LONG_PRESS_ACTION,
- CMSettings.System.KEY_HOME_LONG_PRESS_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_HOME_DOUBLE_TAP_ACTION,
- CMSettings.System.KEY_HOME_DOUBLE_TAP_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.BACK_WAKE_SCREEN,
- CMSettings.System.BACK_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.MENU_WAKE_SCREEN,
- CMSettings.System.MENU_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.VOLUME_WAKE_SCREEN,
- CMSettings.System.VOLUME_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_MENU_ACTION,
- CMSettings.System.KEY_MENU_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_MENU_LONG_PRESS_ACTION,
- CMSettings.System.KEY_MENU_LONG_PRESS_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_ASSIST_ACTION,
- CMSettings.System.KEY_ASSIST_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_ASSIST_LONG_PRESS_ACTION,
- CMSettings.System.KEY_ASSIST_LONG_PRESS_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_APP_SWITCH_ACTION,
- CMSettings.System.KEY_APP_SWITCH_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.KEY_APP_SWITCH_LONG_PRESS_ACTION,
- CMSettings.System.KEY_APP_SWITCH_LONG_PRESS_ACTION);
- systemToCmSettingsMap.put(LegacyCMSettings.HOME_WAKE_SCREEN,
- CMSettings.System.HOME_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.ASSIST_WAKE_SCREEN,
- CMSettings.System.ASSIST_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.APP_SWITCH_WAKE_SCREEN,
- CMSettings.System.APP_SWITCH_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.CAMERA_WAKE_SCREEN,
- CMSettings.System.CAMERA_WAKE_SCREEN);
- systemToCmSettingsMap.put(LegacyCMSettings.CAMERA_SLEEP_ON_RELEASE,
- CMSettings.System.CAMERA_SLEEP_ON_RELEASE);
- systemToCmSettingsMap.put(LegacyCMSettings.CAMERA_LAUNCH,
- CMSettings.System.CAMERA_LAUNCH);
- systemToCmSettingsMap.put(LegacyCMSettings.SWAP_VOLUME_KEYS_ON_ROTATION,
- CMSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION);
- systemToCmSettingsMap.put(LegacyCMSettings.BATTERY_LIGHT_ENABLED,
- CMSettings.System.BATTERY_LIGHT_ENABLED);
- systemToCmSettingsMap.put(LegacyCMSettings.BATTERY_LIGHT_PULSE,
- CMSettings.System.BATTERY_LIGHT_PULSE);
- systemToCmSettingsMap.put(LegacyCMSettings.BATTERY_LIGHT_LOW_COLOR,
- CMSettings.System.BATTERY_LIGHT_LOW_COLOR);
- systemToCmSettingsMap.put(LegacyCMSettings.BATTERY_LIGHT_MEDIUM_COLOR,
- CMSettings.System.BATTERY_LIGHT_MEDIUM_COLOR);
- systemToCmSettingsMap.put(LegacyCMSettings.BATTERY_LIGHT_FULL_COLOR,
- CMSettings.System.BATTERY_LIGHT_FULL_COLOR);
- systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_MWI_NOTIFICATION,
- CMSettings.System.ENABLE_MWI_NOTIFICATION);
- systemToCmSettingsMap.put(LegacyCMSettings.PROXIMITY_ON_WAKE,
- CMSettings.System.PROXIMITY_ON_WAKE);
- systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_FORWARD_LOOKUP,
- CMSettings.System.ENABLE_FORWARD_LOOKUP);
- systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_PEOPLE_LOOKUP,
- CMSettings.System.ENABLE_PEOPLE_LOOKUP);
- systemToCmSettingsMap.put(LegacyCMSettings.ENABLE_REVERSE_LOOKUP,
- CMSettings.System.ENABLE_REVERSE_LOOKUP);
- systemToCmSettingsMap.put(LegacyCMSettings.FORWARD_LOOKUP_PROVIDER,
- CMSettings.System.FORWARD_LOOKUP_PROVIDER);
- systemToCmSettingsMap.put(LegacyCMSettings.PEOPLE_LOOKUP_PROVIDER,
- CMSettings.System.PEOPLE_LOOKUP_PROVIDER);
- systemToCmSettingsMap.put(LegacyCMSettings.REVERSE_LOOKUP_PROVIDER,
- CMSettings.System.REVERSE_LOOKUP_PROVIDER);
- systemToCmSettingsMap.put(LegacyCMSettings.DIALER_OPENCNAM_ACCOUNT_SID,
- CMSettings.System.DIALER_OPENCNAM_ACCOUNT_SID);
- systemToCmSettingsMap.put(LegacyCMSettings.DIALER_OPENCNAM_AUTH_TOKEN,
- CMSettings.System.DIALER_OPENCNAM_AUTH_TOKEN);
- systemToCmSettingsMap.put(LegacyCMSettings.WIFI_AUTO_CONNECT_TYPE,
- CMSettings.System.WIFI_AUTO_CONNECT_TYPE);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_TEMPERATURE_DAY,
- CMSettings.System.DISPLAY_TEMPERATURE_DAY);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_TEMPERATURE_NIGHT,
- CMSettings.System.DISPLAY_TEMPERATURE_NIGHT);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_TEMPERATURE_MODE,
- CMSettings.System.DISPLAY_TEMPERATURE_MODE);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_AUTO_OUTDOOR_MODE,
- CMSettings.System.DISPLAY_AUTO_OUTDOOR_MODE);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_LOW_POWER,
- CMSettings.System.DISPLAY_LOW_POWER);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_COLOR_ENHANCE,
- CMSettings.System.DISPLAY_COLOR_ENHANCE);
- systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_COLOR_ADJUSTMENT,
- CMSettings.System.DISPLAY_COLOR_ADJUSTMENT);
- systemToCmSettingsMap.put(LegacyCMSettings.LIVE_DISPLAY_HINTED,
- CMSettings.System.LIVE_DISPLAY_HINTED);
- systemToCmSettingsMap.put(LegacyCMSettings.DOUBLE_TAP_SLEEP_GESTURE,
- CMSettings.System.DOUBLE_TAP_SLEEP_GESTURE);
- systemToCmSettingsMap.put(LegacyCMSettings.STATUS_BAR_SHOW_WEATHER,
- CMSettings.System.STATUS_BAR_SHOW_WEATHER);
- systemToCmSettingsMap.put(LegacyCMSettings.RECENTS_SHOW_SEARCH_BAR,
- CMSettings.System.RECENTS_SHOW_SEARCH_BAR);
- systemToCmSettingsMap.put(LegacyCMSettings.NAVBAR_LEFT_IN_LANDSCAPE,
- CMSettings.System.NAVBAR_LEFT_IN_LANDSCAPE);
- systemToCmSettingsMap.put(LegacyCMSettings.T9_SEARCH_INPUT_LOCALE,
- CMSettings.System.T9_SEARCH_INPUT_LOCALE);
- systemToCmSettingsMap.put(LegacyCMSettings.BLUETOOTH_ACCEPT_ALL_FILES,
- CMSettings.System.BLUETOOTH_ACCEPT_ALL_FILES);
- systemToCmSettingsMap.put(LegacyCMSettings.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT,
- CMSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT);
- systemToCmSettingsMap.put(LegacyCMSettings.SHOW_ALARM_ICON,
- CMSettings.System.SHOW_ALARM_ICON);
- systemToCmSettingsMap.put(LegacyCMSettings.STATUS_BAR_IME_SWITCHER,
- CMSettings.System.STATUS_BAR_IME_SWITCHER);
- systemToCmSettingsMap.put(LegacyCMSettings.QS_SHOW_BRIGHTNESS_SLIDER,
- CMSettings.System.QS_SHOW_BRIGHTNESS_SLIDER);
- systemToCmSettingsMap.put(LegacyCMSettings.STATUS_BAR_BRIGHTNESS_CONTROL,
- CMSettings.System.STATUS_BAR_BRIGHTNESS_CONTROL);
- systemToCmSettingsMap.put(LegacyCMSettings.VOLBTN_MUSIC_CONTROLS,
- CMSettings.System.VOLBTN_MUSIC_CONTROLS);
- systemToCmSettingsMap.put(LegacyCMSettings.SWAP_VOLUME_KEYS_ON_ROTATION,
- CMSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION);
- systemToCmSettingsMap.put(LegacyCMSettings.USE_EDGE_SERVICE_FOR_GESTURES,
- CMSettings.System.USE_EDGE_SERVICE_FOR_GESTURES);
- systemToCmSettingsMap.put(LegacyCMSettings.STATUS_BAR_NOTIF_COUNT,
- CMSettings.System.STATUS_BAR_NOTIF_COUNT);
- systemToCmSettingsMap.put(LegacyCMSettings.CALL_RECORDING_FORMAT,
- CMSettings.System.CALL_RECORDING_FORMAT);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL,
- CMSettings.System.NOTIFICATION_LIGHT_BRIGHTNESS_LEVEL);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE,
- CMSettings.System.NOTIFICATION_LIGHT_MULTIPLE_LEDS_ENABLE);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_SCREEN_ON,
- CMSettings.System.NOTIFICATION_LIGHT_SCREEN_ON);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_CALL_COLOR,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_COLOR);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_CALL_LED_ON,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_ON);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE);
- systemToCmSettingsMap.put(LegacyCMSettings.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES,
- CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES);
-
int rowsMigrated = migrateCMSettingsForTable(userId,
- CMDatabaseHelper.CMTableNames.TABLE_SYSTEM, systemToCmSettingsMap);
+ CMDatabaseHelper.CMTableNames.TABLE_SYSTEM, CMSettings.System.LEGACY_SYSTEM_SETTINGS);
if (LOCAL_LOGV) Log.d(TAG, "Migrated " + rowsMigrated + " to CM system table");
// Migrate secure settings
- HashMap<String, String> secureToCmSettingsMap = new HashMap<String, String>();
- secureToCmSettingsMap.put(LegacyCMSettings.ADVANCED_MODE,
- CMSettings.Secure.ADVANCED_MODE);
- secureToCmSettingsMap.put(LegacyCMSettings.BUTTON_BACKLIGHT_TIMEOUT,
- CMSettings.Secure.BUTTON_BACKLIGHT_TIMEOUT);
- secureToCmSettingsMap.put(LegacyCMSettings.BUTTON_BRIGHTNESS,
- CMSettings.Secure.BUTTON_BRIGHTNESS);
- secureToCmSettingsMap.put(LegacyCMSettings.DEFAULT_THEME_COMPONENTS,
- CMSettings.Secure.DEFAULT_THEME_COMPONENTS);
- secureToCmSettingsMap.put(LegacyCMSettings.DEFAULT_THEME_PACKAGE,
- CMSettings.Secure.DEFAULT_THEME_PACKAGE);
- secureToCmSettingsMap.put(LegacyCMSettings.DEV_FORCE_SHOW_NAVBAR,
- CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR);
- secureToCmSettingsMap.put(
- LegacyCMSettings.THEME_PKG_CONFIGURATION_PERSISTENCE_PROPERTY,
- CMSettings.Secure.NAME_THEME_CONFIG);
- secureToCmSettingsMap.put(LegacyCMSettings.KEYBOARD_BRIGHTNESS,
- CMSettings.Secure.KEYBOARD_BRIGHTNESS);
- secureToCmSettingsMap.put(LegacyCMSettings.POWER_MENU_ACTIONS,
- CMSettings.Secure.POWER_MENU_ACTIONS);
- secureToCmSettingsMap.put(LegacyCMSettings.STATS_COLLECTION,
- CMSettings.Secure.STATS_COLLECTION);
- secureToCmSettingsMap.put(LegacyCMSettings.QS_SHOW_BRIGHTNESS_SLIDER,
- CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER);
- secureToCmSettingsMap.put(LegacyCMSettings.QS_TILES,
- CMSettings.Secure.QS_TILES);
- secureToCmSettingsMap.put(LegacyCMSettings.QS_USE_MAIN_TILES,
- CMSettings.Secure.QS_USE_MAIN_TILES);
- secureToCmSettingsMap.put(LegacyCMSettings.VOLUME_LINK_NOTIFICATION,
- CMSettings.Secure.VOLUME_LINK_NOTIFICATION);
- int navRingTargetsLength = LegacyCMSettings.NAVIGATION_RING_TARGETS.length;
- int cmNavRingTargetsLength = CMSettings.Secure.NAVIGATION_RING_TARGETS.length;
- int minNavRingTargetsLength = navRingTargetsLength <= cmNavRingTargetsLength ?
- navRingTargetsLength : cmNavRingTargetsLength;
-
- for (int i = 0; i < minNavRingTargetsLength; i++) {
- systemToCmSettingsMap.put(LegacyCMSettings.NAVIGATION_RING_TARGETS[i],
- CMSettings.Secure.NAVIGATION_RING_TARGETS[i]);
- }
-
- secureToCmSettingsMap.put(LegacyCMSettings.RECENTS_LONG_PRESS_ACTIVITY,
- CMSettings.Secure.RECENTS_LONG_PRESS_ACTIVITY);
- secureToCmSettingsMap.put(LegacyCMSettings.INCALL_POWER_BUTTON_BEHAVIOR,
- CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR);
- secureToCmSettingsMap.put(LegacyCMSettings.INCALL_POWER_BUTTON_BEHAVIOR,
- CMSettings.Secure.INCALL_POWER_BUTTON_BEHAVIOR);
-
- secureToCmSettingsMap.put(LegacyCMSettings.ADB_NOTIFY, CMSettings.Secure.ADB_NOTIFY);
- secureToCmSettingsMap.put(LegacyCMSettings.ADB_PORT, CMSettings.Secure.ADB_PORT);
- secureToCmSettingsMap.put(LegacyCMSettings.DEVICE_HOSTNAME,
- CMSettings.Secure.DEVICE_HOSTNAME);
- secureToCmSettingsMap.put(LegacyCMSettings.KILL_APP_LONGPRESS_BACK,
- CMSettings.Secure.KILL_APP_LONGPRESS_BACK);
- secureToCmSettingsMap.put(LegacyCMSettings.PROTECTED_COMPONENTS,
- CMSettings.Secure.PROTECTED_COMPONENTS);
- secureToCmSettingsMap.put(LegacyCMSettings.LIVE_DISPLAY_COLOR_MATRIX,
- CMSettings.Secure.LIVE_DISPLAY_COLOR_MATRIX);
- secureToCmSettingsMap.put(LegacyCMSettings.ADVANCED_REBOOT,
- CMSettings.Secure.ADVANCED_REBOOT);
- secureToCmSettingsMap.put(LegacyCMSettings.THEME_PREV_BOOT_API_LEVEL,
- CMSettings.Secure.THEME_PREV_BOOT_API_LEVEL);
-
rowsMigrated = migrateCMSettingsForTable(userId,
- CMDatabaseHelper.CMTableNames.TABLE_SECURE, secureToCmSettingsMap);
+ CMDatabaseHelper.CMTableNames.TABLE_SECURE, CMSettings.Secure.LEGACY_SECURE_SETTINGS);
if (LOCAL_LOGV) Log.d(TAG, "Migrated " + rowsMigrated + " to CM secure table");
// Migrate global settings
- HashMap<String, String> globalToCmSettingsMap = new HashMap<String, String>();
- globalToCmSettingsMap.put(LegacyCMSettings.WAKE_WHEN_PLUGGED_OR_UNPLUGGED,
- CMSettings.Global.WAKE_WHEN_PLUGGED_OR_UNPLUGGED);
- globalToCmSettingsMap.put(LegacyCMSettings.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX,
- CMSettings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX);
- globalToCmSettingsMap.put(LegacyCMSettings.POWER_NOTIFICATIONS_ENABLED,
- CMSettings.Global.POWER_NOTIFICATIONS_ENABLED);
- globalToCmSettingsMap.put(LegacyCMSettings.POWER_NOTIFICATIONS_VIBRATE,
- CMSettings.Global.POWER_NOTIFICATIONS_VIBRATE);
- globalToCmSettingsMap.put(LegacyCMSettings.POWER_NOTIFICATIONS_RINGTONE,
- CMSettings.Global.POWER_NOTIFICATIONS_RINGTONE);
- globalToCmSettingsMap.put(LegacyCMSettings.ZEN_DISABLE_DUCKING_DURING_MEDIA_PLAYBACK,
- CMSettings.Global.ZEN_DISABLE_DUCKING_DURING_MEDIA_PLAYBACK);
- globalToCmSettingsMap.put(LegacyCMSettings.WIFI_AUTO_PRIORITIES_CONFIGURATION,
- CMSettings.Global.WIFI_AUTO_PRIORITIES_CONFIGURATION);
-
rowsMigrated = migrateCMSettingsForTable(userId,
- CMDatabaseHelper.CMTableNames.TABLE_GLOBAL, globalToCmSettingsMap);
+ CMDatabaseHelper.CMTableNames.TABLE_GLOBAL, CMSettings.Global.LEGACY_GLOBAL_SETTINGS);
if (LOCAL_LOGV) Log.d(TAG, "Migrated " + rowsMigrated + " to CM global table");
}
}
@@ -1194,19 +187,15 @@ public class CMSettingsProvider extends ContentProvider {
* Migrates CM settings for a specific table and user id.
* @param userId The id of the user to run CM settings migration for.
* @param tableName The name of the table to run CM settings migration on.
- * @param settingsMap A mapping between key names in {@link Settings} and {@link CMSettings}
+ * @param settings An array of keys to migrate from {@link Settings} to {@link CMSettings}
* @return Number of rows migrated.
*/
- private int migrateCMSettingsForTable(int userId, String tableName, HashMap<String,
- String> settingsMap) {
+ private int migrateCMSettingsForTable(int userId, String tableName, String[] settings) {
ContentResolver contentResolver = getContext().getContentResolver();
- Set<Map.Entry<String, String>> entrySet = settingsMap.entrySet();
- ContentValues[] contentValues = new ContentValues[settingsMap.size()];
+ ContentValues[] contentValues = new ContentValues[settings.length];
int migrateSettingsCount = 0;
- for (Map.Entry<String, String> keyPair : entrySet) {
- String settingsKey = keyPair.getKey();
- String cmSettingsKey = keyPair.getValue();
+ for (String settingsKey : settings) {
String settingsValue = null;
if (tableName.equals(CMDatabaseHelper.CMTableNames.TABLE_SYSTEM)) {
@@ -1226,7 +215,7 @@ public class CMSettingsProvider extends ContentProvider {
+ settingsValue);
ContentValues contentValue = new ContentValues();
- contentValue.put(Settings.NameValueTable.NAME, cmSettingsKey);
+ contentValue.put(Settings.NameValueTable.NAME, settingsKey);
contentValue.put(Settings.NameValueTable.VALUE, settingsValue);
contentValues[migrateSettingsCount++] = contentValue;
}