Files
rr3-apk/decompiled/sources/com/mbridge/msdk/foundation/tools/aq.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

62 lines
1.8 KiB
Java

package com.mbridge.msdk.foundation.tools;
import android.net.Uri;
import android.text.TextUtils;
import android.webkit.URLUtil;
import java.net.URL;
/* loaded from: classes4.dex */
public final class aq {
public static String a(String str) {
try {
return (TextUtils.isEmpty(str) || !URLUtil.isValidUrl(str)) ? "" : new URL(str).getHost();
} catch (Exception e) {
af.b("UriUtil", e.getMessage());
return "";
}
}
public static String b(String str) {
try {
return (TextUtils.isEmpty(str) || !URLUtil.isValidUrl(str)) ? str : new URL(str).getPath();
} catch (Exception e) {
af.b("UriUtil", e.getMessage());
return "";
}
}
public static String a(String str, String str2) {
try {
return (TextUtils.isEmpty(str) || !URLUtil.isValidUrl(str)) ? str : Uri.parse(str).getQueryParameter(str2);
} catch (Exception e) {
af.b("UriUtil", e.getMessage());
return "";
}
}
public static int c(String str) {
try {
if (!TextUtils.isEmpty(str)) {
if (!URLUtil.isValidUrl(str)) {
if (str != null && str.length() > 5 && str.substring(0, 6).equalsIgnoreCase("tcp://")) {
}
}
return Uri.parse(str).getQueryParameterNames().size();
}
} catch (Exception e) {
af.b("UriUtil", e.getMessage());
}
return 0;
}
public static String d(String str) {
try {
Uri parse = Uri.parse(str);
return parse.getScheme() + "://" + parse.getHost() + parse.getPath();
} catch (Exception e) {
af.b("UriUtil", e.getMessage());
return "";
}
}
}