Loading services/inputflinger/PointerChoreographer.cpp +100 −30 Original line number Diff line number Diff line Loading @@ -37,6 +37,11 @@ bool isFromTouchpad(const NotifyMotionArgs& args) { args.pointerProperties[0].toolType == ToolType::FINGER; } bool isFromDrawingTablet(const NotifyMotionArgs& args) { return isFromSource(args.source, AINPUT_SOURCE_MOUSE | AINPUT_SOURCE_STYLUS) && isStylusToolType(args.pointerProperties[0].toolType); } bool isHoverAction(int32_t action) { return action == AMOTION_EVENT_ACTION_HOVER_ENTER || action == AMOTION_EVENT_ACTION_HOVER_MOVE || action == AMOTION_EVENT_ACTION_HOVER_EXIT; Loading @@ -46,6 +51,13 @@ bool isStylusHoverEvent(const NotifyMotionArgs& args) { return isStylusEvent(args.source, args.pointerProperties) && isHoverAction(args.action); } bool isMouseOrTouchpad(uint32_t sources) { // Check if this is a mouse or touchpad, but not a drawing tablet. return isFromSource(sources, AINPUT_SOURCE_MOUSE_RELATIVE) || (isFromSource(sources, AINPUT_SOURCE_MOUSE) && !isFromSource(sources, AINPUT_SOURCE_STYLUS)); } inline void notifyPointerDisplayChange(std::optional<std::tuple<int32_t, FloatPoint>> change, PointerChoreographerPolicyInterface& policy) { if (!change) { Loading @@ -55,6 +67,18 @@ inline void notifyPointerDisplayChange(std::optional<std::tuple<int32_t, FloatPo policy.notifyPointerDisplayIdChanged(displayId, cursorPosition); } void setIconForController(const std::variant<std::unique_ptr<SpriteIcon>, PointerIconStyle>& icon, PointerControllerInterface& controller) { if (std::holds_alternative<std::unique_ptr<SpriteIcon>>(icon)) { if (std::get<std::unique_ptr<SpriteIcon>>(icon) == nullptr) { LOG(FATAL) << "SpriteIcon should not be null"; } controller.setCustomPointerIcon(*std::get<std::unique_ptr<SpriteIcon>>(icon)); } else { controller.updatePointerIcon(std::get<PointerIconStyle>(icon)); } } } // namespace // --- PointerChoreographer --- Loading Loading @@ -107,6 +131,8 @@ NotifyMotionArgs PointerChoreographer::processMotion(const NotifyMotionArgs& arg return processMouseEventLocked(args); } else if (isFromTouchpad(args)) { return processTouchpadEventLocked(args); } else if (isFromDrawingTablet(args)) { processDrawingTabletEventLocked(args); } else if (mStylusPointerIconEnabled && isStylusHoverEvent(args)) { processStylusHoverEventLocked(args); } else if (isFromSource(args.source, AINPUT_SOURCE_TOUCHSCREEN)) { Loading Loading @@ -189,6 +215,36 @@ NotifyMotionArgs PointerChoreographer::processTouchpadEventLocked(const NotifyMo return newArgs; } void PointerChoreographer::processDrawingTabletEventLocked(const android::NotifyMotionArgs& args) { if (args.displayId == ADISPLAY_ID_NONE) { return; } if (args.getPointerCount() != 1) { LOG(WARNING) << "Only drawing tablet events with a single pointer are currently supported: " << args.dump(); } // Use a mouse pointer controller for drawing tablets, or create one if it doesn't exist. auto [it, _] = mDrawingTabletPointersByDevice.try_emplace(args.deviceId, getMouseControllerConstructor( args.displayId)); PointerControllerInterface& pc = *it->second; const float x = args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X); const float y = args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y); pc.setPosition(x, y); if (args.action == AMOTION_EVENT_ACTION_HOVER_EXIT) { // TODO(b/315815559): Do not fade and reset the icon if the hover exit will be followed // immediately by a DOWN event. pc.fade(PointerControllerInterface::Transition::IMMEDIATE); pc.updatePointerIcon(PointerIconStyle::TYPE_NOT_SPECIFIED); } else if (canUnfadeOnDisplay(args.displayId)) { pc.unfade(PointerControllerInterface::Transition::IMMEDIATE); } } /** * When screen is touched, fade the mouse pointer on that display. We only call fade for * ACTION_DOWN events.This would allow both mouse and touch to be used at the same time if the Loading Loading @@ -255,6 +311,8 @@ void PointerChoreographer::processStylusHoverEventLocked(const NotifyMotionArgs& const float y = args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y); pc.setPosition(x, y); if (args.action == AMOTION_EVENT_ACTION_HOVER_EXIT) { // TODO(b/315815559): Do not fade and reset the icon if the hover exit will be followed // immediately by a DOWN event. pc.fade(PointerControllerInterface::Transition::IMMEDIATE); pc.updatePointerIcon(PointerIconStyle::TYPE_NOT_SPECIFIED); } else if (canUnfadeOnDisplay(args.displayId)) { Loading Loading @@ -284,6 +342,7 @@ void PointerChoreographer::processDeviceReset(const NotifyDeviceResetArgs& args) std::scoped_lock _l(mLock); mTouchPointersByDevice.erase(args.deviceId); mStylusPointersByDevice.erase(args.deviceId); mDrawingTabletPointersByDevice.erase(args.deviceId); } void PointerChoreographer::notifyPointerCaptureChanged( Loading Loading @@ -320,6 +379,11 @@ void PointerChoreographer::dump(std::string& dump) { std::string pointerControllerDump = addLinePrefix(stylusPointerController->dump(), INDENT); dump += INDENT + std::to_string(deviceId) + " : " + pointerControllerDump; } dump += INDENT "DrawingTabletControllers:\n"; for (const auto& [deviceId, drawingTabletController] : mDrawingTabletPointersByDevice) { std::string pointerControllerDump = addLinePrefix(drawingTabletController->dump(), INDENT); dump += INDENT + std::to_string(deviceId) + " : " + pointerControllerDump; } dump += "\n"; } Loading Loading @@ -361,13 +425,13 @@ PointerChoreographer::PointerDisplayChange PointerChoreographer::updatePointerCo std::set<int32_t /*displayId*/> mouseDisplaysToKeep; std::set<DeviceId> touchDevicesToKeep; std::set<DeviceId> stylusDevicesToKeep; std::set<DeviceId> drawingTabletDevicesToKeep; // Mark the displayIds or deviceIds of PointerControllers currently needed, and create // new PointerControllers if necessary. for (const auto& info : mInputDeviceInfos) { const uint32_t sources = info.getSources(); if (isFromSource(sources, AINPUT_SOURCE_MOUSE) || isFromSource(sources, AINPUT_SOURCE_MOUSE_RELATIVE)) { if (isMouseOrTouchpad(sources)) { const int32_t displayId = getTargetMouseDisplayLocked(info.getAssociatedDisplayId()); mouseDisplaysToKeep.insert(displayId); // For mice, show the cursor immediately when the device is first connected or Loading @@ -388,6 +452,10 @@ PointerChoreographer::PointerDisplayChange PointerChoreographer::updatePointerCo info.getAssociatedDisplayId() != ADISPLAY_ID_NONE) { stylusDevicesToKeep.insert(info.getId()); } if (isFromSource(sources, AINPUT_SOURCE_STYLUS | AINPUT_SOURCE_MOUSE) && info.getAssociatedDisplayId() != ADISPLAY_ID_NONE) { drawingTabletDevicesToKeep.insert(info.getId()); } } // Remove PointerControllers no longer needed. Loading @@ -400,6 +468,9 @@ PointerChoreographer::PointerDisplayChange PointerChoreographer::updatePointerCo std::erase_if(mStylusPointersByDevice, [&stylusDevicesToKeep](const auto& pair) { return stylusDevicesToKeep.find(pair.first) == stylusDevicesToKeep.end(); }); std::erase_if(mDrawingTabletPointersByDevice, [&drawingTabletDevicesToKeep](const auto& pair) { return drawingTabletDevicesToKeep.find(pair.first) == drawingTabletDevicesToKeep.end(); }); std::erase_if(mMouseDevices, [&](DeviceId id) REQUIRES(mLock) { return std::find_if(mInputDeviceInfos.begin(), mInputDeviceInfos.end(), [id](const auto& info) { return info.getId() == id; }) == Loading Loading @@ -460,6 +531,12 @@ void PointerChoreographer::setDisplayViewports(const std::vector<DisplayViewport stylusPointerController->setDisplayViewport(viewport); } } for (const auto& [deviceId, drawingTabletController] : mDrawingTabletPointersByDevice) { const InputDeviceInfo* info = findInputDeviceLocked(deviceId); if (info && info->getAssociatedDisplayId() == displayId) { drawingTabletController->setDisplayViewport(viewport); } } } mViewports = viewports; pointerDisplayChange = calculatePointerDisplayChangeToNotify(); Loading Loading @@ -533,42 +610,35 @@ bool PointerChoreographer::setPointerIcon( return false; } const uint32_t sources = info->getSources(); const auto stylusPointerIt = mStylusPointersByDevice.find(deviceId); if (isFromSource(sources, AINPUT_SOURCE_STYLUS) && stylusPointerIt != mStylusPointersByDevice.end()) { if (std::holds_alternative<std::unique_ptr<SpriteIcon>>(icon)) { if (std::get<std::unique_ptr<SpriteIcon>>(icon) == nullptr) { LOG(FATAL) << "SpriteIcon should not be null"; if (isFromSource(sources, AINPUT_SOURCE_STYLUS | AINPUT_SOURCE_MOUSE)) { auto it = mDrawingTabletPointersByDevice.find(deviceId); if (it != mDrawingTabletPointersByDevice.end()) { setIconForController(icon, *it->second); return true; } stylusPointerIt->second->setCustomPointerIcon( *std::get<std::unique_ptr<SpriteIcon>>(icon)); } else { stylusPointerIt->second->updatePointerIcon(std::get<PointerIconStyle>(icon)); } } else if (isFromSource(sources, AINPUT_SOURCE_MOUSE)) { if (const auto mousePointerIt = mMousePointersByDisplay.find(displayId); mousePointerIt != mMousePointersByDisplay.end()) { if (std::holds_alternative<std::unique_ptr<SpriteIcon>>(icon)) { if (std::get<std::unique_ptr<SpriteIcon>>(icon) == nullptr) { LOG(FATAL) << "SpriteIcon should not be null"; if (isFromSource(sources, AINPUT_SOURCE_STYLUS)) { auto it = mStylusPointersByDevice.find(deviceId); if (it != mStylusPointersByDevice.end()) { setIconForController(icon, *it->second); return true; } mousePointerIt->second->setCustomPointerIcon( *std::get<std::unique_ptr<SpriteIcon>>(icon)); } else { mousePointerIt->second->updatePointerIcon(std::get<PointerIconStyle>(icon)); } if (isFromSource(sources, AINPUT_SOURCE_MOUSE)) { auto it = mMousePointersByDisplay.find(displayId); if (it != mMousePointersByDisplay.end()) { setIconForController(icon, *it->second); return true; } else { LOG(WARNING) << "No mouse pointer controller found for display " << displayId << ", device " << deviceId << "."; return false; } } else { LOG(WARNING) << "Cannot set pointer icon for display " << displayId << ", device " << deviceId << "."; return false; } return true; LOG(WARNING) << "Cannot set pointer icon for display " << displayId << ", device " << deviceId << "."; return false; } void PointerChoreographer::setPointerIconVisibility(int32_t displayId, bool visible) { Loading services/inputflinger/PointerChoreographer.h +3 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ private: NotifyMotionArgs processMotion(const NotifyMotionArgs& args); NotifyMotionArgs processMouseEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); NotifyMotionArgs processTouchpadEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processDrawingTabletEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processTouchscreenAndStylusEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processStylusHoverEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processDeviceReset(const NotifyDeviceResetArgs& args); Loading @@ -144,6 +145,8 @@ private: GUARDED_BY(mLock); std::map<DeviceId, std::shared_ptr<PointerControllerInterface>> mStylusPointersByDevice GUARDED_BY(mLock); std::map<DeviceId, std::shared_ptr<PointerControllerInterface>> mDrawingTabletPointersByDevice GUARDED_BY(mLock); int32_t mDefaultMouseDisplayId GUARDED_BY(mLock); int32_t mNotifiedPointerDisplayId GUARDED_BY(mLock); Loading services/inputflinger/tests/PointerChoreographer_test.cpp +206 −145 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
services/inputflinger/PointerChoreographer.cpp +100 −30 Original line number Diff line number Diff line Loading @@ -37,6 +37,11 @@ bool isFromTouchpad(const NotifyMotionArgs& args) { args.pointerProperties[0].toolType == ToolType::FINGER; } bool isFromDrawingTablet(const NotifyMotionArgs& args) { return isFromSource(args.source, AINPUT_SOURCE_MOUSE | AINPUT_SOURCE_STYLUS) && isStylusToolType(args.pointerProperties[0].toolType); } bool isHoverAction(int32_t action) { return action == AMOTION_EVENT_ACTION_HOVER_ENTER || action == AMOTION_EVENT_ACTION_HOVER_MOVE || action == AMOTION_EVENT_ACTION_HOVER_EXIT; Loading @@ -46,6 +51,13 @@ bool isStylusHoverEvent(const NotifyMotionArgs& args) { return isStylusEvent(args.source, args.pointerProperties) && isHoverAction(args.action); } bool isMouseOrTouchpad(uint32_t sources) { // Check if this is a mouse or touchpad, but not a drawing tablet. return isFromSource(sources, AINPUT_SOURCE_MOUSE_RELATIVE) || (isFromSource(sources, AINPUT_SOURCE_MOUSE) && !isFromSource(sources, AINPUT_SOURCE_STYLUS)); } inline void notifyPointerDisplayChange(std::optional<std::tuple<int32_t, FloatPoint>> change, PointerChoreographerPolicyInterface& policy) { if (!change) { Loading @@ -55,6 +67,18 @@ inline void notifyPointerDisplayChange(std::optional<std::tuple<int32_t, FloatPo policy.notifyPointerDisplayIdChanged(displayId, cursorPosition); } void setIconForController(const std::variant<std::unique_ptr<SpriteIcon>, PointerIconStyle>& icon, PointerControllerInterface& controller) { if (std::holds_alternative<std::unique_ptr<SpriteIcon>>(icon)) { if (std::get<std::unique_ptr<SpriteIcon>>(icon) == nullptr) { LOG(FATAL) << "SpriteIcon should not be null"; } controller.setCustomPointerIcon(*std::get<std::unique_ptr<SpriteIcon>>(icon)); } else { controller.updatePointerIcon(std::get<PointerIconStyle>(icon)); } } } // namespace // --- PointerChoreographer --- Loading Loading @@ -107,6 +131,8 @@ NotifyMotionArgs PointerChoreographer::processMotion(const NotifyMotionArgs& arg return processMouseEventLocked(args); } else if (isFromTouchpad(args)) { return processTouchpadEventLocked(args); } else if (isFromDrawingTablet(args)) { processDrawingTabletEventLocked(args); } else if (mStylusPointerIconEnabled && isStylusHoverEvent(args)) { processStylusHoverEventLocked(args); } else if (isFromSource(args.source, AINPUT_SOURCE_TOUCHSCREEN)) { Loading Loading @@ -189,6 +215,36 @@ NotifyMotionArgs PointerChoreographer::processTouchpadEventLocked(const NotifyMo return newArgs; } void PointerChoreographer::processDrawingTabletEventLocked(const android::NotifyMotionArgs& args) { if (args.displayId == ADISPLAY_ID_NONE) { return; } if (args.getPointerCount() != 1) { LOG(WARNING) << "Only drawing tablet events with a single pointer are currently supported: " << args.dump(); } // Use a mouse pointer controller for drawing tablets, or create one if it doesn't exist. auto [it, _] = mDrawingTabletPointersByDevice.try_emplace(args.deviceId, getMouseControllerConstructor( args.displayId)); PointerControllerInterface& pc = *it->second; const float x = args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X); const float y = args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y); pc.setPosition(x, y); if (args.action == AMOTION_EVENT_ACTION_HOVER_EXIT) { // TODO(b/315815559): Do not fade and reset the icon if the hover exit will be followed // immediately by a DOWN event. pc.fade(PointerControllerInterface::Transition::IMMEDIATE); pc.updatePointerIcon(PointerIconStyle::TYPE_NOT_SPECIFIED); } else if (canUnfadeOnDisplay(args.displayId)) { pc.unfade(PointerControllerInterface::Transition::IMMEDIATE); } } /** * When screen is touched, fade the mouse pointer on that display. We only call fade for * ACTION_DOWN events.This would allow both mouse and touch to be used at the same time if the Loading Loading @@ -255,6 +311,8 @@ void PointerChoreographer::processStylusHoverEventLocked(const NotifyMotionArgs& const float y = args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y); pc.setPosition(x, y); if (args.action == AMOTION_EVENT_ACTION_HOVER_EXIT) { // TODO(b/315815559): Do not fade and reset the icon if the hover exit will be followed // immediately by a DOWN event. pc.fade(PointerControllerInterface::Transition::IMMEDIATE); pc.updatePointerIcon(PointerIconStyle::TYPE_NOT_SPECIFIED); } else if (canUnfadeOnDisplay(args.displayId)) { Loading Loading @@ -284,6 +342,7 @@ void PointerChoreographer::processDeviceReset(const NotifyDeviceResetArgs& args) std::scoped_lock _l(mLock); mTouchPointersByDevice.erase(args.deviceId); mStylusPointersByDevice.erase(args.deviceId); mDrawingTabletPointersByDevice.erase(args.deviceId); } void PointerChoreographer::notifyPointerCaptureChanged( Loading Loading @@ -320,6 +379,11 @@ void PointerChoreographer::dump(std::string& dump) { std::string pointerControllerDump = addLinePrefix(stylusPointerController->dump(), INDENT); dump += INDENT + std::to_string(deviceId) + " : " + pointerControllerDump; } dump += INDENT "DrawingTabletControllers:\n"; for (const auto& [deviceId, drawingTabletController] : mDrawingTabletPointersByDevice) { std::string pointerControllerDump = addLinePrefix(drawingTabletController->dump(), INDENT); dump += INDENT + std::to_string(deviceId) + " : " + pointerControllerDump; } dump += "\n"; } Loading Loading @@ -361,13 +425,13 @@ PointerChoreographer::PointerDisplayChange PointerChoreographer::updatePointerCo std::set<int32_t /*displayId*/> mouseDisplaysToKeep; std::set<DeviceId> touchDevicesToKeep; std::set<DeviceId> stylusDevicesToKeep; std::set<DeviceId> drawingTabletDevicesToKeep; // Mark the displayIds or deviceIds of PointerControllers currently needed, and create // new PointerControllers if necessary. for (const auto& info : mInputDeviceInfos) { const uint32_t sources = info.getSources(); if (isFromSource(sources, AINPUT_SOURCE_MOUSE) || isFromSource(sources, AINPUT_SOURCE_MOUSE_RELATIVE)) { if (isMouseOrTouchpad(sources)) { const int32_t displayId = getTargetMouseDisplayLocked(info.getAssociatedDisplayId()); mouseDisplaysToKeep.insert(displayId); // For mice, show the cursor immediately when the device is first connected or Loading @@ -388,6 +452,10 @@ PointerChoreographer::PointerDisplayChange PointerChoreographer::updatePointerCo info.getAssociatedDisplayId() != ADISPLAY_ID_NONE) { stylusDevicesToKeep.insert(info.getId()); } if (isFromSource(sources, AINPUT_SOURCE_STYLUS | AINPUT_SOURCE_MOUSE) && info.getAssociatedDisplayId() != ADISPLAY_ID_NONE) { drawingTabletDevicesToKeep.insert(info.getId()); } } // Remove PointerControllers no longer needed. Loading @@ -400,6 +468,9 @@ PointerChoreographer::PointerDisplayChange PointerChoreographer::updatePointerCo std::erase_if(mStylusPointersByDevice, [&stylusDevicesToKeep](const auto& pair) { return stylusDevicesToKeep.find(pair.first) == stylusDevicesToKeep.end(); }); std::erase_if(mDrawingTabletPointersByDevice, [&drawingTabletDevicesToKeep](const auto& pair) { return drawingTabletDevicesToKeep.find(pair.first) == drawingTabletDevicesToKeep.end(); }); std::erase_if(mMouseDevices, [&](DeviceId id) REQUIRES(mLock) { return std::find_if(mInputDeviceInfos.begin(), mInputDeviceInfos.end(), [id](const auto& info) { return info.getId() == id; }) == Loading Loading @@ -460,6 +531,12 @@ void PointerChoreographer::setDisplayViewports(const std::vector<DisplayViewport stylusPointerController->setDisplayViewport(viewport); } } for (const auto& [deviceId, drawingTabletController] : mDrawingTabletPointersByDevice) { const InputDeviceInfo* info = findInputDeviceLocked(deviceId); if (info && info->getAssociatedDisplayId() == displayId) { drawingTabletController->setDisplayViewport(viewport); } } } mViewports = viewports; pointerDisplayChange = calculatePointerDisplayChangeToNotify(); Loading Loading @@ -533,42 +610,35 @@ bool PointerChoreographer::setPointerIcon( return false; } const uint32_t sources = info->getSources(); const auto stylusPointerIt = mStylusPointersByDevice.find(deviceId); if (isFromSource(sources, AINPUT_SOURCE_STYLUS) && stylusPointerIt != mStylusPointersByDevice.end()) { if (std::holds_alternative<std::unique_ptr<SpriteIcon>>(icon)) { if (std::get<std::unique_ptr<SpriteIcon>>(icon) == nullptr) { LOG(FATAL) << "SpriteIcon should not be null"; if (isFromSource(sources, AINPUT_SOURCE_STYLUS | AINPUT_SOURCE_MOUSE)) { auto it = mDrawingTabletPointersByDevice.find(deviceId); if (it != mDrawingTabletPointersByDevice.end()) { setIconForController(icon, *it->second); return true; } stylusPointerIt->second->setCustomPointerIcon( *std::get<std::unique_ptr<SpriteIcon>>(icon)); } else { stylusPointerIt->second->updatePointerIcon(std::get<PointerIconStyle>(icon)); } } else if (isFromSource(sources, AINPUT_SOURCE_MOUSE)) { if (const auto mousePointerIt = mMousePointersByDisplay.find(displayId); mousePointerIt != mMousePointersByDisplay.end()) { if (std::holds_alternative<std::unique_ptr<SpriteIcon>>(icon)) { if (std::get<std::unique_ptr<SpriteIcon>>(icon) == nullptr) { LOG(FATAL) << "SpriteIcon should not be null"; if (isFromSource(sources, AINPUT_SOURCE_STYLUS)) { auto it = mStylusPointersByDevice.find(deviceId); if (it != mStylusPointersByDevice.end()) { setIconForController(icon, *it->second); return true; } mousePointerIt->second->setCustomPointerIcon( *std::get<std::unique_ptr<SpriteIcon>>(icon)); } else { mousePointerIt->second->updatePointerIcon(std::get<PointerIconStyle>(icon)); } if (isFromSource(sources, AINPUT_SOURCE_MOUSE)) { auto it = mMousePointersByDisplay.find(displayId); if (it != mMousePointersByDisplay.end()) { setIconForController(icon, *it->second); return true; } else { LOG(WARNING) << "No mouse pointer controller found for display " << displayId << ", device " << deviceId << "."; return false; } } else { LOG(WARNING) << "Cannot set pointer icon for display " << displayId << ", device " << deviceId << "."; return false; } return true; LOG(WARNING) << "Cannot set pointer icon for display " << displayId << ", device " << deviceId << "."; return false; } void PointerChoreographer::setPointerIconVisibility(int32_t displayId, bool visible) { Loading
services/inputflinger/PointerChoreographer.h +3 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ private: NotifyMotionArgs processMotion(const NotifyMotionArgs& args); NotifyMotionArgs processMouseEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); NotifyMotionArgs processTouchpadEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processDrawingTabletEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processTouchscreenAndStylusEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processStylusHoverEventLocked(const NotifyMotionArgs& args) REQUIRES(mLock); void processDeviceReset(const NotifyDeviceResetArgs& args); Loading @@ -144,6 +145,8 @@ private: GUARDED_BY(mLock); std::map<DeviceId, std::shared_ptr<PointerControllerInterface>> mStylusPointersByDevice GUARDED_BY(mLock); std::map<DeviceId, std::shared_ptr<PointerControllerInterface>> mDrawingTabletPointersByDevice GUARDED_BY(mLock); int32_t mDefaultMouseDisplayId GUARDED_BY(mLock); int32_t mNotifiedPointerDisplayId GUARDED_BY(mLock); Loading
services/inputflinger/tests/PointerChoreographer_test.cpp +206 −145 File changed.Preview size limit exceeded, changes collapsed. Show changes