Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c
以下内容为反编译后的 by.java 源代码,内容仅作参考
package com.flurry.sdk;
import com.flurry.android.Consent;
import com.flurry.android.FlurryAgent;
import com.flurry.sdk.kf;
import com.flurry.sdk.le;
import com.flurry.sdk.lg;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
public final class by implements kf.a {
private static final String a = "by";
private static by b;
private int c = c.a;
private int d = a.a;
private List<b> e = new ArrayList();
private boolean f = false;
private boolean g = true;
private int h;
public static final class a {
public static final int a = 1;
public static final int b = 2;
public static final int c = 3;
private static final int[] d = {a, b, c};
}
public interface b {
void a();
void b();
}
public static final class c {
public static final int a = 1;
public static final int b = 2;
public static final int c = 3;
public static final int d = 4;
private static final int[] e = {a, b, c, d};
}
static boolean e(by byVar) {
byVar.f = true;
return true;
}
static int k(by byVar) {
int i = byVar.h;
byVar.h = i + 1;
return i;
}
private by() {
}
public static synchronized by a() {
by byVar;
synchronized (by.class) {
if (b == null) {
b = new by();
}
byVar = b;
}
return byVar;
}
public final void a(final b bVar) {
kh.a().b(new mk() {
@Override
public final void a() {
if (by.this.c == c.d) {
by.b(by.this);
}
if (by.this.c == c.b) {
by.this.e.add(bVar);
} else {
by.this.b(bVar);
}
}
});
}
@Override
public final void b() {
kh.a().b(new mk() {
@Override
public final void a() {
if (by.this.c == c.b) {
by.e(by.this);
} else if (!by.c() || by.f(by.this)) {
by.this.h();
} else {
by.e(by.this);
by.b(by.this);
}
}
});
}
public void e() {
kh.a().b(new mk() {
@Override
public final void a() {
if (by.this.h >= 2) {
kx.a(3, by.a, "Http request for geo check failed");
by.i(by.this);
return;
}
le leVar = new le();
leVar.g = "https://service.cmp.oath.com/cmp/v0/location/eu";
leVar.h = lg.a.kPost;
leVar.u = 100000;
leVar.d = new lt();
leVar.a = new le.a<Void, String>() {
@Override
public final void a(le<Void, String> leVar2, String str) {
String str2 = str;
int i = leVar2.q;
String str3 = by.a;
kx.a(3, str3, "Response code: " + i);
if (i >= 200 && i < 300) {
try {
boolean z = new JSONObject(str2).getBoolean("result");
by.a(by.this, z);
String str4 = by.a;
kx.a(3, str4, "isUserFromEu: " + z);
return;
} catch (Exception e) {
e.printStackTrace();
}
}
by.this.e();
}
};
by.k(by.this);
kd.a().a((Object) by.this, (by) leVar);
}
});
}
public void f() {
if (this.f) {
h();
this.f = false;
} else {
g();
}
if (this.e.isEmpty()) {
return;
}
for (b bVar : this.e) {
b(bVar);
}
this.e.clear();
}
public void g() {
int i = l() ? a.b : a.c;
if (this.d != a.a && this.d != i) {
i();
}
this.d = i;
}
public void h() {
if (this.d != a.a) {
i();
}
this.d = l() ? a.b : a.c;
}
private static void i() {
am.a().a.a();
bm bmVar = am.a().h;
if (bmVar.c()) {
bf bfVar = bmVar.a;
if (bfVar.c()) {
bfVar.b.e();
bfVar.c.e();
}
}
}
public void b(b bVar) {
if (this.d == a.b) {
bVar.a();
} else {
bVar.b();
}
}
private static boolean j() {
Consent flurryConsent = FlurryAgent.getFlurryConsent();
return flurryConsent != null && (flurryConsent instanceof nl) && ((nl) flurryConsent).a;
}
private static boolean k() {
Consent flurryConsent = FlurryAgent.getFlurryConsent();
return flurryConsent != null && flurryConsent.isGdprScope();
}
private boolean l() {
if (!j() && !k()) {
if (!(this.c == c.c) || this.g) {
return false;
}
}
return true;
}
static boolean c() {
return (j() || k()) ? false : true;
}
static void b(by byVar) {
byVar.c = c.b;
byVar.h = 0;
byVar.e();
}
static boolean f(by byVar) {
return byVar.c != c.a;
}
static void i(by byVar) {
byVar.c = c.d;
byVar.f();
}
static void a(by byVar, final boolean z) {
kh.a().b(new mk() {
@Override
public final void a() {
by.this.c = c.c;
by.this.g = z;
by.this.f();
}
});
}
}