Video Downloader for FB v3.5.1版本的 MD5 值为:1db7d4aa9fc4356831f5521f52585a52
以下内容为反编译后的 w.java 源代码,内容仅作参考
package com.adcolony.sdk;
import android.util.Log;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONObject;
public class w {
static boolean e = false;
private static final int f = 4000;
private static final int g = 4;
static final int h = 3;
static final int i = 2;
static final int j = 1;
static final int k = 0;
static final int l = -1;
static int m = 3;
static int n = 1;
private JSONObject f874a = s.b();
private ExecutorService b = null;
private final Queue<Runnable> c = new ConcurrentLinkedQueue();
e0 d;
public class a implements z {
a() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 0, s.h(xVar.b(), "message"), true);
}
}
public class b implements Runnable {
final int f876a;
final String b;
final int c;
final boolean d;
b(int i, String str, int i2, boolean z) {
this.f876a = i;
this.b = str;
this.c = i2;
this.d = z;
}
@Override
public void run() {
w.this.a(this.f876a, this.b, this.c);
int i = 0;
while (i <= this.b.length() / w.f) {
int i2 = i * w.f;
i++;
int min = Math.min(i * w.f, this.b.length());
if (this.c == 3) {
w wVar = w.this;
if (wVar.a(s.g(wVar.f874a, Integer.toString(this.f876a)), 3, this.d)) {
Log.d("AdColony [TRACE]", this.b.substring(i2, min));
}
}
if (this.c == 2) {
w wVar2 = w.this;
if (wVar2.a(s.g(wVar2.f874a, Integer.toString(this.f876a)), 2, this.d)) {
Log.i("AdColony [INFO]", this.b.substring(i2, min));
}
}
if (this.c == 1) {
w wVar3 = w.this;
if (wVar3.a(s.g(wVar3.f874a, Integer.toString(this.f876a)), 1, this.d)) {
Log.w("AdColony [WARNING]", this.b.substring(i2, min));
}
}
if (this.c == 0) {
w wVar4 = w.this;
if (wVar4.a(s.g(wVar4.f874a, Integer.toString(this.f876a)), 0, this.d)) {
Log.e("AdColony [ERROR]", this.b.substring(i2, min));
}
}
if (this.c == -1 && w.m >= -1) {
Log.e("AdColony [FATAL]", this.b.substring(i2, min));
}
}
}
}
public class c implements z {
c() {
}
@Override
public void a(x xVar) {
w.m = s.f(xVar.b(), "level");
}
}
public class d implements z {
d() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 3, s.h(xVar.b(), "message"), false);
}
}
public class e implements z {
e() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 3, s.h(xVar.b(), "message"), true);
}
}
public class f implements z {
f() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 2, s.h(xVar.b(), "message"), false);
}
}
public class g implements z {
g() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 2, s.h(xVar.b(), "message"), true);
}
}
public class h implements z {
h() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 1, s.h(xVar.b(), "message"), false);
}
}
public class i implements z {
i() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 1, s.h(xVar.b(), "message"), true);
}
}
public class j implements z {
j() {
}
@Override
public void a(x xVar) {
w.this.b(s.f(xVar.b(), "module"), 0, s.h(xVar.b(), "message"), false);
}
}
void b(int i2, int i3, String str, boolean z) {
if (a(a(i2, i3, str, z))) {
return;
}
synchronized (this.c) {
this.c.add(a(i2, i3, str, z));
}
}
public void c() {
ExecutorService executorService = this.b;
if (executorService == null || executorService.isShutdown() || this.b.isTerminated()) {
this.b = Executors.newSingleThreadExecutor();
}
synchronized (this.c) {
while (!this.c.isEmpty()) {
a(this.c.poll());
}
}
}
public void a(int i2, String str, boolean z) {
b(0, i2, str, z);
}
private Runnable a(int i2, int i3, String str, boolean z) {
return new b(i2, str, i3, z);
}
boolean a(JSONObject jSONObject, int i2, boolean z) {
int f2 = s.f(jSONObject, "print_level");
boolean d2 = s.d(jSONObject, "log_private");
if (jSONObject.length() == 0) {
f2 = m;
d2 = e;
}
return (!z || d2) && f2 != 4 && f2 >= i2;
}
public void b() {
com.adcolony.sdk.a.a("Log.set_log_level", new c());
com.adcolony.sdk.a.a("Log.public.trace", new d());
com.adcolony.sdk.a.a("Log.private.trace", new e());
com.adcolony.sdk.a.a("Log.public.info", new f());
com.adcolony.sdk.a.a("Log.private.info", new g());
com.adcolony.sdk.a.a("Log.public.warning", new h());
com.adcolony.sdk.a.a("Log.private.warning", new i());
com.adcolony.sdk.a.a("Log.public.error", new j());
com.adcolony.sdk.a.a("Log.private.error", new a());
}
boolean a(JSONObject jSONObject, int i2) {
int f2 = s.f(jSONObject, "send_level");
if (jSONObject.length() == 0) {
f2 = n;
}
return f2 >= i2 && f2 != 4;
}
public void a(HashMap<String, Object> hashMap) {
try {
e0 e0Var = new e0(new t(new URL("https://wd.adcolony.com/logs")), Executors.newSingleThreadScheduledExecutor(), hashMap);
this.d = e0Var;
e0Var.a(5L, TimeUnit.SECONDS);
} catch (MalformedURLException e2) {
e2.printStackTrace();
}
}
public void a(int i2, String str, int i3) {
if (this.d == null) {
return;
}
if (i3 == 3 && a(s.g(this.f874a, Integer.toString(i2)), 3)) {
this.d.a(str);
return;
}
if (i3 == 2 && a(s.g(this.f874a, Integer.toString(i2)), 2)) {
this.d.c(str);
return;
}
if (i3 == 1 && a(s.g(this.f874a, Integer.toString(i2)), 1)) {
this.d.d(str);
} else if (i3 == 0 && a(s.g(this.f874a, Integer.toString(i2)), 0)) {
this.d.b(str);
}
}
JSONObject a(JSONArray jSONArray) {
JSONObject b2 = s.b();
for (int i2 = 0; i2 < jSONArray.length(); i2++) {
JSONObject c2 = s.c(jSONArray, i2);
s.a(b2, Integer.toString(s.f(c2, "id")), c2);
}
return b2;
}
private boolean a(Runnable runnable) {
try {
if (this.b == null || this.b.isShutdown() || this.b.isTerminated()) {
return false;
}
this.b.submit(runnable);
return true;
} catch (RejectedExecutionException unused) {
Log.e("ADCLogError", "Internal error when submitting log to executor service.");
return false;
}
}
public e0 a() {
return this.d;
}
public void b(JSONArray jSONArray) {
this.f874a = a(jSONArray);
}
}