add default overlay for END_CALL_BEHAVIOR
- for automotive, default END_CALL_BEHAVIOR should be 0. - automotive product should have overlay overriding it. - default value is the same as now bug: 31926624 Test: manual (check dumpsys window policy) Change-Id: Ice7b3c1374dfccf8a03c13c73201fa1615acab5f
This commit is contained in:
@@ -222,4 +222,7 @@
|
||||
|
||||
<!-- Default setting for ability to add users from the lock screen -->
|
||||
<bool name="def_add_users_from_lockscreen">false</bool>
|
||||
|
||||
<!-- default setting for Settings.System.END_BUTTON_BEHAVIOR : END_BUTTON_BEHAVIOR_SLEEP -->
|
||||
<integer name="def_end_button_behavior">0x2</integer>
|
||||
</resources>
|
||||
|
||||
@@ -2137,7 +2137,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private final class UpgradeController {
|
||||
private static final int SETTINGS_VERSION = 132;
|
||||
private static final int SETTINGS_VERSION = 133;
|
||||
|
||||
private final int mUserId;
|
||||
|
||||
@@ -2479,6 +2479,19 @@ public class SettingsProvider extends ContentProvider {
|
||||
currentVersion = 132;
|
||||
}
|
||||
|
||||
if (currentVersion == 132) {
|
||||
// Version 132: Add default end button behavior
|
||||
final SettingsState systemSettings = getSystemSettingsLocked(userId);
|
||||
if (systemSettings.getSettingLocked(Settings.System.END_BUTTON_BEHAVIOR) ==
|
||||
null) {
|
||||
String defaultEndButtonBehavior = Integer.toString(getContext()
|
||||
.getResources().getInteger(R.integer.def_end_button_behavior));
|
||||
systemSettings.insertSettingLocked(Settings.System.END_BUTTON_BEHAVIOR,
|
||||
defaultEndButtonBehavior, SettingsState.SYSTEM_PACKAGE_NAME);
|
||||
}
|
||||
currentVersion = 133;
|
||||
}
|
||||
|
||||
if (currentVersion != newVersion) {
|
||||
Slog.wtf("SettingsProvider", "warning: upgrading settings database to version "
|
||||
+ newVersion + " left it at "
|
||||
|
||||
Reference in New Issue
Block a user