Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37b5b48a authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

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: default avatarJorge Ruesga <jorge@ruesga.com>
parent 0eb0a64d
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -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;
    }

    /**
@@ -101,6 +107,26 @@ public abstract class Program extends Command implements Executable {
        this.mProgramListener = programListener;
    }

    /**
     * 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
+120 −83

File changed.

Preview size limit exceeded, changes collapsed.