From 9d399fd633433ab2c663b19593b0d1f74684af3c Mon Sep 17 00:00:00 2001 From: jruesga Date: Mon, 15 Oct 2012 02:22:26 +0200 Subject: New action "Execute" The new fso action "Execute" allow execute a shell in the new ExecutionDialog (a console like dialog), that display the ouput, time and exit code of the execution. It's only available for files with EXEC mime/type category. * Added a new method to the async callback to return the exit code to program caller. * CleanUp --- tests/src/com/cyanogenmod/explorer/commands/shell/ExecCommandTest.java | 3 +++ tests/src/com/cyanogenmod/explorer/commands/shell/FindCommandTest.java | 3 +++ .../cyanogenmod/explorer/commands/shell/FolderUsageCommandTest.java | 3 +++ tests/src/com/cyanogenmod/explorer/commands/shell/ReadCommandTest.java | 3 +++ .../src/com/cyanogenmod/explorer/commands/shell/WriteCommandTest.java | 2 ++ 5 files changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/ExecCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/ExecCommandTest.java index 580288f4..bc622620 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/ExecCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/ExecCommandTest.java @@ -89,6 +89,9 @@ public class ExecCommandTest extends AbstractConsoleTest { ExecCommandTest.this.mSync.notify(); } } + public void onAsyncExitCode(int exitCode) { + /**NON BLOCK**/ + } public void onException(Exception cause) { fail(String.valueOf(cause)); } diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/FindCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/FindCommandTest.java index ec24076f..668d7da8 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/FindCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/FindCommandTest.java @@ -82,6 +82,9 @@ public class FindCommandTest extends AbstractConsoleTest { FindCommandTest.this.mSync.notify(); } } + public void onAsyncExitCode(int exitCode) { + /**NON BLOCK**/ + } public void onException(Exception cause) { fail(String.valueOf(cause)); } diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/FolderUsageCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/FolderUsageCommandTest.java index 018fa537..0162f0bf 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/FolderUsageCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/FolderUsageCommandTest.java @@ -84,6 +84,9 @@ public class FolderUsageCommandTest extends AbstractConsoleTest { FolderUsageCommandTest.this.mSync.notify(); } } + public void onAsyncExitCode(int exitCode) { + /**NON BLOCK**/ + } public void onException(Exception cause) { fail(String.valueOf(cause)); } diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/ReadCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/ReadCommandTest.java index bb54aa0f..6d209843 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/ReadCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/ReadCommandTest.java @@ -77,6 +77,9 @@ public class ReadCommandTest extends AbstractConsoleTest { ReadCommandTest.this.mSync.notify(); } } + public void onAsyncExitCode(int exitCode) { + /**NON BLOCK**/ + } public void onException(Exception cause) { fail(String.valueOf(cause)); } diff --git a/tests/src/com/cyanogenmod/explorer/commands/shell/WriteCommandTest.java b/tests/src/com/cyanogenmod/explorer/commands/shell/WriteCommandTest.java index a0626ab9..2a12d8c8 100644 --- a/tests/src/com/cyanogenmod/explorer/commands/shell/WriteCommandTest.java +++ b/tests/src/com/cyanogenmod/explorer/commands/shell/WriteCommandTest.java @@ -63,6 +63,7 @@ public class WriteCommandTest extends AbstractConsoleTest { WRITE_FILE_SMALL, new AsyncResultListener() { public void onAsyncStart() {/**NON BLOCK**/} public void onAsyncEnd(boolean canceled) {/**NON BLOCK**/} + public void onAsyncExitCode(int exitCode) {/**NON BLOCK**/} public void onException(Exception cause) { fail(String.valueOf(cause)); } @@ -94,6 +95,7 @@ public class WriteCommandTest extends AbstractConsoleTest { WRITE_FILE_LARGE, new AsyncResultListener() { public void onAsyncStart() {/**NON BLOCK**/} public void onAsyncEnd(boolean canceled) {/**NON BLOCK**/} + public void onAsyncExitCode(int exitCode) {/**NON BLOCK**/} public void onException(Exception cause) { fail(String.valueOf(cause)); } -- cgit v1.2.3