超媒网络 v3.0.0版本的 MD5 值为:e72248abb238993f421967424d9a9515
以下内容为反编译后的 n82.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
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 com.shuyu.gsyvideoplayer.utils.StorageUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import p.a.y.e.a.s.e.net.m82;
import p.a.y.e.a.s.e.net.rm;
import tv.danmaku.ijk.media.player.IMediaPlayer;
public class n82 implements m82, mm {
private static n82 lite_extends;
private m82.a lite_boolean;
public o82 lite_default = new o82();
public rm lite_static;
public File lite_switch;
public boolean lite_throws;
public static rm lite_for(Context context, File file) {
if (file == null) {
return lite_if(context);
}
if (lite_int().lite_switch != null && !lite_int().lite_switch.getAbsolutePath().equals(file.getAbsolutePath())) {
rm rmVar = lite_int().lite_static;
if (rmVar != null) {
rmVar.lite_const();
}
n82 lite_int = lite_int();
rm lite_try = lite_int().lite_try(context, file);
lite_int.lite_static = lite_try;
return lite_try;
}
rm rmVar2 = lite_int().lite_static;
if (rmVar2 == null) {
n82 lite_int2 = lite_int();
rm lite_try2 = lite_int().lite_try(context, file);
lite_int2.lite_static = lite_try2;
return lite_try2;
}
return rmVar2;
}
public static rm lite_if(Context context) {
rm rmVar = lite_int().lite_static;
if (rmVar == null) {
n82 lite_int = lite_int();
rm lite_new = lite_int().lite_new(context);
lite_int.lite_static = lite_new;
return lite_new;
}
return rmVar;
}
public static synchronized n82 lite_int() {
n82 n82Var;
synchronized (n82.class) {
if (lite_extends == null) {
lite_extends = new n82();
}
n82Var = lite_extends;
}
return n82Var;
}
@Override
public boolean cachePreview(Context context, File file, String str) {
rm lite_for = lite_for(context.getApplicationContext(), file);
if (lite_for != null) {
str = lite_for.lite_else(str);
}
return !str.startsWith(ot.lite_do);
}
@Override
public void clearCache(Context context, File file, String str) {
if (TextUtils.isEmpty(str)) {
FileUtils.deleteFiles(new File(StorageUtils.getIndividualCacheDirectory(context.getApplicationContext()).getAbsolutePath()));
return;
}
String lite_do = new hn().lite_do(str);
if (file != null) {
StringBuilder sb = new StringBuilder();
sb.append(file.getAbsolutePath());
String str2 = File.separator;
CommonUtil.deleteFile(r5.lite_interface(sb, str2, lite_do, ".download"));
CommonUtil.deleteFile(file.getAbsolutePath() + str2 + lite_do);
return;
}
StringBuilder sb2 = new StringBuilder();
sb2.append(StorageUtils.getIndividualCacheDirectory(context.getApplicationContext()).getAbsolutePath());
String str3 = File.separator;
CommonUtil.deleteFile(r5.lite_interface(sb2, str3, lite_do, ".download"));
CommonUtil.deleteFile(StorageUtils.getIndividualCacheDirectory(context.getApplicationContext()).getAbsolutePath() + str3 + lite_do);
}
@Override
public void doCacheLogic(Context context, IMediaPlayer iMediaPlayer, String str, Map<String, String> map, File file) {
Map<String, String> map2 = o82.lite_do;
map2.clear();
if (map != null) {
map2.putAll(map);
}
if (str.startsWith(ot.lite_do) && !str.contains("127.0.0.1") && !str.contains(".m3u8")) {
rm lite_for = lite_for(context.getApplicationContext(), file);
if (lite_for != null) {
String lite_else = lite_for.lite_else(str);
boolean z = !lite_else.startsWith(ot.lite_do);
this.lite_throws = z;
if (!z) {
lite_for.lite_catch(this, str);
}
str = lite_else;
}
} else if (!str.startsWith(ot.lite_do) && !str.startsWith("rtmp") && !str.startsWith("rtsp") && !str.contains(".m3u8")) {
this.lite_throws = true;
}
try {
iMediaPlayer.setDataSource(context, Uri.parse(str), map);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public boolean hadCached() {
return this.lite_throws;
}
public void lite_byte(rm rmVar) {
this.lite_static = rmVar;
}
@Override
public void lite_do(File file, String str, int i) {
m82.a aVar = this.lite_boolean;
if (aVar != null) {
aVar.lite_do(file, str, i);
}
}
public rm lite_new(Context context) {
return new rm.b(context.getApplicationContext()).lite_byte(this.lite_default).lite_if();
}
public rm lite_try(Context context, File file) {
if (!file.exists()) {
file.mkdirs();
}
rm.b bVar = new rm.b(context);
bVar.lite_int(file);
bVar.lite_byte(this.lite_default);
this.lite_switch = file;
return bVar.lite_if();
}
@Override
public void release() {
rm rmVar = this.lite_static;
if (rmVar != null) {
try {
rmVar.lite_short(this);
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override
public void setCacheAvailableListener(m82.a aVar) {
this.lite_boolean = aVar;
}
}