百草园 v7.5版本的 MD5 值为:17f49811374a404d232d5b2cc35bf30f
以下内容为反编译后的 Ooo.java 源代码,内容仅作参考
package com.shenma.tvlauncher.tvlive.IL1Iii;
import android.content.Context;
import android.net.ConnectivityManager;
import android.os.Handler;
import android.support.v4.view.PointerIconCompat;
import android.widget.Toast;
import com.bumptech.glide.load.Key;
import com.shenma.tvlauncher.utils.lLi1LL;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.http.util.EncodingUtils;
import org.w3c.dom.NodeList;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
public class Ooo {
private static String f4116O8oO8o8 = "DownloadResourse";
private Context IL1Iii;
private O8oO8o8 ILil;
private Handler f4117O8;
private C0049Ooo f4118Ooo;
class IL1Iii extends Thread {
IL1Iii() {
}
@Override
public void run() {
Ooo ooo;
super.run();
Ooo.this.f4118Ooo.IL1Iii = Ooo.this.IL1Iii();
try {
File file = new File(Ooo.this.IL1Iii.getFilesDir() + File.separator, "version.txt");
if (!file.exists()) {
file.createNewFile();
}
FileInputStream fileInputStream = new FileInputStream(file);
byte[] bArr = new byte[fileInputStream.available()];
fileInputStream.read(bArr);
fileInputStream.close();
String string = EncodingUtils.getString(bArr, Key.STRING_CHARSET_NAME);
if (!string.equals("") && string != null) {
if (Float.parseFloat(string) >= Ooo.this.f4118Ooo.IL1Iii) {
Ooo.this.f4117O8.sendEmptyMessage(1005);
return;
}
Ooo.this.f4117O8.sendEmptyMessage(PointerIconCompat.TYPE_CELL);
ooo = Ooo.this;
ooo.ILil();
}
Ooo.this.f4117O8.sendEmptyMessage(PointerIconCompat.TYPE_CELL);
ooo = Ooo.this;
ooo.ILil();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class O8oO8o8 {
File f4122O8oO8o8 = null;
File IL1Iii = null;
File f4124Ooo = null;
File ILil = null;
File f4123O8 = null;
File I1I = null;
File f4125o0o0 = null;
File f4121IL = null;
O8oO8o8() {
}
}
public class C0049Ooo {
String f4127O8oO8o8 = null;
float IL1Iii = 0.0f;
String f4128Ooo = null;
C0049Ooo() {
}
}
public Ooo() {
this.IL1Iii = null;
this.f4118Ooo = null;
this.ILil = null;
this.f4117O8 = null;
}
public Ooo(Context context, Handler handler) {
this.IL1Iii = null;
this.f4118Ooo = null;
this.ILil = null;
this.f4117O8 = null;
this.IL1Iii = context;
this.f4117O8 = handler;
this.f4118Ooo = new C0049Ooo();
this.ILil = new O8oO8o8();
}
public void ILil() {
try {
FileOutputStream openFileOutput = this.IL1Iii.openFileOutput("version.txt", 3);
lLi1LL.IL1Iii(f4116O8oO8o8, "fileName.zipVersionFile->" + this.ILil.IL1Iii + "\nupdateList.version->" + this.f4118Ooo.IL1Iii);
StringBuilder sb = new StringBuilder();
sb.append(this.f4118Ooo.IL1Iii);
sb.append("");
openFileOutput.write(new String(sb.toString()).getBytes());
openFileOutput.close();
new Thread() {
@Override
public void run() {
super.run();
try {
Ooo.this.m3727O8oO8o8(Ooo.this.IL1Iii(Ooo.this.f4118Ooo.f4127O8oO8o8));
Ooo.this.f4117O8.sendEmptyMessage(1005);
} catch (Exception e) {
e.printStackTrace();
}
}
}.start();
} catch (Exception e) {
e.printStackTrace();
}
}
public void m3727O8oO8o8(InputStream inputStream) {
ZipInputStream zipInputStream = new ZipInputStream(inputStream);
while (true) {
try {
try {
ZipEntry nextEntry = zipInputStream.getNextEntry();
if (nextEntry == null) {
break;
}
if (!nextEntry.isDirectory()) {
String str = nextEntry.getName().split("/")[r8.length - 1];
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bArr = new byte[1024];
while (true) {
int read = zipInputStream.read(bArr);
if (read == -1) {
break;
} else {
byteArrayOutputStream.write(bArr, 0, read);
}
}
byte[] byteArray = byteArrayOutputStream.toByteArray();
byteArrayOutputStream.close();
FileOutputStream openFileOutput = this.IL1Iii.openFileOutput(str, 3);
openFileOutput.write(byteArray);
if (str.contains("libutp") || str.contains("libletvp2p") || str.contains("so")) {
FileOutputStream fileOutputStream = new FileOutputStream(new File(this.IL1Iii.getDir("libs", 0) + File.separator, str));
fileOutputStream.write(byteArray);
fileOutputStream.close();
Context context = this.IL1Iii;
Context context2 = this.IL1Iii;
context.getSharedPreferences("shenma", 0).edit().putString(ILil.IL1Iii, str);
}
openFileOutput.close();
}
} catch (IOException e) {
e.printStackTrace();
}
} finally {
zipInputStream.close();
}
}
}
private boolean m3729Ooo() {
return ((ConnectivityManager) this.IL1Iii.getSystemService("connectivity")).getActiveNetworkInfo() != null;
}
public float IL1Iii() {
try {
NodeList elementsByTagName = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(m3730O8oO8o8("http://live.lsott.com/wepower/plugs.xml")).getElementsByTagName(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL);
this.f4118Ooo.f4127O8oO8o8 = elementsByTagName.item(0).getAttributes().getNamedItem("link").getTextContent();
this.f4118Ooo.IL1Iii = Float.valueOf(elementsByTagName.item(0).getAttributes().getNamedItem("version").getTextContent()).floatValue();
this.f4118Ooo.f4128Ooo = elementsByTagName.item(0).getAttributes().getNamedItem("description").getTextContent();
} catch (Exception e) {
e.printStackTrace();
}
return this.f4118Ooo.IL1Iii;
}
public InputStream IL1Iii(String str) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
httpURLConnection.setDoInput(true);
httpURLConnection.setConnectTimeout(10000);
httpURLConnection.setReadTimeout(10000);
return httpURLConnection.getInputStream();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public InputStream m3730O8oO8o8(String str) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
httpURLConnection.setDoInput(true);
httpURLConnection.setConnectTimeout(10000);
httpURLConnection.setReadTimeout(10000);
InputStream inputStream = httpURLConnection.getInputStream();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
while (true) {
int read = inputStream.read();
if (read == -1) {
inputStream.close();
return new ByteArrayInputStream(byteArrayOutputStream.toString().getBytes(Key.STRING_CHARSET_NAME));
}
byteArrayOutputStream.write(read);
}
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public void m3731O8oO8o8() {
if (m3729Ooo()) {
new IL1Iii().start();
} else {
Toast.makeText(this.IL1Iii, "net link erro", 1).show();
}
}
}