public void executeCommand(String shellCmd){
  if (mThread != null && mThread.isAlive()) {
    mShellThread.stop();
    mResults=new StringBuilder();
  }
  mCurrentCommand=shellCmd;
  mShellThread=new ShellThread();
  mThread=new Thread(mShellThread);
  mThread.start();
}

public void executeCommand ( String shellCmd ) { if ( mThread != null && mThread . isAlive ( ) ) { mShellThread . stop ( ) ; mResults = new StringBuilder ( ) ; } mCurrentCommand = shellCmd ; mShellThread = new ShellThread ( ) ; mThread = new Thread ( mShellThread ) ; mThread . start ( ) ; }
executes a given command , if the previous command is still running , it ' s thread will be stopped .
