(String execId, String cmd, String alpine)
| 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); |
no test coverage detected