|
|
|
@ -24,6 +24,7 @@ import android.net.ParseException;
|
|
|
|
|
import android.net.Uri;
|
|
|
|
|
import android.util.Pair;
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.core.net.MailTo;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
@ -41,8 +42,8 @@ public class IPInfo {
|
|
|
|
|
|
|
|
|
|
private final static int FETCH_TIMEOUT = 15 * 1000; // milliseconds
|
|
|
|
|
|
|
|
|
|
static Pair<String, Organization> getOrganization(Uri uri, Context context) throws IOException, ParseException {
|
|
|
|
|
if ("mailto".equals(uri.getScheme())) {
|
|
|
|
|
static Pair<String, Organization> getOrganization(@NonNull Uri uri, Context context) throws IOException, ParseException {
|
|
|
|
|
if ("mailto".equalsIgnoreCase(uri.getScheme())) {
|
|
|
|
|
MailTo email = MailTo.parse(uri.toString());
|
|
|
|
|
String to = email.getTo();
|
|
|
|
|
if (to == null || !to.contains("@"))
|
|
|
|
|