Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +23 −1 Original line number Diff line number Diff line Loading @@ -3812,7 +3812,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { private static final int SETTINGS_VERSION = 225; private static final int SETTINGS_VERSION = 226; private final int mUserId; Loading Loading @@ -6011,6 +6011,28 @@ public class SettingsProvider extends ContentProvider { currentVersion = 225; } // Version 225: Set the System#KEYBOARD_VIBRATION_ENABLED based on touch // feedback enabled state. if (currentVersion == 225) { final SettingsState systemSettings = getSystemSettingsLocked(userId); final Setting touchFeedbackSettings = systemSettings .getSettingLocked(Settings.System.HAPTIC_FEEDBACK_ENABLED); final Setting keyboardVibrationSettings = systemSettings .getSettingLocked(Settings.System.KEYBOARD_VIBRATION_ENABLED); if (keyboardVibrationSettings.isNull()) { if (!touchFeedbackSettings.isNull()) { // Use touch feedback settings. systemSettings.insertSettingOverrideableByRestoreLocked( Settings.System.KEYBOARD_VIBRATION_ENABLED, touchFeedbackSettings.getValue(), touchFeedbackSettings.getTag(), touchFeedbackSettings.isDefaultFromSystem(), SettingsState.SYSTEM_PACKAGE_NAME); } } currentVersion = 226; } // vXXX: Add new settings above this point. if (currentVersion != newVersion) { Loading Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +23 −1 Original line number Diff line number Diff line Loading @@ -3812,7 +3812,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { private static final int SETTINGS_VERSION = 225; private static final int SETTINGS_VERSION = 226; private final int mUserId; Loading Loading @@ -6011,6 +6011,28 @@ public class SettingsProvider extends ContentProvider { currentVersion = 225; } // Version 225: Set the System#KEYBOARD_VIBRATION_ENABLED based on touch // feedback enabled state. if (currentVersion == 225) { final SettingsState systemSettings = getSystemSettingsLocked(userId); final Setting touchFeedbackSettings = systemSettings .getSettingLocked(Settings.System.HAPTIC_FEEDBACK_ENABLED); final Setting keyboardVibrationSettings = systemSettings .getSettingLocked(Settings.System.KEYBOARD_VIBRATION_ENABLED); if (keyboardVibrationSettings.isNull()) { if (!touchFeedbackSettings.isNull()) { // Use touch feedback settings. systemSettings.insertSettingOverrideableByRestoreLocked( Settings.System.KEYBOARD_VIBRATION_ENABLED, touchFeedbackSettings.getValue(), touchFeedbackSettings.getTag(), touchFeedbackSettings.isDefaultFromSystem(), SettingsState.SYSTEM_PACKAGE_NAME); } } currentVersion = 226; } // vXXX: Add new settings above this point. if (currentVersion != newVersion) { Loading