MCPcopy Create free account
hub / github.com/zai-org/Open-AutoGLM / _handle_double_tap

Method _handle_double_tap

phone_agent/actions/handler.py:202–211  ·  view source on GitHub ↗

Handle double tap action.

(self, action: dict, width: int, height: int)

Source from the content-addressed store, hash-verified

200 return ActionResult(True, False)
201
202 def _handle_double_tap(self, action: dict, width: int, height: int) -> ActionResult:
203 """Handle double tap action."""
204 element = action.get("element")
205 if not element:
206 return ActionResult(False, False, "No element coordinates")
207
208 x, y = self._convert_relative_to_absolute(element, width, height)
209 device_factory = get_device_factory()
210 device_factory.double_tap(x, y, self.device_id)
211 return ActionResult(True, False)
212
213 def _handle_long_press(self, action: dict, width: int, height: int) -> ActionResult:
214 """Handle long press action."""

Callers

nothing calls this directly

Calls 4

get_device_factoryFunction · 0.90
double_tapMethod · 0.80
ActionResultClass · 0.70

Tested by

no test coverage detected