input: change touchpad scrolling and tap-to-click defaults
I'd had them default to false when I added them, but they should
actually be true by default (i.e. tap to click should be enabled, and
moving two fingers upwards on the touchpad should scroll down).
Bug: 267653650
Test: on a device without touchpad_natural_scrolling setting set, check
scroll direction is "natural" and tap-to-click works
Test: atest inputflinger_tests
Change-Id: I7d07d599709241460da47d714b221583a7099fb0
This commit is contained in:
@@ -103,9 +103,9 @@ class InputSettingsObserver extends ContentObserver {
|
||||
mObservers.get(uri).accept("setting changed");
|
||||
}
|
||||
|
||||
private boolean getBoolean(String settingName) {
|
||||
private boolean getBoolean(String settingName, boolean defaultValue) {
|
||||
final int setting = Settings.System.getIntForUser(mContext.getContentResolver(),
|
||||
settingName, 0, UserHandle.USER_CURRENT);
|
||||
settingName, defaultValue ? 1 : 0, UserHandle.USER_CURRENT);
|
||||
return setting != 0;
|
||||
}
|
||||
|
||||
@@ -127,20 +127,21 @@ class InputSettingsObserver extends ContentObserver {
|
||||
|
||||
private void updateTouchpadNaturalScrollingEnabled() {
|
||||
mNative.setTouchpadNaturalScrollingEnabled(
|
||||
getBoolean(Settings.System.TOUCHPAD_NATURAL_SCROLLING));
|
||||
getBoolean(Settings.System.TOUCHPAD_NATURAL_SCROLLING, true));
|
||||
}
|
||||
|
||||
private void updateTouchpadTapToClickEnabled() {
|
||||
mNative.setTouchpadTapToClickEnabled(getBoolean(Settings.System.TOUCHPAD_TAP_TO_CLICK));
|
||||
mNative.setTouchpadTapToClickEnabled(
|
||||
getBoolean(Settings.System.TOUCHPAD_TAP_TO_CLICK, true));
|
||||
}
|
||||
|
||||
private void updateTouchpadRightClickZoneEnabled() {
|
||||
mNative.setTouchpadRightClickZoneEnabled(
|
||||
getBoolean(Settings.System.TOUCHPAD_RIGHT_CLICK_ZONE));
|
||||
getBoolean(Settings.System.TOUCHPAD_RIGHT_CLICK_ZONE, false));
|
||||
}
|
||||
|
||||
private void updateShowTouches() {
|
||||
mNative.setShowTouches(getBoolean(Settings.System.SHOW_TOUCHES));
|
||||
mNative.setShowTouches(getBoolean(Settings.System.SHOW_TOUCHES, false));
|
||||
}
|
||||
|
||||
private void updateAccessibilityLargePointer() {
|
||||
|
||||
Reference in New Issue
Block a user