mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Fixed: Fix tests added in b84dc703
This commit is contained in:
parent
b84dc703e8
commit
fb01127ff2
1 changed files with 2 additions and 0 deletions
|
|
@ -55,6 +55,8 @@ public class FileReceiverActivity extends AppCompatActivity {
|
||||||
private static final String LOG_TAG = "FileReceiverActivity";
|
private static final String LOG_TAG = "FileReceiverActivity";
|
||||||
|
|
||||||
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