新利 v1.0.9版本的 MD5 值为:6b647260c4281a709ba37d10e4fdcaa6
以下内容为反编译后的 f.java 源代码,内容仅作参考
package e.b;
import g.g;
import g.h;
import g.n.j.a.k;
import g.q.b.p;
import h.a.a0;
import h.a.f0;
import h.a.p0;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Iterator;
import org.json.JSONObject;
public final class f {
public final JSONObject a = new JSONObject();
@g.n.j.a.f(c = "com.xinli.Environment", f = "Environment.kt", l = {16}, m = "getEnvironmentJSON-IoAF18A")
public static final class a extends g.n.j.a.d {
public Object f5537d;
public int f5539f;
public a(g.n.d<? super a> dVar) {
super(dVar);
}
@Override
public final Object i(Object obj) {
this.f5537d = obj;
this.f5539f |= Integer.MIN_VALUE;
Object c2 = f.this.c(this);
return c2 == g.n.i.c.c() ? c2 : g.g.a(c2);
}
}
@g.n.j.a.f(c = "com.xinli.Environment$getEnvironmentJSON$2", f = "Environment.kt", l = {}, m = "invokeSuspend")
public static final class b extends k implements p<f0, g.n.d<? super g.g<? extends String>>, Object> {
public int f5540e;
public b(g.n.d<? super b> dVar) {
super(2, dVar);
}
@Override
public final g.n.d<g.k> a(Object obj, g.n.d<?> dVar) {
return new b(dVar);
}
@Override
public final Object i(Object obj) {
InputStreamReader inputStreamReader;
Exception e2;
BufferedInputStream bufferedInputStream;
Throwable th;
Object obj2;
InputStream inputStream;
Object obj3;
g.n.i.c.c();
if (this.f5540e == 0) {
h.b(obj);
InputStream inputStream2 = null;
try {
URLConnection openConnection = new URL("https://18a99.com/public_env/h5_env.json").openConnection();
openConnection.setDoInput(true);
openConnection.setConnectTimeout(10000);
inputStream = openConnection.getInputStream();
try {
bufferedInputStream = inputStream instanceof BufferedInputStream ? (BufferedInputStream) inputStream : new BufferedInputStream(inputStream, 8192);
try {
inputStreamReader = new InputStreamReader(bufferedInputStream, g.v.c.a);
} catch (Exception e3) {
e2 = e3;
inputStreamReader = null;
obj3 = bufferedInputStream;
} catch (Throwable th2) {
inputStreamReader = null;
inputStream2 = inputStream;
th = th2;
}
} catch (Exception e4) {
inputStreamReader = null;
e2 = e4;
obj3 = null;
} catch (Throwable th3) {
th = th3;
inputStreamReader = null;
inputStream2 = inputStream;
th = th;
bufferedInputStream = inputStreamReader;
if (inputStream2 != null) {
}
if (bufferedInputStream != 0) {
}
if (inputStreamReader != null) {
}
throw th;
}
} catch (Exception e5) {
inputStreamReader = null;
e2 = e5;
bufferedInputStream = 0;
} catch (Throwable th4) {
th = th4;
inputStreamReader = null;
}
try {
JSONObject jSONObject = new JSONObject(g.p.b.c(inputStreamReader));
Iterator<String> keys = jSONObject.keys();
g.q.c.f.c(keys, "json.keys()");
while (keys.hasNext()) {
String next = keys.next();
f.this.a.put(next, jSONObject.opt(next));
}
g.a aVar = g.g.b;
obj2 = "Get environment json file successful";
g.g.b("Get environment json file successful");
if (inputStream != null) {
try {
inputStream.close();
} catch (Exception unused) {
}
}
bufferedInputStream.close();
try {
inputStreamReader.close();
} catch (Exception unused2) {
}
} catch (Exception e6) {
e2 = e6;
obj3 = bufferedInputStream;
inputStream2 = inputStream;
bufferedInputStream = obj3;
try {
g.a aVar2 = g.g.b;
Object a = h.a(e2);
g.g.b(a);
if (inputStream2 != null) {
try {
inputStream2.close();
} catch (Exception unused3) {
}
}
if (bufferedInputStream != 0) {
try {
bufferedInputStream.close();
} catch (Exception unused4) {
}
}
if (inputStreamReader != null) {
try {
inputStreamReader.close();
} catch (Exception unused5) {
}
}
obj2 = a;
return g.g.a(obj2);
} catch (Throwable th5) {
th = th5;
if (inputStream2 != null) {
try {
inputStream2.close();
} catch (Exception unused6) {
}
}
if (bufferedInputStream != 0) {
try {
bufferedInputStream.close();
} catch (Exception unused7) {
}
}
if (inputStreamReader != null) {
try {
inputStreamReader.close();
} catch (Exception unused8) {
}
}
throw th;
}
} catch (Throwable th6) {
th = th6;
inputStream2 = inputStream;
if (inputStream2 != null) {
}
if (bufferedInputStream != 0) {
}
if (inputStreamReader != null) {
}
throw th;
}
return g.g.a(obj2);
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
@Override
public final Object g(f0 f0Var, g.n.d<? super g.g<String>> dVar) {
return ((b) a(f0Var, dVar)).i(g.k.a);
}
}
public final String b() {
try {
return this.a.getJSONArray("apk").getJSONObject(0).getString("url");
} catch (Exception unused) {
return null;
}
}
public final Object c(g.n.d<? super g.g<String>> dVar) {
a aVar;
int i;
if (dVar instanceof a) {
aVar = (a) dVar;
int i2 = aVar.f5539f;
if ((i2 & Integer.MIN_VALUE) != 0) {
aVar.f5539f = i2 - Integer.MIN_VALUE;
Object obj = aVar.f5537d;
Object c2 = g.n.i.c.c();
i = aVar.f5539f;
if (i != 0) {
h.b(obj);
p0 p0Var = p0.a;
a0 b2 = p0.b();
b bVar = new b(null);
aVar.f5539f = 1;
obj = h.a.g.c(b2, bVar, aVar);
if (obj == c2) {
return c2;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
h.b(obj);
}
return ((g.g) obj).i();
}
}
aVar = new a(dVar);
Object obj2 = aVar.f5537d;
Object c22 = g.n.i.c.c();
i = aVar.f5539f;
if (i != 0) {
}
return ((g.g) obj2).i();
}
public final boolean d() {
try {
return g.q.c.f.a(this.a.getJSONArray("android").getJSONObject(0).getString("name"), "1");
} catch (Exception unused) {
return false;
}
}
public final String e() {
try {
return this.a.getJSONArray("h5Url").getJSONObject(0).getString("url");
} catch (Exception unused) {
return null;
}
}
public final String f() {
try {
return this.a.getJSONArray("android").getJSONObject(0).getString("url");
} catch (Exception unused) {
return null;
}
}
}