diff options
| author | Jorge Ruesga <jorge@ruesga.com> | 2013-01-13 21:14:12 +0100 |
|---|---|---|
| committer | Jorge Ruesga <jorge@ruesga.com> | 2013-01-13 21:14:12 +0100 |
| commit | 37b5b48a032366c5e4d647c0fb916f516d14c07f (patch) | |
| tree | 334fa8085456b5f76ae845eec80d2c62e67a2c79 /src/com/cyanogenmod/filemanager/commands/shell/Program.java | |
| parent | 0eb0a64d07c5a7e5cea683a8b8ee9b522f11443b (diff) | |
CMFM: Wait indefinitely on privileged console allocation
Wait indefinitely if a privileged console is being allocated. Wait for
the user response to SuperUser or SuperSu prompt (or whatever it is).
Change ShellConsole.this access to a private variable in methods of ShellConsole
Change-Id: I6752fe8bcd0de3aa6478ad97fb84c9ac8697a970
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src/com/cyanogenmod/filemanager/commands/shell/Program.java')
| -rw-r--r-- | src/com/cyanogenmod/filemanager/commands/shell/Program.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/filemanager/commands/shell/Program.java b/src/com/cyanogenmod/filemanager/commands/shell/Program.java index ae811c0..1bcc5db 100644 --- a/src/com/cyanogenmod/filemanager/commands/shell/Program.java +++ b/src/com/cyanogenmod/filemanager/commands/shell/Program.java @@ -57,6 +57,10 @@ public abstract class Program extends Command implements Executable { // The listener for the program private ProgramListener mProgramListener; + // Indicate if the program expect some output to stderr. If something is received + // in the stderr the program should be killed + private boolean mExitOnStdErrOutput; + /** * @Constructor of <code>Program</code> * @@ -67,6 +71,7 @@ public abstract class Program extends Command implements Executable { */ public Program(String id, String... args) throws InvalidCommandDefinitionException { super(id, args); + this.mExitOnStdErrOutput = false; } /** @@ -81,6 +86,7 @@ public abstract class Program extends Command implements Executable { public Program(String id, boolean prepare, String... args) throws InvalidCommandDefinitionException { super(id, prepare, args); + this.mExitOnStdErrOutput = false; } /** @@ -102,6 +108,26 @@ public abstract class Program extends Command implements Executable { } /** + * Method that returns if the program should be killed if some output is received in + * the standard error buffer. + * + * @return boolean If the program should be killed + */ + public boolean isExitOnStdErrOutput() { + return this.mExitOnStdErrOutput; + } + + /** + * Method that sets if the program should be killed if some output is received in + * the standard error buffer. + * + * @param exitOnStdErrOutput If the program should be killed + */ + public void setExitOnStdErrOutput(boolean exitOnStdErrOutput) { + this.mExitOnStdErrOutput = exitOnStdErrOutput; + } + + /** * Method that returns if the standard error must be * ignored safely by the shell, and don't check for errors * like <code>NoSuchFileOrDirectory</code> or |
