Fully integrate ExectionCommand into RunCommandService

Users will now also be shown flashes and notifications in addition to log entries for missing allow-external-apps permission or for invalid extras passed like the executable. The flashes and notifications can be controlled with the Termux Settings -> Debugging -> Plugin Error Notifications toggle
This commit is contained in:
agnostic-apollo
2021-03-24 03:56:25 +05:00
parent ef1ab197b6
commit 31371b5e3d
5 changed files with 251 additions and 137 deletions

View File

@@ -0,0 +1,37 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<!--
Updated notification icon compliant with system icons guidelines
https://material.io/design/iconography/system-icons.html
-->
<group>
<clip-path
android:pathData="M0,0h24v24h-24z"/>
<path
android:pathData="M5,4H2L8,12L2,20H5L11,12L5,4Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M19.59,14
l-2.09,2.09
L15.41,14
L14,15.41
l2.09,2.09
L14,19.59
L15.41,21
l2.09,-2.08
L19.59,21
L21,19.59
l-2.08,-2.09
L21,15.41
L19.59,14
z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -16,7 +16,8 @@
<string name="application_name">&TERMUX_APP_NAME;</string>
<string name="shared_user_label">&TERMUX_APP_NAME; user</string>
<string name="run_command_permission_label">Run commands in &TERMUX_APP_NAME; environment</string>
<string name="run_command_permission_description">execute arbitrary commands within &TERMUX_APP_NAME; environment</string>
<string name="run_command_permission_description">execute arbitrary commands within &TERMUX_APP_NAME;
environment</string>
<string name="new_session">New session</string>
<string name="new_session_failsafe">Failsafe</string>
<string name="toggle_soft_keyboard">Keyboard</string>
@@ -85,9 +86,10 @@
<string name="validate_file_existence_and_permissions_failed_with_exception">Validating file existence and permissions fafiled: \"%1$s\"\nException: %2$s</string>
<string name="validate_directory_existence_and_permissions_failed_with_exception">Validating directory existence and permissions fafiled: \"%1$s\"\nException: %2$s</string>
<string name="run_command_service_invalid_action">Invalid intent action to RunCommandService: \"%1$s\"</string>
<string name="run_command_service_invalid_command_path">Invalid coommand path to RunCommandService: \"%1$s\"</string>
<string name="run_command_service_allow_external_apps_ungranted_warning">RunCommandService require allow-external-apps property to be set to \"true\" in &TERMUX_PROPERTIES_PRIMARY_PATH_SHORT; file.</string>
<string name="run_command_service_invalid_action">Invalid intent action to RunCommandService: `%1$s`</string>
<string name="run_command_service_invalid_command_path">Invalid coommand path to RunCommandService: `%1$s`</string>
<string name="run_command_service_allow_external_apps_ungranted_warning">RunCommandService require `allow-external-apps` property to be set to `true` in `&TERMUX_PROPERTIES_PRIMARY_PATH_SHORT;` file.</string>
<string name="run_command_service_api_help">Visit https://github.com/termux/termux-app/blob/master/app/src/main/java/com/termux/app/RunCommandService.java for more info on RUN_COMMAND Intent usage.</string>
<string name="share">Share</string>
<string name="share_with">Share With</string>