mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-24 03:09:43 +01:00
Fixed: Fix tests added in b84dc703
This commit is contained in:
parent
49018f6d91
commit
c09d867b94
1 changed files with 2 additions and 0 deletions
|
|
@ -46,6 +46,8 @@ public class TermuxFileReceiverActivity extends Activity {
|
||||||
private static final String LOG_TAG = "TermuxFileReceiverActivity";
|
private static final String LOG_TAG = "TermuxFileReceiverActivity";
|
||||||
|
|
||||||
static boolean isSharedTextAnUrl(String sharedText) {
|
static boolean isSharedTextAnUrl(String sharedText) {
|
||||||
|
if (sharedText == null || sharedText.isEmpty()) return false;
|
||||||
|
|
||||||
return Patterns.WEB_URL.matcher(sharedText).matches()
|
return Patterns.WEB_URL.matcher(sharedText).matches()
|
||||||
|| Pattern.matches("magnet:\\?xt=urn:btih:.*?", sharedText);
|
|| Pattern.matches("magnet:\\?xt=urn:btih:.*?", sharedText);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue