Open Benjamin-Loison opened 2 months ago
Nothing seems clearly wrong, it might be subtle.
Could experimentally check that app/src/main/java/com/termux/api/apis/JobSchedulerAPI.java
is not involved in the issue.
git reset --hard 3bea194249586a7dcb143e66b46c1694cb6ca21a
results in having the issue but
git checkout HEAD~ app/src/main/java/com/termux/api/apis/NotificationAPI.java
and adding back import java.util.Arrays;
solves the issue.
So the issue seems app/src/main/java/com/termux/api/apis/NotificationAPI.java
specific.
Only last hunk of app/src/main/java/com/termux/api/apis/NotificationAPI.java
seems to blame.
new String[]{"-c", action}
is used in both.
Let us compare:
Intent executeIntent = new Intent(ACTION_EXECUTE, executeUri);
and
Intent executionIntent = new Intent(TERMUX_SERVICE.ACTION_SERVICE_EXECUTE, executionCommand.executableUri);
private static final String ACTION_EXECUTE = "com.termux.service_execute";
So about the first argument, both are identical.
private static final String EXTRA_EXECUTE_IN_BACKGROUND = "com.termux.execute.background";
so both are identical.
private static final String TERMUX_SERVICE = "com.termux.app.TermuxService";
so both are identical.
So what is unclearly different:
executionIntent.putExtra(TERMUX_SERVICE.EXTRA_RUNNER, executionCommand.runner);
executionIntent
second constructor argument.
Uri scriptUri = new Uri.Builder().scheme("com.termux.file").path(filePath).build();
Intent executeIntent = new Intent(ACTION_EXECUTE, scriptUri);
ExecutionCommand executionCommand = new ExecutionCommand();
executionCommand.executableUri = new Uri.Builder().scheme(TERMUX_SERVICE.URI_SCHEME_SERVICE_EXECUTE).path(filePath).build();
executionCommand.runner = ExecutionCommand.Runner.APP_SHELL.getName();
In fact I was focusing by mistake on JobSchedulerAPI.java
.
.appendQueryParameter("arguments", Arrays.toString(arguments))
Except runner only the above seems to differ.
git diff app/src/main/java/com/termux/api/apis/NotificationAPI.java
seems to solve the regression.
Let us try it on the latest commit.
git diff
solves the issue on the last commit it seems:
git log | head -n 5
Have the same issue with button2
? At least not with my patch.
ترمكس
اوامر اختراق wi fi
@GokerAnonymous Write in English.
termux-app termux-app/actions/runs/11146787425/job/30979551872
shows how ridiculous it is to distinguish connected from not connected users even if they do not have permissions.
See Benjamin_Loison/Food/issues/43.
+5
Problem description
Steps to reproduce
Expected behavior
Additional information