[Fixed] Reverse scrolling setting is reversed
If useTouchpadNaturalScrolling is false, "Reverse scrolling" should be on. [The API value] useTouchpadNaturalScrolling: false [The expected UX behavior] Reverse scrolling: on fingers upward, scroll up, content moves down The description of "useTouchpadNaturalScrolling": Returns true if moving two fingers upwards on the touchpad should scroll down, which is known as natural scrolling. The description of "Reverse scrolling": Content moves up when you scroll down. Bug: 280047007 Test: manual and passed atest TrackpadReverseScrollingPreferenceControllerTest Change-Id: Ia5e30fa14b599ddcffae99005114f10412ccad3c
This commit is contained in:
@@ -30,12 +30,12 @@ public class TrackpadReverseScrollingPreferenceController extends TogglePreferen
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return InputSettings.useTouchpadNaturalScrolling(mContext);
|
||||
return !InputSettings.useTouchpadNaturalScrolling(mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setChecked(boolean isChecked) {
|
||||
InputSettings.setTouchpadNaturalScrolling(mContext, isChecked);
|
||||
InputSettings.setTouchpadNaturalScrolling(mContext, !isChecked);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user