Merge "Default value for DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW" into sc-dev am: 62f17faa91

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13412973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I02ae44d7fd33135c0cdad820c32a3df7adf65125
This commit is contained in:
Chris Li
2021-01-27 15:47:56 +00:00
committed by Automerger Merge Worker
2 changed files with 22 additions and 1 deletions

View File

@@ -249,4 +249,7 @@
<!-- Default for Settings.Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY -->
<integer name="def_accessibility_magnification_capabilities">3</integer>
<!-- Default for Settings.Global.DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW -->
<bool name="def_enable_non_resizable_multi_window">false</bool>
</resources>

View File

@@ -3342,7 +3342,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
private static final int SETTINGS_VERSION = 197;
private static final int SETTINGS_VERSION = 198;
private final int mUserId;
@@ -4815,6 +4815,24 @@ public class SettingsProvider extends ContentProvider {
currentVersion = 197;
}
if (currentVersion == 197) {
// Version 197: Set the default value for Global Settings:
// DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW
final SettingsState globalSettings = getGlobalSettingsLocked();
final Setting enableNonResizableMultiWindow = globalSettings.getSettingLocked(
Global.DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW);
if (enableNonResizableMultiWindow.isNull()) {
final boolean defEnableNonResizableMultiWindow = getContext().getResources()
.getBoolean(R.bool.def_enable_non_resizable_multi_window);
globalSettings.insertSettingLocked(
Global.DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW,
defEnableNonResizableMultiWindow ? "1" : "0", null, true,
SettingsState.SYSTEM_PACKAGE_NAME);
}
currentVersion = 198;
}
// vXXX: Add new settings above this point.
if (currentVersion != newVersion) {