Skip to content

Commit 7dab98e

Browse files
author
Arpit Singh
committed
Cleanup touchpad_typing_palm_rejection flag
Flag is in nextfood so we can remove it. Bug: 301055381 Test: atest --host inputflinger_tests Flag: EXEMPT removing enable_touchpad_typing_palm_rejection Change-Id: I70afd61eb5f38719c928c002cc24ed99218ce6b5
1 parent c93479c commit 7dab98e

3 files changed

Lines changed: 4 additions & 20 deletions

File tree

libs/input/input_flags.aconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ flag {
6060
bug: "299977100"
6161
}
6262

63-
flag {
64-
name: "enable_touchpad_typing_palm_rejection"
65-
namespace: "input"
66-
description: "Enabling additional touchpad palm rejection will disable the tap to click while the user is typing on a physical keyboard"
67-
bug: "301055381"
68-
}
69-
7063
flag {
7164
name: "enable_v2_touchpad_typing_palm_rejection"
7265
namespace: "input"

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ namespace android {
3939

4040
namespace {
4141

42-
// This will disable the tap to click while the user is typing on a physical keyboard
43-
const bool ENABLE_TOUCHPAD_PALM_REJECTION = input_flags::enable_touchpad_typing_palm_rejection();
44-
4542
// In addition to v1, v2 will also cancel ongoing move gestures while typing and add delay in
4643
// re-enabling the tap to click.
4744
const bool ENABLE_TOUCHPAD_PALM_REJECTION_V2 =
@@ -226,8 +223,7 @@ std::list<NotifyArgs> GestureConverter::handleMove(nsecs_t when, nsecs_t readTim
226223
if (!mIsHoverCancelled) {
227224
// handleFling calls hoverMove with zero delta on FLING_TAP_DOWN. Don't enable tap to click
228225
// for this case as subsequent handleButtonsChange may choose to ignore this tap.
229-
if ((ENABLE_TOUCHPAD_PALM_REJECTION || ENABLE_TOUCHPAD_PALM_REJECTION_V2) &&
230-
(std::abs(deltaX) > 0 || std::abs(deltaY) > 0)) {
226+
if (std::abs(deltaX) > 0 || std::abs(deltaY) > 0) {
231227
enableTapToClick(when);
232228
}
233229
}
@@ -278,7 +274,7 @@ std::list<NotifyArgs> GestureConverter::handleButtonsChange(nsecs_t when, nsecs_
278274
// return early to prevent this tap
279275
return out;
280276
}
281-
} else if (ENABLE_TOUCHPAD_PALM_REJECTION && mReaderContext.isPreventingTouchpadTaps()) {
277+
} else if (mReaderContext.isPreventingTouchpadTaps()) {
282278
enableTapToClick(when);
283279
if (gesture.details.buttons.is_tap) {
284280
// return early to prevent this tap

services/inputflinger/tests/GestureConverter_test.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ namespace input_flags = com::android::input::flags;
4242

4343
namespace {
4444

45-
const auto TOUCHPAD_PALM_REJECTION =
46-
ACONFIG_FLAG(input_flags, enable_touchpad_typing_palm_rejection);
4745
const auto TOUCHPAD_PALM_REJECTION_V2 =
4846
ACONFIG_FLAG(input_flags, enable_v2_touchpad_typing_palm_rejection);
4947

@@ -1461,7 +1459,6 @@ TEST_F(GestureConverterTest, Click) {
14611459
}
14621460

14631461
TEST_F_WITH_FLAGS(GestureConverterTest, TapWithTapToClickDisabled,
1464-
REQUIRES_FLAGS_ENABLED(TOUCHPAD_PALM_REJECTION),
14651462
REQUIRES_FLAGS_DISABLED(TOUCHPAD_PALM_REJECTION_V2)) {
14661463
nsecs_t currentTime = ARBITRARY_GESTURE_TIME;
14671464

@@ -1574,8 +1571,7 @@ TEST_F_WITH_FLAGS(GestureConverterTest, TapWithTapToClickDisabledWithDelay,
15741571
ASSERT_THAT(args, Each(VariantWith<NotifyMotionArgs>(WithRelativeMotion(0.f, 0.f))));
15751572
}
15761573

1577-
TEST_F_WITH_FLAGS(GestureConverterTest, ClickWithTapToClickDisabled,
1578-
REQUIRES_FLAGS_ENABLED(TOUCHPAD_PALM_REJECTION)) {
1574+
TEST_F(GestureConverterTest, ClickWithTapToClickDisabled) {
15791575
// Click should still produce button press/release events
15801576
mReader->getContext()->setPreventingTouchpadTaps(true);
15811577

@@ -1644,8 +1640,7 @@ TEST_F_WITH_FLAGS(GestureConverterTest, ClickWithTapToClickDisabled,
16441640
ASSERT_FALSE(mReader->getContext()->isPreventingTouchpadTaps());
16451641
}
16461642

1647-
TEST_F_WITH_FLAGS(GestureConverterTest, MoveEnablesTapToClick,
1648-
REQUIRES_FLAGS_ENABLED(TOUCHPAD_PALM_REJECTION)) {
1643+
TEST_F(GestureConverterTest, MoveEnablesTapToClick) {
16491644
// initially disable tap-to-click
16501645
mReader->getContext()->setPreventingTouchpadTaps(true);
16511646

0 commit comments

Comments
 (0)