aboutsummaryrefslogtreecommitdiff
path: root/src/com/cyanogenmod/filemanager/commands/java/Program.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/filemanager/commands/java/Program.java')
-rw-r--r--src/com/cyanogenmod/filemanager/commands/java/Program.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/filemanager/commands/java/Program.java b/src/com/cyanogenmod/filemanager/commands/java/Program.java
index b5eeebd..34e70cc 100644
--- a/src/com/cyanogenmod/filemanager/commands/java/Program.java
+++ b/src/com/cyanogenmod/filemanager/commands/java/Program.java
@@ -17,6 +17,7 @@
package com.cyanogenmod.filemanager.commands.java;
import com.cyanogenmod.filemanager.commands.Executable;
+import com.cyanogenmod.filemanager.console.CancelledOperationException;
import com.cyanogenmod.filemanager.console.ExecutionException;
import com.cyanogenmod.filemanager.console.InsufficientPermissionsException;
import com.cyanogenmod.filemanager.console.NoSuchFileOrDirectory;
@@ -29,6 +30,7 @@ public abstract class Program implements Executable {
private boolean mTrace;
private int mBufferSize;
+ private boolean mCancelled = false;
/**
* Constructor of <code>Program</code>
@@ -92,6 +94,14 @@ public abstract class Program implements Executable {
* @throws ExecutionException If the operation returns a invalid exit code
*/
public abstract void execute()
- throws InsufficientPermissionsException, NoSuchFileOrDirectory, ExecutionException;
+ throws InsufficientPermissionsException, NoSuchFileOrDirectory, ExecutionException,
+ CancelledOperationException;
+ public void requestCancel() {
+ mCancelled = true;
+ }
+
+ public boolean isCancelled() {
+ return mCancelled;
+ }
}