settings: add def_enable_back_animation
- Provide default value for Settings.Global.ENABLE_BACK_ANIMATION - Defaults to true in values-watch Test: build / flash Bug: 290802058 Change-Id: I39451a47845c7261f6e8d8aa0693f7f88d86be4b
This commit is contained in:
@@ -321,4 +321,7 @@
|
||||
|
||||
<!-- Whether vibrate icon is shown in the status bar by default. -->
|
||||
<integer name="def_statusBarVibrateIconEnabled">0</integer>
|
||||
|
||||
<!-- Whether predictive back animation is enabled by default. -->
|
||||
<bool name="def_enable_back_animation">false</bool>
|
||||
</resources>
|
||||
|
||||
@@ -3773,7 +3773,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private final class UpgradeController {
|
||||
private static final int SETTINGS_VERSION = 220;
|
||||
private static final int SETTINGS_VERSION = 221;
|
||||
|
||||
private final int mUserId;
|
||||
|
||||
@@ -5867,6 +5867,21 @@ public class SettingsProvider extends ContentProvider {
|
||||
currentVersion = 220;
|
||||
}
|
||||
|
||||
if (currentVersion == 220) {
|
||||
final SettingsState globalSettings = getGlobalSettingsLocked();
|
||||
final Setting enableBackAnimation =
|
||||
globalSettings.getSettingLocked(Global.ENABLE_BACK_ANIMATION);
|
||||
if (enableBackAnimation.isNull()) {
|
||||
final boolean defEnableBackAnimation =
|
||||
getContext()
|
||||
.getResources()
|
||||
.getBoolean(R.bool.def_enable_back_animation);
|
||||
initGlobalSettingsDefaultValLocked(
|
||||
Settings.Global.ENABLE_BACK_ANIMATION, defEnableBackAnimation);
|
||||
}
|
||||
currentVersion = 221;
|
||||
}
|
||||
|
||||
// vXXX: Add new settings above this point.
|
||||
|
||||
if (currentVersion != newVersion) {
|
||||
|
||||
Reference in New Issue
Block a user