VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce
以下内容为反编译后的 p.java 源代码,内容仅作参考
package com.appodeal.ads.utils;
import android.support.annotation.VisibleForTesting;
import com.appodeal.ads.Appodeal;
import com.vk.sdk.api.VKApiConst;
import java.util.ArrayList;
import org.json.JSONObject;
public class p {
int a;
int b;
int c;
int d;
int e;
int f;
ArrayList<Long> g;
ArrayList<Long> h;
private int i;
private int j;
private int k;
private String l;
private String m;
private String n;
private String o;
public p(JSONObject jSONObject) {
this.a = jSONObject.optInt("click_time");
JSONObject optJSONObject = jSONObject.optJSONObject("show_interval");
if (optJSONObject != null) {
this.b = optJSONObject.optInt("time");
this.c = optJSONObject.optInt(VKApiConst.COUNT);
}
JSONObject optJSONObject2 = jSONObject.optJSONObject("click_interval");
if (optJSONObject2 != null) {
this.d = optJSONObject2.optInt("time");
this.e = optJSONObject2.optInt(VKApiConst.COUNT);
}
this.f = jSONObject.optInt("show_eq_click_count");
this.i = Math.max(this.c + 1, this.f);
this.j = Math.max(this.e + 1, this.f);
this.g = new ArrayList<>(this.i);
this.h = new ArrayList<>(this.j);
}
private String h() {
return this.l != null ? this.l : "";
}
private String i() {
return this.m != null ? this.m : "";
}
private String j() {
return this.n != null ? this.n : "";
}
private String k() {
return this.o != null ? this.o : "";
}
long a() {
if (this.g.isEmpty()) {
return 0L;
}
return this.g.get(this.g.size() - 1).longValue();
}
public void a(int i) {
this.k = i;
}
public void a(long j) {
if (this.g.size() == this.i) {
this.g.remove(0);
}
this.g.add(Long.valueOf(j));
if (c()) {
e("sus_show_interval");
}
}
public void a(String str) {
this.l = str;
}
long b() {
if (this.h.isEmpty()) {
return 0L;
}
return this.h.get(this.h.size() - 1).longValue();
}
public void b(long j) {
if (this.h.size() == this.j) {
this.h.remove(0);
}
this.h.add(Long.valueOf(j));
if (d()) {
e("sus_click_interval");
}
if (e()) {
e("show_eq_click");
}
if (f()) {
e("sus_click");
}
}
public void b(String str) {
this.m = str;
}
public void c(String str) {
this.n = str;
}
boolean c() {
if (!this.g.isEmpty() && this.c != 0 && this.b != 0) {
int size = this.g.size() - 1;
int i = 0;
while (size > 0) {
int i2 = this.g.get(size).longValue() - this.g.get(size + (-1)).longValue() < ((long) this.b) ? i + 1 : i;
if (i2 >= this.c) {
return true;
}
size--;
i = i2;
}
}
return false;
}
public void d(String str) {
this.o = str;
}
boolean d() {
if (!this.h.isEmpty() && this.e != 0 && this.d != 0) {
int size = this.h.size() - 1;
int i = 0;
while (size > 0) {
int i2 = this.h.get(size).longValue() - this.h.get(size + (-1)).longValue() < ((long) this.d) ? i + 1 : i;
size--;
i = i2;
}
if (i >= this.e) {
return true;
}
}
return false;
}
void e(String str) {
try {
if (Appodeal.d != null) {
JSONObject a = c.a(Appodeal.d, k(), this.k, j(), h(), i());
a.put("reason", str);
r.a.execute(new x(a.toString(), g()));
}
} catch (Exception e) {
Appodeal.a(e);
}
}
boolean e() {
if (!this.h.isEmpty() && !this.g.isEmpty() && this.f != 0) {
int size = this.g.size() - 1;
int size2 = this.h.size() - 2;
int i = 0;
int i2 = size;
while (size2 >= 0) {
int i3 = 0;
int i4 = i2;
while (i4 >= 0 && this.g.get(i4).longValue() > this.h.get(size2).longValue()) {
i4--;
i3++;
}
if (i3 != 1) {
return false;
}
int i5 = i + 1;
if (i5 >= this.f) {
return true;
}
size2--;
i = i5;
i2 = i4;
}
if (i + 1 >= this.f) {
return true;
}
}
return false;
}
boolean f() {
return (this.g.isEmpty() || this.h.isEmpty() || b() - a() >= ((long) this.a)) ? false : true;
}
@VisibleForTesting
String g() {
return "http://adwatch.appodeal.com/api/v1/complains/submit";
}
}