MCPcopy
hub / github.com/zai-org/Open-AutoGLM / _handle_launch

Method _handle_launch

phone_agent/actions/handler.py:118–128  ·  view source on GitHub ↗

Handle app launch action.

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

Source from the content-addressed store, hash-verified

116 return x, y
117
118 def _handle_launch(self, action: dict, width: int, height: int) -> ActionResult:
119 """Handle app launch action."""
120 app_name = action.get("app")
121 if not app_name:
122 return ActionResult(False, False, "No app name specified")
123
124 device_factory = get_device_factory()
125 success = device_factory.launch_app(app_name, self.device_id)
126 if success:
127 return ActionResult(True, False)
128 return ActionResult(False, False, f"App not found: {app_name}")
129
130 def _handle_tap(self, action: dict, width: int, height: int) -> ActionResult:
131 """Handle tap action."""

Callers

nothing calls this directly

Calls 3

get_device_factoryFunction · 0.90
launch_appMethod · 0.80
ActionResultClass · 0.70

Tested by

no test coverage detected