Skip to content

Commit c542443

Browse files
Treehugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "GestureConverter: clean up fling stopping flag" into main
2 parents e7409b1 + 6f55695 commit c542443

4 files changed

Lines changed: 1 addition & 11 deletions

File tree

libs/input/input_flags.aconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ flag {
108108
bug: "246946631"
109109
}
110110

111-
flag {
112-
name: "enable_touchpad_fling_stop"
113-
namespace: "input"
114-
description: "Enable fling scrolling to be stopped by putting a finger on the touchpad again"
115-
bug: "281106755"
116-
}
117-
118111
flag {
119112
name: "enable_prediction_pruning_via_jerk_thresholding"
120113
namespace: "input"

services/inputflinger/reader/mapper/gestures/GestureConverter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ GestureConverter::GestureConverter(InputReaderContext& readerContext,
8181
const InputDeviceContext& deviceContext, int32_t deviceId)
8282
: mDeviceId(deviceId),
8383
mReaderContext(readerContext),
84-
mEnableFlingStop(input_flags::enable_touchpad_fling_stop()),
8584
mEnableNoFocusChange(input_flags::enable_touchpad_no_focus_change()),
8685
// We can safely assume that ABS_MT_POSITION_X and _Y axes will be available, as EventHub
8786
// won't classify a device as a touchpad if they're not present.
@@ -406,7 +405,7 @@ std::list<NotifyArgs> GestureConverter::handleFling(nsecs_t when, nsecs_t readTi
406405
break;
407406
case GESTURES_FLING_TAP_DOWN:
408407
if (mCurrentClassification == MotionClassification::NONE) {
409-
if (mEnableFlingStop && mFlingMayBeInProgress) {
408+
if (mFlingMayBeInProgress) {
410409
// The user has just touched the pad again after ending a two-finger scroll
411410
// motion, which might have started a fling. We want to stop the fling, but
412411
// unfortunately there's currently no API for doing so. Instead, send and

services/inputflinger/reader/mapper/gestures/GestureConverter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class GestureConverter {
104104

105105
const int32_t mDeviceId;
106106
InputReaderContext& mReaderContext;
107-
const bool mEnableFlingStop;
108107
const bool mEnableNoFocusChange;
109108
bool mEnableSystemGestures{true};
110109

services/inputflinger/tests/GestureConverter_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,6 @@ TEST_F(GestureConverterTest, FlingTapDown) {
12971297

12981298
TEST_F(GestureConverterTest, FlingTapDownAfterScrollStopsFling) {
12991299
InputDeviceContext deviceContext(*mDevice, EVENTHUB_ID);
1300-
input_flags::enable_touchpad_fling_stop(true);
13011300
GestureConverter converter(*mReader->getContext(), deviceContext, DEVICE_ID);
13021301
converter.setDisplayId(ui::LogicalDisplayId::DEFAULT);
13031302

0 commit comments

Comments
 (0)