Skip to content

Commit

Permalink
Shell & AT Command Fragment Tweaks
Browse files Browse the repository at this point in the history
Small tweaks to the shell system and AT Command fragment.
  • Loading branch information
xLaMbChOpSx committed Jun 30, 2014
1 parent 90d5cfb commit 3f9d8e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ public void onClick(View v) {
if (mAtCommand.getText() != null) {
String command = mAtCommand.getText().toString();
if (command.indexOf("AT") == 0 || command.indexOf("at") == 0) {
Log.i("AIMSICD", "AT Command Detected");
mShell = new Shell(mSerialDevice);
new MyAsync().execute(EXECUTE_AT);
} else {
Log.i("AIMSICD", "Terminal Command Detected");
mShell = new Shell();
new MyAsync().execute(EXECUTE_COMMAND);
}
}
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/SecUpwN/AIMSICD/utils/Shell.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public Shell() {
openRootShell(true);
}

public Shell(String serialDevice) {
openRootShell(true);
setSerialDevice(serialDevice);
}

public List<String> GetStdOut() {
if (mShellStdOut == null) {
return null;
Expand Down

0 comments on commit 3f9d8e0

Please sign in to comment.