mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-15 05:21:13 +01:00
Update TermuxConstants
The `TermuxConstants` classes has been updated to `v0.6.0`. Check its Changelog sections for info on changes.
This commit is contained in:
parent
9e82561804
commit
2e7fd480f4
2 changed files with 11 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ import android.annotation.SuppressLint;
|
|||
import java.io.File;
|
||||
|
||||
/*
|
||||
* Version: v0.5.0
|
||||
* Version: v0.6.0
|
||||
*
|
||||
* Changelog
|
||||
*
|
||||
|
|
@ -42,7 +42,10 @@ import java.io.File;
|
|||
* `TERMUX_WIDGET_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION`.
|
||||
*
|
||||
* - 0.5.0 (2021-03-16)
|
||||
* - Renamed "Termux Plugin app" to "Termux Tasker app"
|
||||
* - Renamed "Termux Plugin app" labels to "Termux Tasker app"
|
||||
*
|
||||
* - 0.6.0 (2021-03-16)
|
||||
* - Added `TERMUX_FILE_SHARE_URI_AUTHORITY`
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -332,9 +335,13 @@ public final class TermuxConstants {
|
|||
/* Default value for {@link #PROP_ALLOW_EXTERNAL_APPS} */
|
||||
public static final String PROP_DEFAULT_VALUE_ALLOW_EXTERNAL_APPS = "false"; // Default: "false"
|
||||
|
||||
|
||||
/* The broadcast action sent when Termux App opens */
|
||||
public static final String BROADCAST_TERMUX_OPENED = TERMUX_PACKAGE_NAME + ".app.OPENED";
|
||||
|
||||
/* The Uri authority for Termux app file shares */
|
||||
public static final String TERMUX_FILE_SHARE_URI_AUTHORITY = TERMUX_PACKAGE_NAME + ".files"; // Default: "com.termux.files"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class TermuxOpenReceiver extends BroadcastReceiver {
|
|||
contentTypeToUse = contentTypeExtra;
|
||||
}
|
||||
|
||||
Uri uriToShare = Uri.parse("content://com.termux.files" + fileToShare.getAbsolutePath());
|
||||
Uri uriToShare = Uri.parse("content://" + TermuxConstants.TERMUX_FILE_SHARE_URI_AUTHORITY + fileToShare.getAbsolutePath());
|
||||
|
||||
if (Intent.ACTION_SEND.equals(intentAction)) {
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, uriToShare);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue