Puzzle King v2.3.8版本的 MD5 值为:1734eb975c9d2843afa462aec387292e
以下内容为反编译后的 b.java 源代码,内容仅作参考
package com.mbridge.msdk.c;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.same.b.e;
import com.mbridge.msdk.foundation.tools.FastKV;
import com.mbridge.msdk.foundation.tools.ac;
import com.mbridge.msdk.foundation.tools.v;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public class b {
public static final String a = b.class.getSimpleName();
private static b b = null;
private static HashMap<String, d> c = new HashMap<>();
private static volatile a d = null;
private b() {
}
public static synchronized b a() {
b bVar;
synchronized (b.class) {
if (b == null) {
b = new b();
}
bVar = b;
}
return bVar;
}
public final boolean a(String str) {
a b2 = b(str);
if (b2 != null) {
return b2.U() + (b2.T() * 1000) <= System.currentTimeMillis();
}
return true;
}
public final boolean a(String str, int i, String str2) {
try {
Context f = com.mbridge.msdk.foundation.controller.a.d().f();
String str3 = str + "_" + i + "_" + str2;
long currentTimeMillis = System.currentTimeMillis();
long j = 0;
long longValue = ((Long) ac.b(f, str3, 0L)).longValue();
a b2 = b(str);
if (b2 == null) {
b2 = a().b();
} else {
j = longValue;
}
if (j + (b2.N() * 1000) > currentTimeMillis) {
return false;
}
ac.a(f, str3, Long.valueOf(currentTimeMillis));
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public final boolean a(String str, String str2) {
a b2 = b(str2);
if (a(str2) && a(str2, 1, str)) {
new c().a(com.mbridge.msdk.foundation.controller.a.d().f(), str2, com.mbridge.msdk.foundation.controller.a.d().i());
}
d e = e(str2, str);
if (b2 != null && e != null) {
long P = b2.P() * 1000;
if (e.t() + P > System.currentTimeMillis()) {
return false;
}
}
return true;
}
public final void b(String str, String str2) {
com.mbridge.msdk.foundation.a.a.a.a().a(str, str2);
d = a.c(str2);
if (d != null) {
d.ad();
}
}
public final a b(String str) {
if (d == null) {
try {
d = a.c(com.mbridge.msdk.foundation.a.a.a.a().b(str));
if (d != null) {
d.ad();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return d;
}
public final String c(String str) {
if (str == null) {
return "";
}
try {
String b2 = com.mbridge.msdk.foundation.a.a.a.a().b(str);
return b2 == null ? "" : b2;
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
return "";
}
}
public static void a(Context context, String str) {
FastKV build;
Map<String, Object> map = null;
if (com.mbridge.msdk.foundation.controller.b.a().d()) {
try {
build = new FastKV.Builder(e.b(com.mbridge.msdk.foundation.same.b.c.MBRIDGE_700_CONFIG), "mbridge").build();
} catch (Exception unused) {
}
if (build == null) {
try {
map = build.getAll();
} catch (Exception unused2) {
}
if (map != null) {
try {
for (String str2 : map.keySet()) {
if (str2.startsWith(str + "_")) {
c.put(str2, d.b((String) map.get(str2)));
}
}
return;
} catch (Exception e) {
e.printStackTrace();
return;
}
}
return;
}
try {
Map<String, ?> all = context.getSharedPreferences("mbridge", 0).getAll();
for (String str3 : all.keySet()) {
if (str3.startsWith(str + "_")) {
c.put(str3, d.b((String) all.get(str3)));
}
}
return;
} catch (Exception e2) {
e2.printStackTrace();
return;
}
}
build = null;
if (build == null) {
}
}
public final d c(String str, String str2) {
d e = e(str, str2);
return e == null ? d.k() : e;
}
public final d e(String str, String str2) {
d h = h(str, str2);
if (h != null && h.i() == 0) {
h.c(1);
}
return h;
}
private d h(String str, String str2) {
if (TextUtils.isEmpty(str)) {
str = com.mbridge.msdk.foundation.controller.a.d().g();
}
String str3 = str + "_" + str2;
d dVar = null;
if (c.containsKey(str3)) {
return c.get(str3);
}
try {
dVar = d.b(com.mbridge.msdk.foundation.a.a.a.a().b(str3));
c.put(str3, dVar);
} catch (Exception e) {
e.printStackTrace();
}
return dVar;
}
public final d f(String str, String str2) {
return h(str, str2);
}
public final void a(String str, String str2, String str3) {
String str4 = str + "_" + str2;
com.mbridge.msdk.foundation.a.a.a.a().a(str4, str3);
c.put(str4, d.b(str3));
}
public final String d(String str) {
return com.mbridge.msdk.foundation.a.a.a.a().b("ivreward_" + str);
}
public final void e(String str) {
com.mbridge.msdk.foundation.a.a.a.a().c("ivreward_" + str);
}
public final void f(String str) {
try {
String c2 = c(str);
if (TextUtils.isEmpty(c2)) {
return;
}
JSONObject jSONObject = new JSONObject(c2);
jSONObject.put("current_time", System.currentTimeMillis());
b(str, jSONObject.toString());
} catch (Throwable th) {
v.d(a, th.getMessage());
}
}
public final void g(String str, String str2) {
try {
String b2 = com.mbridge.msdk.foundation.a.a.a.a().b(str + "_" + str2);
if (TextUtils.isEmpty(b2)) {
return;
}
JSONObject jSONObject = new JSONObject(b2);
jSONObject.put("current_time", System.currentTimeMillis());
a(str, str2, jSONObject.toString());
} catch (Throwable th) {
v.d(a, th.getMessage());
}
}
public final a b() {
a aVar = new a();
aVar.r(1);
aVar.e(true);
aVar.c(3600L);
aVar.d(0L);
aVar.d(false);
aVar.c(false);
aVar.a(7200L);
aVar.b("mbridge");
aVar.p(1);
aVar.b(1800L);
aVar.q(259200);
aVar.e(10L);
aVar.k(1);
aVar.j(1);
aVar.l(1);
aVar.m(0);
aVar.n(1);
aVar.o(-1);
aVar.c(0);
aVar.e("https://cdn-adn-https.rayjump.com/cdn-adn/v2/portal/19/08/20/11/06/5d5b63cb457e2.js");
aVar.d("https://mtg-native.rayjump.com/omsdk/omsdkjs_common_js.txt");
aVar.b(120);
aVar.f(false);
aVar.t(0);
aVar.u(120);
aVar.v(1);
aVar.g(com.mbridge.msdk.foundation.same.a.w);
aVar.f(com.mbridge.msdk.foundation.same.a.y);
aVar.e(com.mbridge.msdk.foundation.same.a.x);
aVar.a(10);
aVar.h(com.mbridge.msdk.foundation.same.a.z);
aVar.d(10);
aVar.x(0);
aVar.w(0);
aVar.a("");
aVar.y(1);
aVar.b(false);
aVar.s(1);
aVar.a(true);
return aVar;
}
public final a g(String str) {
try {
if (TextUtils.isEmpty(str)) {
return b();
}
a b2 = b(str);
return b2 == null ? b() : b2;
} catch (Exception unused) {
return b();
}
}
public final d d(String str, String str2) {
d h = h(str, str2);
return h == null ? d.k() : h;
}
}