Added: Log intents received by and

This commit is contained in:
agnostic-apollo 2022-03-30 19:42:38 +05:00
parent caa13b7047
commit 87a79a9b24
2 changed files with 7 additions and 1 deletions

View File

@ -63,6 +63,8 @@ public class RunCommandService extends Service {
// Run again in case service is already started and onCreate() is not called
runStartForeground();
Logger.logVerboseExtended(LOG_TAG, "Intent Received:\n" + IntentUtils.getIntentString(intent));
ExecutionCommand executionCommand = new ExecutionCommand();
executionCommand.pluginAPIHelp = this.getString(R.string.error_run_command_service_api_help, RUN_COMMAND_SERVICE.RUN_COMMAND_API_HELP_URL);

View File

@ -136,7 +136,11 @@ public final class TermuxService extends Service implements AppShell.AppShellCli
// Run again in case service is already started and onCreate() is not called
runStartForeground();
String action = intent.getAction();
String action = null;
if (intent != null) {
Logger.logVerboseExtended(LOG_TAG, "Intent Received:\n" + IntentUtils.getIntentString(intent));
action = intent.getAction();
}
if (action != null) {
switch (action) {