- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
107 lines
3.5 KiB
Java
107 lines
3.5 KiB
Java
package com.applovin.impl;
|
|
|
|
import com.applovin.impl.d4;
|
|
import com.applovin.impl.sdk.utils.JsonUtils;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class mn extends in {
|
|
public abstract void a(fh fhVar);
|
|
|
|
public abstract boolean h();
|
|
|
|
public mn(String str, com.applovin.impl.sdk.j jVar) {
|
|
super(str, jVar);
|
|
}
|
|
|
|
public class a implements d4.e {
|
|
public a() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.d4.e
|
|
public void a(String str, int i, String str2, JSONObject jSONObject) {
|
|
if (mn.this.h()) {
|
|
com.applovin.impl.sdk.n nVar = mn.this.c;
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
mn mnVar = mn.this;
|
|
mnVar.c.b(mnVar.b, "Reward validation failed with error code " + i + " but task was cancelled already");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
com.applovin.impl.sdk.n nVar2 = mn.this.c;
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
mn mnVar2 = mn.this;
|
|
mnVar2.c.b(mnVar2.b, "Reward validation failed with code " + i + " and error: " + str2);
|
|
}
|
|
mn.this.a(i);
|
|
}
|
|
|
|
@Override // com.applovin.impl.d4.e
|
|
public void a(String str, JSONObject jSONObject, int i) {
|
|
if (mn.this.h()) {
|
|
com.applovin.impl.sdk.n nVar = mn.this.c;
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
mn mnVar = mn.this;
|
|
mnVar.c.b(mnVar.b, "Reward validation succeeded with code " + i + " but task was cancelled already");
|
|
}
|
|
com.applovin.impl.sdk.n nVar2 = mn.this.c;
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
mn mnVar2 = mn.this;
|
|
mnVar2.c.b(mnVar2.b, "Response: " + jSONObject);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
com.applovin.impl.sdk.n nVar3 = mn.this.c;
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
mn mnVar3 = mn.this;
|
|
mnVar3.c.a(mnVar3.b, "Reward validation succeeded with code " + i + " and response: " + jSONObject);
|
|
}
|
|
mn.this.c(jSONObject);
|
|
}
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
a(e(), new a());
|
|
}
|
|
|
|
@Override // com.applovin.impl.in
|
|
public int g() {
|
|
return ((Integer) this.a.a(sj.t1)).intValue();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void c(JSONObject jSONObject) {
|
|
fh b = b(jSONObject);
|
|
a(b);
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.c.a(this.b, "Pending reward handled: " + b);
|
|
}
|
|
}
|
|
|
|
private fh b(JSONObject jSONObject) {
|
|
Map<String, String> emptyMap;
|
|
String str;
|
|
JSONObject jSONObject2 = JsonUtils.getJSONObject(JsonUtils.getJSONArray(jSONObject, "results", new JSONArray()), 0, new JSONObject());
|
|
e4.c(jSONObject2, this.a);
|
|
e4.b(jSONObject, this.a);
|
|
e4.a(jSONObject, this.a);
|
|
try {
|
|
emptyMap = JsonUtils.toStringMap((JSONObject) jSONObject2.get("params"));
|
|
} catch (Throwable unused) {
|
|
emptyMap = Collections.emptyMap();
|
|
}
|
|
try {
|
|
str = jSONObject2.getString("result");
|
|
} catch (Throwable unused2) {
|
|
str = "network_timeout";
|
|
}
|
|
return fh.a(str, emptyMap);
|
|
}
|
|
}
|