Loading libs/input/Input.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1034,7 +1034,8 @@ std::tuple<int32_t, std::vector<PointerProperties>, std::vector<PointerCoords>> (splitPointerProperties.size() * (historySize + 1))); if (CC_UNLIKELY(splitPointerProperties.size() != splitCount)) { LOG(FATAL) << "Cannot split MotionEvent: Requested splitting " << splitCount // TODO(b/329107108): Promote this to a fatal check once bugs in the caller are resolved. LOG(ERROR) << "Cannot split MotionEvent: Requested splitting " << splitCount << " pointers from the original event, but the original event only contained " << splitPointerProperties.size() << " of those pointers."; } Loading services/inputflinger/dispatcher/InputDispatcher.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -4357,6 +4357,20 @@ std::unique_ptr<MotionEntry> InputDispatcher::splitMotionEvent( MotionEvent::split(originalMotionEntry.action, originalMotionEntry.flags, /*historySize=*/0, originalMotionEntry.pointerProperties, originalMotionEntry.pointerCoords, pointerIds); if (pointerIds.count() != pointerCoords.size()) { // TODO(b/329107108): Determine why some IDs in pointerIds were not in originalMotionEntry. // This is bad. We are missing some of the pointers that we expected to deliver. // Most likely this indicates that we received an ACTION_MOVE events that has // different pointer ids than we expected based on the previous ACTION_DOWN // or ACTION_POINTER_DOWN events that caused us to decide to split the pointers // in this way. ALOGW("Dropping split motion event because the pointer count is %d but " "we expected there to be %zu pointers. This probably means we received " "a broken sequence of pointer ids from the input device: %s", pointerCoords.size(), pointerIds.count(), originalMotionEntry.getDescription().c_str()); return nullptr; } // TODO(b/327503168): Move this check inside MotionEvent::split once all callers handle it // correctly. Loading Loading
libs/input/Input.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1034,7 +1034,8 @@ std::tuple<int32_t, std::vector<PointerProperties>, std::vector<PointerCoords>> (splitPointerProperties.size() * (historySize + 1))); if (CC_UNLIKELY(splitPointerProperties.size() != splitCount)) { LOG(FATAL) << "Cannot split MotionEvent: Requested splitting " << splitCount // TODO(b/329107108): Promote this to a fatal check once bugs in the caller are resolved. LOG(ERROR) << "Cannot split MotionEvent: Requested splitting " << splitCount << " pointers from the original event, but the original event only contained " << splitPointerProperties.size() << " of those pointers."; } Loading
services/inputflinger/dispatcher/InputDispatcher.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -4357,6 +4357,20 @@ std::unique_ptr<MotionEntry> InputDispatcher::splitMotionEvent( MotionEvent::split(originalMotionEntry.action, originalMotionEntry.flags, /*historySize=*/0, originalMotionEntry.pointerProperties, originalMotionEntry.pointerCoords, pointerIds); if (pointerIds.count() != pointerCoords.size()) { // TODO(b/329107108): Determine why some IDs in pointerIds were not in originalMotionEntry. // This is bad. We are missing some of the pointers that we expected to deliver. // Most likely this indicates that we received an ACTION_MOVE events that has // different pointer ids than we expected based on the previous ACTION_DOWN // or ACTION_POINTER_DOWN events that caused us to decide to split the pointers // in this way. ALOGW("Dropping split motion event because the pointer count is %d but " "we expected there to be %zu pointers. This probably means we received " "a broken sequence of pointer ids from the input device: %s", pointerCoords.size(), pointerIds.count(), originalMotionEntry.getDescription().c_str()); return nullptr; } // TODO(b/327503168): Move this check inside MotionEvent::split once all callers handle it // correctly. Loading