Invert STYLUS_BUTTONS_DISABLED to avoid double negatives.
Test: StylusDevicesControllerTest Bug: 267595764 Change-Id: I9f74aaf064eb08d4abb6800d59ee3c224f9793b8
This commit is contained in:
@@ -140,7 +140,7 @@ public class StylusDevicesController extends AbstractPreferenceController implem
|
||||
pref.setIcon(R.drawable.ic_block);
|
||||
pref.setOnPreferenceClickListener(this);
|
||||
pref.setChecked(Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.STYLUS_BUTTONS_DISABLED, 0) == 1);
|
||||
Settings.Secure.STYLUS_BUTTONS_ENABLED, 1) == 0);
|
||||
return pref;
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ public class StylusDevicesController extends AbstractPreferenceController implem
|
||||
break;
|
||||
case KEY_IGNORE_BUTTON:
|
||||
Settings.Secure.putInt(mContext.getContentResolver(),
|
||||
Secure.STYLUS_BUTTONS_DISABLED,
|
||||
((SwitchPreference) preference).isChecked() ? 1 : 0);
|
||||
Secure.STYLUS_BUTTONS_ENABLED,
|
||||
((SwitchPreference) preference).isChecked() ? 0 : 1);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user