mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 11:09:49 +08:00
@@ -21,6 +21,7 @@ import android.widget.Toast;
|
||||
|
||||
import com.termux.R;
|
||||
import com.termux.app.TermuxActivity;
|
||||
import com.termux.shared.data.UrlUtils;
|
||||
import com.termux.shared.shell.ShellUtils;
|
||||
import com.termux.shared.terminal.TermuxTerminalViewClientBase;
|
||||
import com.termux.shared.termux.TermuxConstants;
|
||||
@@ -603,7 +604,7 @@ public class TermuxTerminalViewClient extends TermuxTerminalViewClientBase {
|
||||
|
||||
String text = ShellUtils.getTerminalSessionTranscriptText(session, true, true);
|
||||
|
||||
LinkedHashSet<CharSequence> urlSet = DataUtils.extractUrls(text);
|
||||
LinkedHashSet<CharSequence> urlSet = UrlUtils.extractUrls(text);
|
||||
if (urlSet.isEmpty()) {
|
||||
new AlertDialog.Builder(mActivity).setMessage(R.string.title_select_url_none_found).show();
|
||||
return;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package com.termux.app;
|
||||
|
||||
import com.termux.shared.data.DataUtils;
|
||||
import com.termux.shared.data.UrlUtils;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@@ -13,7 +13,7 @@ public class TermuxActivityTest {
|
||||
private void assertUrlsAre(String text, String... urls) {
|
||||
LinkedHashSet<String> expected = new LinkedHashSet<>();
|
||||
Collections.addAll(expected, urls);
|
||||
Assert.assertEquals(expected, DataUtils.extractUrls(text));
|
||||
Assert.assertEquals(expected, UrlUtils.extractUrls(text));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user