Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f556957 authored by Harry Cutts's avatar Harry Cutts
Browse files

GestureConverter: clean up fling stopping flag

This flag launched in 24Q4.

Bug: 347910711
Test: atest --host inputflinger_tests:GestureConverterTest
Test: m checkinput
Flag: EXEMPT removing com.android.input.flags.enable_touchpad_fling_stop
Change-Id: I4e46eec5d34b3835452db00184f7a0c2ccaf1225
parent 48780bd4
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -108,13 +108,6 @@ flag {
  bug: "246946631"
}

flag {
  name: "enable_touchpad_fling_stop"
  namespace: "input"
  description: "Enable fling scrolling to be stopped by putting a finger on the touchpad again"
  bug: "281106755"
}

flag {
  name: "enable_prediction_pruning_via_jerk_thresholding"
  namespace: "input"
+1 −2
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ GestureConverter::GestureConverter(InputReaderContext& readerContext,
                                   const InputDeviceContext& deviceContext, int32_t deviceId)
      : mDeviceId(deviceId),
        mReaderContext(readerContext),
        mEnableFlingStop(input_flags::enable_touchpad_fling_stop()),
        mEnableNoFocusChange(input_flags::enable_touchpad_no_focus_change()),
        // We can safely assume that ABS_MT_POSITION_X and _Y axes will be available, as EventHub
        // 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
            break;
        case GESTURES_FLING_TAP_DOWN:
            if (mCurrentClassification == MotionClassification::NONE) {
                if (mEnableFlingStop && mFlingMayBeInProgress) {
                if (mFlingMayBeInProgress) {
                    // The user has just touched the pad again after ending a two-finger scroll
                    // motion, which might have started a fling. We want to stop the fling, but
                    // unfortunately there's currently no API for doing so. Instead, send and
+0 −1
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ private:

    const int32_t mDeviceId;
    InputReaderContext& mReaderContext;
    const bool mEnableFlingStop;
    const bool mEnableNoFocusChange;
    bool mEnableSystemGestures{true};

+0 −1
Original line number Diff line number Diff line
@@ -1297,7 +1297,6 @@ TEST_F(GestureConverterTest, FlingTapDown) {

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