Merge "SettingsProvider: Add default value for SHOW_IME_WITH_HARD_KEYBOARD." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
fbcaea877c
@ -155,6 +155,9 @@
|
||||
<!-- Default for Settings.Secure.LONG_PRESS_TIMEOUT_MILLIS -->
|
||||
<integer name="def_long_press_timeout_millis">500</integer>
|
||||
|
||||
<!-- Default for Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD -->
|
||||
<bool name="def_show_ime_with_hard_keyboard">false</bool>
|
||||
|
||||
<!-- Default for Settings.System.POINTER_SPEED -->
|
||||
<integer name="def_pointer_speed">0</integer>
|
||||
|
||||
|
@ -1940,7 +1940,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private final class UpgradeController {
|
||||
private static final int SETTINGS_VERSION = 124;
|
||||
private static final int SETTINGS_VERSION = 125;
|
||||
|
||||
private final int mUserId;
|
||||
|
||||
@ -2120,6 +2120,22 @@ public class SettingsProvider extends ContentProvider {
|
||||
currentVersion = 124;
|
||||
}
|
||||
|
||||
if (currentVersion == 124) {
|
||||
// Version 124: allow OEMs to set a default value for whether IME should be
|
||||
// shown when a physical keyboard is connected.
|
||||
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
||||
Setting currentSetting = secureSettings.getSettingLocked(
|
||||
Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD);
|
||||
if (currentSetting == null) {
|
||||
secureSettings.insertSettingLocked(
|
||||
Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD,
|
||||
getContext().getResources().getBoolean(
|
||||
R.bool.def_show_ime_with_hard_keyboard) ? "1" : "0",
|
||||
SettingsState.SYSTEM_PACKAGE_NAME);
|
||||
}
|
||||
currentVersion = 125;
|
||||
}
|
||||
|
||||
// vXXX: Add new settings above this point.
|
||||
|
||||
// Return the current version.
|
||||
|
Reference in New Issue
Block a user