Flip flag to enable vibration on wireless charging

Test: manual
Change-Id: Icaae951e37a8a6ffd925fb6a5907ce1dc1748500
Fixes: 74505795
This commit is contained in:
Beverly
2018-05-23 18:03:23 -04:00
parent 83aaae4136
commit 155c9d2299

View File

@@ -2935,7 +2935,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
private static final int SETTINGS_VERSION = 167;
private static final int SETTINGS_VERSION = 168;
private final int mUserId;
@@ -3792,6 +3792,19 @@ public class SettingsProvider extends ContentProvider {
currentVersion = 167;
}
if (currentVersion == 167) {
// Version 167: by default, vibrate for wireless charging
final SettingsState globalSettings = getGlobalSettingsLocked();
final Setting currentSetting = globalSettings.getSettingLocked(
Global.CHARGING_VIBRATION_ENABLED);
if (currentSetting.isNull()) {
globalSettings.insertSettingLocked(
Global.CHARGING_VIBRATION_ENABLED, "1",
null, true, SettingsState.SYSTEM_PACKAGE_NAME);
}
currentVersion = 168;
}
// vXXX: Add new settings above this point.
if (currentVersion != newVersion) {