1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 10:19:33 +02:00

better book network integration

This commit is contained in:
Nikolay Pultsin 2015-03-27 18:48:11 +00:00
parent 7ee92ff51f
commit 423cd5eed4
35 changed files with 126 additions and 17 deletions

View file

@ -99,6 +99,14 @@ public abstract class Util implements UserRegistrationConstants {
activity.startActivity(intent);
}
public static boolean isOurLink(String url) {
try {
return Uri.parse(url).getHost().endsWith(".fbreader.org");
} catch (Throwable t) {
return false;
}
}
public static void openInBrowser(Activity activity, String url) {
if (url != null) {
url = NetworkLibrary.Instance().rewriteUrl(url, true);