| 447 | } |
| 448 | |
| 449 | private void stopProcess(String pid, CallbackContext callbackContext) { |
| 450 | Message msg = Message.obtain(null, TerminalService.MSG_STOP_PROCESS); |
| 451 | Bundle bundle = new Bundle(); |
| 452 | bundle.putString("id", pid); |
| 453 | msg.setData(bundle); |
| 454 | try { |
| 455 | serviceMessenger.send(msg); |
| 456 | callbackContext.success("Process terminated"); |
| 457 | } catch (RemoteException e) { |
| 458 | callbackContext.error("Stop error: " + e.getMessage()); |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | private void isProcessRunning(String pid) { |
| 463 | Message msg = Message.obtain(null, TerminalService.MSG_IS_RUNNING); |