@@ -72,10 +72,11 @@ public void onReceive(final Context context, final Intent intent) {
7272 String executableExtra = executionCommand .executable = IntentUtils .getStringExtraIfSet (intent , PluginBundleManager .EXTRA_EXECUTABLE , null );
7373 final String arguments_string = bundle .getString (PluginBundleManager .EXTRA_ARGUMENTS );
7474 executionCommand .workingDirectory = IntentUtils .getStringExtraIfSet (intent , PluginBundleManager .EXTRA_WORKDIR , null );
75- executionCommand .inBackground = !(intent .getBooleanExtra (PluginBundleManager .EXTRA_TERMINAL , false ));
75+ executionCommand .runner = intent .getBooleanExtra (PluginBundleManager .EXTRA_TERMINAL , false ) ?
76+ ExecutionCommand .Runner .TERMINAL_SESSION .getName () : ExecutionCommand .Runner .APP_SHELL .getName ();
7677 final boolean waitForResult = bundle .getBoolean (PluginBundleManager .EXTRA_WAIT_FOR_RESULT , true );
7778
78- if (executionCommand .inBackground ) {
79+ if (ExecutionCommand . Runner . APP_SHELL . equalsRunner ( executionCommand .runner ) ) {
7980 executionCommand .stdin = IntentUtils .getStringExtraIfSet (intent , PluginBundleManager .EXTRA_STDIN , null );
8081 executionCommand .backgroundCustomLogLevel = IntentUtils .getIntegerExtraIfSet (intent , PluginBundleManager .EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL , null );
8182 } else {
@@ -189,7 +190,7 @@ public void onReceive(final Context context, final Intent intent) {
189190 executionIntent .putExtra (TERMUX_SERVICE .EXTRA_STDIN , executionCommand .stdin );
190191 executionIntent .putExtra (TERMUX_SERVICE .EXTRA_SESSION_ACTION , executionCommand .sessionAction );
191192 executionIntent .putExtra (TERMUX_SERVICE .EXTRA_BACKGROUND_CUSTOM_LOG_LEVEL , DataUtils .getStringFromInteger (executionCommand .backgroundCustomLogLevel , null ));
192- executionIntent .putExtra (TERMUX_SERVICE .EXTRA_BACKGROUND , executionCommand .inBackground );
193+ executionIntent .putExtra (TERMUX_SERVICE .EXTRA_RUNNER , executionCommand .runner );
193194 executionIntent .putExtra (TERMUX_SERVICE .EXTRA_PLUGIN_API_HELP , context .getString (R .string .plugin_api_help , TermuxConstants .TERMUX_TASKER_GITHUB_REPO_URL ));
194195
195196 // Send execution intent to TERMUX_SERVICE
0 commit comments