鑫垚影视 v20.42版本的 MD5 值为:e3822d25ef47121f1770bb4806abacfe
以下内容为反编译后的 c.java 源代码,内容仅作参考
package e.m.a.h;
import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import com.shuyu.gsyvideoplayer.utils.CommonUtil;
import com.shuyu.gsyvideoplayer.utils.FileUtils;
import e.e.a.i;
import e.e.a.u;
import e.e.a.v.f;
import e.m.a.h.b;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.TrustManager;
import tv.danmaku.ijk.media.player.IMediaPlayer;
public class c implements b, e.e.a.d {
public static int f14476h = 536870912;
public static int f14477i = -1;
private static c f14478j;
private static e.e.a.v.c f14479k;
public i f14480a;
public File f14481b;
public boolean f14482c;
private b.a f14483d;
public d f14484e = new d();
private HostnameVerifier f14485f;
private TrustManager[] f14486g;
public static void b() {
f14479k = null;
}
public static i d(Context context) {
i iVar = g().f14480a;
if (iVar != null) {
return iVar;
}
c g2 = g();
i h2 = g().h(context);
g2.f14480a = h2;
return h2;
}
public static i e(Context context, File file) {
if (file == null) {
return d(context);
}
if (g().f14481b != null && !g().f14481b.getAbsolutePath().equals(file.getAbsolutePath())) {
i iVar = g().f14480a;
if (iVar != null) {
iVar.r();
}
c g2 = g();
i i2 = g().i(context, file);
g2.f14480a = i2;
return i2;
}
i iVar2 = g().f14480a;
if (iVar2 != null) {
return iVar2;
}
c g3 = g();
i i3 = g().i(context, file);
g3.f14480a = i3;
return i3;
}
public static synchronized c g() {
c cVar;
synchronized (c.class) {
if (f14478j == null) {
f14478j = new c();
}
cVar = f14478j;
}
return cVar;
}
public static void j(e.e.a.v.c cVar) {
f14479k = cVar;
}
@Override
public void a(File file, String str, int i2) {
b.a aVar = this.f14483d;
if (aVar != null) {
aVar.a(file, str, i2);
}
}
public HostnameVerifier c() {
return this.f14485f;
}
@Override
public boolean cachePreview(Context context, File file, String str) {
i e2 = e(context.getApplicationContext(), file);
if (e2 != null) {
str = e2.j(str);
}
return !str.startsWith("http");
}
@Override
public void clearCache(Context context, File file, String str) {
if (TextUtils.isEmpty(str)) {
FileUtils.deleteFiles(new File(u.c(context.getApplicationContext()).getAbsolutePath()));
return;
}
f fVar = new f();
?? r1 = f14479k;
if (r1 != 0) {
fVar = r1;
}
String a2 = fVar.a(str);
if (file != null) {
StringBuilder sb = new StringBuilder();
sb.append(file.getAbsolutePath());
String str2 = File.separator;
sb.append(str2);
sb.append(a2);
sb.append(".download");
String sb2 = sb.toString();
String str3 = file.getAbsolutePath() + str2 + a2;
CommonUtil.deleteFile(sb2);
CommonUtil.deleteFile(str3);
return;
}
StringBuilder sb3 = new StringBuilder();
sb3.append(u.c(context.getApplicationContext()).getAbsolutePath());
String str4 = File.separator;
sb3.append(str4);
sb3.append(a2);
sb3.append(".download");
String sb4 = sb3.toString();
String str5 = u.c(context.getApplicationContext()).getAbsolutePath() + str4 + a2;
CommonUtil.deleteFile(sb4);
CommonUtil.deleteFile(str5);
}
@Override
public void doCacheLogic(Context context, IMediaPlayer iMediaPlayer, String str, Map<String, String> map, File file) {
Map<String, String> map2 = d.f14487a;
map2.clear();
if (map != null) {
map2.putAll(map);
}
if (str.startsWith("http") && !str.contains("127.0.0.1") && !str.contains(".m3u8")) {
i e2 = e(context.getApplicationContext(), file);
if (e2 != null) {
String j2 = e2.j(str);
boolean z = !j2.startsWith("http");
this.f14482c = z;
if (!z) {
e2.p(this, str);
}
str = j2;
}
} else if (!str.startsWith("http") && !str.startsWith("rtmp") && !str.startsWith("rtsp") && !str.contains(".m3u8")) {
this.f14482c = true;
}
try {
iMediaPlayer.setDataSource(context, Uri.parse(str), map);
} catch (IOException e3) {
e3.printStackTrace();
}
}
public TrustManager[] f() {
return this.f14486g;
}
public i h(Context context) {
i.b g2 = new i.b(context.getApplicationContext()).g(this.f14484e);
int i2 = f14477i;
if (i2 > 0) {
g2.i(i2);
} else {
g2.j(f14476h);
}
g2.h(this.f14485f);
g2.k(this.f14486g);
return g2.b();
}
@Override
public boolean hadCached() {
return this.f14482c;
}
public i i(Context context, File file) {
if (!file.exists()) {
file.mkdirs();
}
i.b bVar = new i.b(context);
bVar.d(file);
int i2 = f14477i;
if (i2 > 0) {
bVar.i(i2);
} else {
bVar.j(f14476h);
}
bVar.g(this.f14484e);
bVar.h(this.f14485f);
bVar.k(this.f14486g);
e.e.a.v.c cVar = f14479k;
if (cVar != null) {
bVar.f(cVar);
}
this.f14481b = file;
return bVar.b();
}
public void k(HostnameVerifier hostnameVerifier) {
this.f14485f = hostnameVerifier;
}
public void l(i iVar) {
this.f14480a = iVar;
}
public void m(TrustManager[] trustManagerArr) {
this.f14486g = trustManagerArr;
}
@Override
public void release() {
i iVar = this.f14480a;
if (iVar != null) {
try {
iVar.u(this);
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
@Override
public void setCacheAvailableListener(b.a aVar) {
this.f14483d = aVar;
}
}