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

Commit eb4a30c4 authored by Antonio Kantek's avatar Antonio Kantek
Browse files

TouchMode (4.2/n) Enhancing recycle to support touch mode event

Bug: 193718270
Test: atest inputflinger_tests
Change-Id: If165f0f7f9c379647d3091216fa2e908dd4ea51f
parent 4803725c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -969,6 +969,13 @@ void PooledInputEventFactory::recycle(InputEvent* event) {
            return;
        }
        break;
    case AINPUT_EVENT_TYPE_TOUCH_MODE:
        if (mTouchModeEventPool.size() < mMaxPoolSize) {
            mTouchModeEventPool.push(
                    std::unique_ptr<TouchModeEvent>(static_cast<TouchModeEvent*>(event)));
            return;
        }
        break;
    }
    delete event;
}