Changed: All ExecutionCommands not managed by TermuxShellManager should have id -1

This commit is contained in:
agnostic-apollo
2022-06-11 19:25:45 +05:00
parent 2998558e9f
commit 29d05cc72c
3 changed files with 5 additions and 4 deletions

View File

@@ -140,7 +140,8 @@ public class ExecutionCommand {
} }
/** The optional unique id for the {@link ExecutionCommand}. */ /** The optional unique id for the {@link ExecutionCommand}. This should equal -1 if execution
* command is not going to be managed by a shell manager. */
public Integer id; public Integer id;
/** The process id of command. */ /** The process id of command. */

View File

@@ -592,7 +592,7 @@ public class TermuxUtils {
aptInfoScript = aptInfoScript.replaceAll(Pattern.quote("@TERMUX_PREFIX@"), TermuxConstants.TERMUX_PREFIX_DIR_PATH); aptInfoScript = aptInfoScript.replaceAll(Pattern.quote("@TERMUX_PREFIX@"), TermuxConstants.TERMUX_PREFIX_DIR_PATH);
ExecutionCommand executionCommand = new ExecutionCommand(1, ExecutionCommand executionCommand = new ExecutionCommand(-1,
TermuxConstants.TERMUX_BIN_PREFIX_DIR_PATH + "/bash", null, aptInfoScript, TermuxConstants.TERMUX_BIN_PREFIX_DIR_PATH + "/bash", null, aptInfoScript,
null, ExecutionCommand.Runner.APP_SHELL.getName(), false); null, ExecutionCommand.Runner.APP_SHELL.getName(), false);
executionCommand.commandLabel = "APT Info Command"; executionCommand.commandLabel = "APT Info Command";
@@ -652,7 +652,7 @@ public class TermuxUtils {
// Run script // Run script
// Logging must be disabled for output of logcat command itself in StreamGobbler // Logging must be disabled for output of logcat command itself in StreamGobbler
ExecutionCommand executionCommand = new ExecutionCommand(1, "/system/bin/sh", ExecutionCommand executionCommand = new ExecutionCommand(-1, "/system/bin/sh",
null, logcatScript + "\n", "/", ExecutionCommand.Runner.APP_SHELL.getName(), true); null, logcatScript + "\n", "/", ExecutionCommand.Runner.APP_SHELL.getName(), true);
executionCommand.commandLabel = "Logcat dump command"; executionCommand.commandLabel = "Logcat dump command";
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF; executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;

View File

@@ -360,7 +360,7 @@ public class TermuxFileUtils {
.append("/system/bin/grep -E '( /data )|( /data/data )|( /data/user/[0-9]+ )' /proc/self/mountinfo 2>&1 | /system/bin/grep -v '/data_mirror' 2>&1"); .append("/system/bin/grep -E '( /data )|( /data/data )|( /data/user/[0-9]+ )' /proc/self/mountinfo 2>&1 | /system/bin/grep -v '/data_mirror' 2>&1");
// Run script // Run script
ExecutionCommand executionCommand = new ExecutionCommand(1, "/system/bin/sh", null, ExecutionCommand executionCommand = new ExecutionCommand(-1, "/system/bin/sh", null,
statScript.toString() + "\n", "/", ExecutionCommand.Runner.APP_SHELL.getName(), true); statScript.toString() + "\n", "/", ExecutionCommand.Runner.APP_SHELL.getName(), true);
executionCommand.commandLabel = TermuxConstants.TERMUX_APP_NAME + " Files Stat Command"; executionCommand.commandLabel = TermuxConstants.TERMUX_APP_NAME + " Files Stat Command";
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF; executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;