Correct null check for end button behavior.
SettingsState.getSettingLocked never returns a null value, so the car_product overlay value of this setting is always ignored. PhoneWindowManager then uses a hardcoded default with undesired behavior for the car. Checking the null indicator on the returned value allows the setting to be initialized properly. Fixes: 113123033 Test: adb shell input keyevent 6 before and after change, verify desired behavior Change-Id: Ib2b64331ae986efda6bb961d487e4de023c43d84
This commit is contained in:
@@ -3285,8 +3285,8 @@ public class SettingsProvider extends ContentProvider {
|
||||
if (currentVersion == 133) {
|
||||
// Version 133: Add default end button behavior
|
||||
final SettingsState systemSettings = getSystemSettingsLocked(userId);
|
||||
if (systemSettings.getSettingLocked(Settings.System.END_BUTTON_BEHAVIOR) ==
|
||||
null) {
|
||||
if (systemSettings.getSettingLocked(Settings.System.END_BUTTON_BEHAVIOR)
|
||||
.isNull()) {
|
||||
String defaultEndButtonBehavior = Integer.toString(getContext()
|
||||
.getResources().getInteger(R.integer.def_end_button_behavior));
|
||||
systemSettings.insertSettingLocked(Settings.System.END_BUTTON_BEHAVIOR,
|
||||
|
||||
Reference in New Issue
Block a user