Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c
以下内容为反编译后的 et.java 源代码,内容仅作参考
package com.flurry.sdk;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.flurry.sdk.cc;
import com.flurry.sdk.ce;
import com.flurry.sdk.ly;
import com.tapjoy.TapjoyConstants;
import java.io.File;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class et {
private static final String j = "et";
WeakReference<lx> a;
public cr b;
ak c;
public aj d;
public hc e;
public ho f;
File g;
kp<List<ce>> h;
public String i;
private final Map<String, ce> k = Collections.synchronizedMap(new HashMap());
private final kr<ly> l = new kr<ly>() {
@Override
public final void a(ly lyVar) {
ly lyVar2 = lyVar;
if (et.this.a == null || lyVar2.b == et.this.a.get()) {
switch (AnonymousClass4.a[lyVar2.c - 1]) {
case 1:
final et etVar = et.this;
lx lxVar = lyVar2.b;
Context context = lyVar2.a.get();
etVar.a = new WeakReference<>(lxVar);
etVar.b = new cr();
etVar.c = new ak();
etVar.d = new aj();
aj ajVar = etVar.d;
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("market://details?id=" + kh.a().a.getPackageName()));
mi.a(intent);
etVar.e = new hf();
etVar.f = new hg();
etVar.g = kh.a().a.getFileStreamPath(".flurryadlog." + Integer.toString(kh.a().d.hashCode(), 16));
am.a().b.b();
etVar.h = new kp<>(kh.a().a.getFileStreamPath(".yflurryadlog." + Long.toString(mi.i(kh.a().d), 16)), ".yflurryadlog.", 1, new lv<List<ce>>() {
@Override
public final ls<List<ce>> a(int i) {
return new lr(new ce.a(new cc.a()));
}
});
String str = null;
if (context != null) {
String defaultUserAgent = (context != null && Build.VERSION.SDK_INT >= 17) ? WebSettings.getDefaultUserAgent(kh.a().a) : null;
if (!TextUtils.isEmpty(defaultUserAgent)) {
str = defaultUserAgent;
} else if (context != null) {
str = new WebView(context).getSettings().getUserAgentString();
}
}
etVar.i = str;
kh.a().b(new mk() {
@Override
public final void a() {
et.this.b();
}
});
final by a = by.a();
kh.a().b(new mk() {
@Override
public final void a() {
if (by.this.c == c.b) {
return;
}
if (by.c()) {
by.b(by.this);
return;
}
by.this.c = c.a;
by.this.g();
}
});
return;
case 2:
final et etVar2 = et.this;
Context context2 = lyVar2.a.get();
ak akVar = etVar2.c;
kx.a(3, ak.a, "Registered Event Handler ");
ks.a().a("com.flurry.android.impl.ads.AdEvent", akVar.b);
am.a().g.a();
kh.a().b(new mk() {
@Override
public final void a() {
am.a().h.b();
}
});
kh.a().b(new mk() {
@Override
public final void a() {
am.a().e.c();
}
});
if (kl.a().b()) {
return;
}
am.a().b.b(context2);
return;
case 3:
final et etVar3 = et.this;
Context context3 = lyVar2.a.get();
if (!kl.a().b()) {
am.a().b.a(context3);
}
kh.a().b(new mk() {
@Override
public final void a() {
et.this.c();
}
});
kh.a().b(new mk() {
@Override
public final void a() {
am.a().b();
}
});
return;
case 4:
ks.a().b("com.flurry.android.sdk.FlurrySessionEvent", et.this.l);
final et etVar4 = et.this;
ak akVar2 = etVar4.c;
kx.a(3, ak.a, "Unregister Event Handler ");
ks.a().a(akVar2.b);
am.a().b.a();
kh.a().b(new mk() {
@Override
public final void a() {
et.this.d();
}
});
kh.a().b(new mk() {
@Override
public final void a() {
bm bmVar = am.a().h;
if (bmVar.a != null) {
bmVar.a.b();
}
}
});
kh.a().b(new mk() {
@Override
public final void a() {
am.a().e.c = true;
}
});
ai.a().b(TapjoyConstants.TJC_PLUGIN_NATIVE);
ai.a().b.clear();
return;
default:
return;
}
}
}
};
static class AnonymousClass4 {
static final int[] a = new int[ly.a.a().length];
static {
try {
a[ly.a.a - 1] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[ly.a.b - 1] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[ly.a.c - 1] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[ly.a.d - 1] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
public et() {
ks.a().a("com.flurry.android.sdk.FlurrySessionEvent", this.l);
}
public synchronized void b() {
kx.a(4, j, "Loading AdLog data.");
List<ce> a = this.h.a();
if (a != null) {
a(a);
return;
}
if (this.g.exists()) {
kx.a(4, j, "Legacy AdLog data found, converting.");
List<ce> b = ap.b(this.g);
if (b != null) {
a(b);
}
this.g.delete();
c();
}
}
private void a(List<ce> list) {
for (ce ceVar : list) {
this.k.put(ceVar.c, ceVar);
}
}
public synchronized void c() {
kx.a(4, j, "Saving AdLog data.");
this.h.a(new ArrayList(this.k.values()));
}
public synchronized void d() {
ea eaVar;
String str;
List<dz> a = fc.a(new ArrayList(this.k.values()));
if (a.isEmpty()) {
kx.a(3, j, "List of adLogs is empty");
eaVar = null;
} else {
String str2 = kh.a().d;
List<de> e = fc.e();
ea eaVar2 = new ea();
eaVar2.a = str2;
eaVar2.b = e;
eaVar2.c = a;
eaVar2.f = false;
eaVar2.d = System.currentTimeMillis();
eaVar2.e = Integer.toString(ki.b());
String str3 = j;
kx.a(3, str3, "Got ad log request:" + eaVar2.toString());
eaVar = eaVar2;
}
if (eaVar != null) {
eh ehVar = am.a().d;
al a2 = al.a();
StringBuilder sb = new StringBuilder();
if (a2.b != null) {
str = a2.b;
} else {
str = al.c() ? "https://adlog.flurry.com" : "http://adlog.flurry.com";
}
sb.append(str);
sb.append("/v2/postAdLog.do");
String sb2 = sb.toString();
String str4 = kh.a().d;
StringBuilder sb3 = new StringBuilder();
sb3.append(ki.b());
ehVar.a(eaVar, sb2, str4, sb3.toString());
}
this.k.clear();
this.h.b();
}
public final synchronized void a() {
kh.a().b(new mk() {
@Override
public final void a() {
et.this.d();
}
});
}
public final synchronized void a(String str, cj cjVar, boolean z, Map<String, String> map) {
if (cjVar == null) {
return;
}
String str2 = j;
kx.a(3, str2, "logAdEvent(" + str + ", " + cjVar + ", " + z + ", " + map + ")");
ce a = a(str);
String str3 = cjVar.an;
jn.a();
a.d.add(new cc(str3, z, jn.g(), map));
}
public final ce a(String str) {
ce ceVar = this.k.get(str);
if (ceVar == null) {
ceVar = new ce(str);
if (this.k.size() < 32767) {
this.k.put(ceVar.c, ceVar);
}
}
return ceVar;
}
}