Merge "settings: add def_enable_back_animation" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
0073d0927d
@@ -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