mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Use TermuxConstants for getting urls instead of using hardcoded strings
This commit is contained in:
@@ -301,7 +301,7 @@ public class RunCommandService extends Service {
|
||||
runStartForeground();
|
||||
|
||||
ExecutionCommand executionCommand = new ExecutionCommand();
|
||||
executionCommand.pluginAPIHelp = this.getString(R.string.error_run_command_service_api_help);
|
||||
executionCommand.pluginAPIHelp = this.getString(R.string.error_run_command_service_api_help, TermuxConstants.TERMUX_GITHUB_REPO_URL);
|
||||
|
||||
String errmsg;
|
||||
|
||||
|
@@ -584,7 +584,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
||||
// The startActivity() call is not documented to throw IllegalArgumentException.
|
||||
// However, crash reporting shows that it sometimes does, so catch it here.
|
||||
new AlertDialog.Builder(this).setMessage(getString(R.string.error_styling_not_installed))
|
||||
.setPositiveButton(R.string.action_styling_install, (dialog, which) -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://f-droid.org/en/packages/" + TermuxConstants.TERMUX_STYLING_PACKAGE_NAME + " /")))).setNegativeButton(android.R.string.cancel, null).show();
|
||||
.setPositiveButton(R.string.action_styling_install, (dialog, which) -> startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(TermuxConstants.TERMUX_STYLING_FDROID_PACKAGE_URL)))).setNegativeButton(android.R.string.cancel, null).show();
|
||||
}
|
||||
}
|
||||
private void toggleKeepScreenOn() {
|
||||
|
@@ -89,7 +89,7 @@
|
||||
<string name="error_run_command_service_invalid_intent_action">Invalid intent action to RunCommandService: `%1$s`</string>
|
||||
<string name="error_run_command_service_mandatory_extra_missing">Mandatory extra missing to RunCommandService: \"%1$s\"</string>
|
||||
<string name="error_run_command_service_allow_external_apps_ungranted">RunCommandService require `allow-external-apps` property to be set to `true` in `&TERMUX_PROPERTIES_PRIMARY_PATH_SHORT;` file.</string>
|
||||
<string name="error_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="error_run_command_service_api_help">Visit %1$s/blob/master/app/src/main/java/com/termux/app/RunCommandService.java for more info on RUN_COMMAND Intent usage.</string>
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user