MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / exec

Method exec

src/plugins/terminal/src/android/Executor.java:416–433  ·  view source on GitHub ↗
(String execId, String cmd, String alpine)

Source from the content-addressed store, hash-verified

414 }
415
416 private void exec(String execId, String cmd, String alpine) {
417 Message msg = Message.obtain(null, TerminalService.MSG_EXEC);
418 msg.replyTo = handlerMessenger;
419 Bundle bundle = new Bundle();
420 bundle.putString("id", execId);
421 bundle.putString("cmd", cmd);
422 bundle.putString("alpine", alpine);
423 msg.setData(bundle);
424 try {
425 serviceMessenger.send(msg);
426 } catch (RemoteException e) {
427 CallbackContext callbackContext = getCallbackContext(execId);
428 if (callbackContext != null) {
429 callbackContext.error("Failed to execute command: " + e.getMessage());
430 cleanupCallback(execId);
431 }
432 }
433 }
434
435 private void writeToProcess(String pid, String input, CallbackContext callbackContext) {
436 Message msg = Message.obtain(null, TerminalService.MSG_WRITE_TO_PROCESS);

Callers 1

executeMethod · 0.95

Calls 5

getCallbackContextMethod · 0.95
cleanupCallbackMethod · 0.95
setDataMethod · 0.80
sendMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected