- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
82 lines
2.3 KiB
Java
82 lines
2.3 KiB
Java
package com.mbridge.msdk.videocommon.download;
|
|
|
|
import android.net.Uri;
|
|
import android.text.TextUtils;
|
|
import android.util.Patterns;
|
|
import android.webkit.URLUtil;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.videocommon.download.e;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
import java.util.concurrent.ConcurrentMap;
|
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class d {
|
|
private static d c;
|
|
private CopyOnWriteArrayList<String> a;
|
|
private ConcurrentMap<String, Object> b;
|
|
private g d;
|
|
private e e;
|
|
private boolean f;
|
|
private final String g = CampaignEx.JSON_KEY_LOCAL_REQUEST_ID;
|
|
private final String h = "down_type";
|
|
|
|
private d() {
|
|
this.f = false;
|
|
try {
|
|
this.d = g.a();
|
|
this.e = e.a.a;
|
|
this.a = new CopyOnWriteArrayList<>();
|
|
this.b = new ConcurrentHashMap();
|
|
com.mbridge.msdk.c.g b = com.mbridge.msdk.c.h.a().b(com.mbridge.msdk.foundation.controller.c.m().k());
|
|
if (b != null) {
|
|
this.f = b.z(1);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("H5DownLoadManager", th.getMessage(), th);
|
|
}
|
|
}
|
|
|
|
public static synchronized d a() {
|
|
d dVar;
|
|
synchronized (d.class) {
|
|
try {
|
|
if (c == null) {
|
|
c = new d();
|
|
}
|
|
dVar = c;
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
return dVar;
|
|
}
|
|
|
|
public final String a(String str) {
|
|
try {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
if (!Patterns.WEB_URL.matcher(str).matches()) {
|
|
if (URLUtil.isValidUrl(str)) {
|
|
}
|
|
return str;
|
|
}
|
|
Uri parse = Uri.parse(str);
|
|
String path = parse.getPath();
|
|
if (TextUtils.isEmpty(path) || !TextUtils.isEmpty(parse.getQueryParameter("urlDebug"))) {
|
|
return str;
|
|
}
|
|
if (!path.toLowerCase().endsWith(".zip")) {
|
|
e eVar = this.e;
|
|
return eVar != null ? eVar.a(str) : str;
|
|
}
|
|
g gVar = this.d;
|
|
if (gVar != null) {
|
|
return gVar.a(str);
|
|
}
|
|
return null;
|
|
}
|
|
}
|