Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
package com.applovin.impl.sdk.network;
import androidx.core.app.NotificationCompat;
import com.applovin.impl.gm;
import com.applovin.impl.sdk.EventServiceImpl;
import com.applovin.impl.sdk.j;
import com.applovin.impl.tm;
import com.applovin.impl.yl;
import com.applovin.sdk.AppLovinPostbackListener;
import com.applovin.sdk.AppLovinPostbackService;
import java.util.Map;
/* loaded from: classes2.dex */
public class PostbackServiceImpl implements AppLovinPostbackService {
private final j a;
public PostbackServiceImpl(j jVar) {
this.a = jVar;
}
private boolean a(e eVar) {
Map i = eVar.i();
if (i == null) {
return false;
}
Object obj = i.get(NotificationCompat.CATEGORY_EVENT);
if ("postinstall".equals(obj)) {
obj = i.get("sub_event");
}
return EventServiceImpl.ALLOW_PRE_INIT_EVENT_TYPES.contains(obj);
}
@Override // com.applovin.sdk.AppLovinPostbackService
public void dispatchPostbackAsync(String str, AppLovinPostbackListener appLovinPostbackListener) {
dispatchPostbackRequest(e.b(this.a).b(str).a(false).a(), appLovinPostbackListener);
}
public String toString() {
return "PostbackService{}";
}
public void dispatchPostbackRequest(e eVar, tm.b bVar, AppLovinPostbackListener appLovinPostbackListener) {
gm gmVar = new gm(eVar, bVar, this.a, appLovinPostbackListener);
gmVar.a(a(eVar));
this.a.j0().a((yl) gmVar, bVar);
}
public void dispatchPostbackRequest(e eVar, AppLovinPostbackListener appLovinPostbackListener) {
dispatchPostbackRequest(eVar, tm.b.OTHER, appLovinPostbackListener);
}
}

View File

@@ -0,0 +1,330 @@
package com.applovin.impl.sdk.network;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sj;
import com.applovin.impl.vi;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class a {
private String a;
private String b;
private Map c;
private Map d;
private final JSONObject e;
private String f;
private final Object g;
private final int h;
private int i;
private final int j;
private final int k;
private final boolean l;
private final boolean m;
private final boolean n;
private final boolean o;
private final vi.a p;
private final boolean q;
private final boolean r;
public a(C0040a c0040a) {
this.a = c0040a.b;
this.b = c0040a.a;
this.c = c0040a.d;
this.d = c0040a.e;
this.e = c0040a.f;
this.f = c0040a.c;
this.g = c0040a.g;
int i = c0040a.h;
this.h = i;
this.i = i;
this.j = c0040a.i;
this.k = c0040a.j;
this.l = c0040a.k;
this.m = c0040a.l;
this.n = c0040a.m;
this.o = c0040a.n;
this.p = c0040a.q;
this.q = c0040a.o;
this.r = c0040a.p;
}
public String a() {
return this.f;
}
public void a(int i) {
this.i = i;
}
public void a(String str) {
this.a = str;
}
public JSONObject b() {
return this.e;
}
public void b(String str) {
this.b = str;
}
public int c() {
return this.h - this.i;
}
public Object d() {
return this.g;
}
public vi.a e() {
return this.p;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof a)) {
return false;
}
a aVar = (a) obj;
String str = this.a;
if (str == null ? aVar.a != null : !str.equals(aVar.a)) {
return false;
}
Map map = this.c;
if (map == null ? aVar.c != null : !map.equals(aVar.c)) {
return false;
}
Map map2 = this.d;
if (map2 == null ? aVar.d != null : !map2.equals(aVar.d)) {
return false;
}
String str2 = this.f;
if (str2 == null ? aVar.f != null : !str2.equals(aVar.f)) {
return false;
}
String str3 = this.b;
if (str3 == null ? aVar.b != null : !str3.equals(aVar.b)) {
return false;
}
JSONObject jSONObject = this.e;
if (jSONObject == null ? aVar.e != null : !jSONObject.equals(aVar.e)) {
return false;
}
Object obj2 = this.g;
if (obj2 == null ? aVar.g == null : obj2.equals(aVar.g)) {
return this.h == aVar.h && this.i == aVar.i && this.j == aVar.j && this.k == aVar.k && this.l == aVar.l && this.m == aVar.m && this.n == aVar.n && this.o == aVar.o && this.p == aVar.p && this.q == aVar.q && this.r == aVar.r;
}
return false;
}
public String f() {
return this.a;
}
public Map g() {
return this.d;
}
public String h() {
return this.b;
}
public int hashCode() {
int hashCode = super.hashCode() * 31;
String str = this.a;
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
String str2 = this.f;
int hashCode3 = (hashCode2 + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.b;
int hashCode4 = (hashCode3 + (str3 != null ? str3.hashCode() : 0)) * 31;
Object obj = this.g;
int hashCode5 = ((((((((((((((((((((((hashCode4 + (obj != null ? obj.hashCode() : 0)) * 31) + this.h) * 31) + this.i) * 31) + this.j) * 31) + this.k) * 31) + (this.l ? 1 : 0)) * 31) + (this.m ? 1 : 0)) * 31) + (this.n ? 1 : 0)) * 31) + (this.o ? 1 : 0)) * 31) + this.p.b()) * 31) + (this.q ? 1 : 0)) * 31) + (this.r ? 1 : 0);
Map map = this.c;
if (map != null) {
hashCode5 = (hashCode5 * 31) + map.hashCode();
}
Map map2 = this.d;
if (map2 != null) {
hashCode5 = (hashCode5 * 31) + map2.hashCode();
}
JSONObject jSONObject = this.e;
if (jSONObject == null) {
return hashCode5;
}
char[] charArray = jSONObject.toString().toCharArray();
Arrays.sort(charArray);
return (hashCode5 * 31) + new String(charArray).hashCode();
}
public Map i() {
return this.c;
}
public int j() {
return this.i;
}
public int k() {
return this.k;
}
public int l() {
return this.j;
}
public boolean m() {
return this.o;
}
public boolean n() {
return this.l;
}
public boolean o() {
return this.r;
}
public boolean p() {
return this.m;
}
public boolean q() {
return this.n;
}
public boolean r() {
return this.q;
}
public String toString() {
return "HttpRequest {endpoint=" + this.a + ", backupEndpoint=" + this.f + ", httpMethod=" + this.b + ", httpHeaders=" + this.d + ", body=" + this.e + ", emptyResponse=" + this.g + ", initialRetryAttempts=" + this.h + ", retryAttemptsLeft=" + this.i + ", timeoutMillis=" + this.j + ", retryDelayMillis=" + this.k + ", exponentialRetries=" + this.l + ", retryOnAllErrors=" + this.m + ", retryOnNoConnection=" + this.n + ", encodingEnabled=" + this.o + ", encodingType=" + this.p + ", trackConnectionSpeed=" + this.q + ", gzipBodyEncoding=" + this.r + '}';
}
public static C0040a a(j jVar) {
return new C0040a(jVar);
}
/* renamed from: com.applovin.impl.sdk.network.a$a, reason: collision with other inner class name */
public static class C0040a {
String a;
String b;
String c;
Map e;
JSONObject f;
Object g;
int i;
int j;
boolean k;
boolean m;
boolean n;
boolean o;
boolean p;
vi.a q;
int h = 1;
boolean l = true;
Map d = new HashMap();
public C0040a(j jVar) {
this.i = ((Integer) jVar.a(sj.k3)).intValue();
this.j = ((Integer) jVar.a(sj.j3)).intValue();
this.m = ((Boolean) jVar.a(sj.H3)).booleanValue();
this.n = ((Boolean) jVar.a(sj.o5)).booleanValue();
this.q = vi.a.a(((Integer) jVar.a(sj.p5)).intValue());
this.p = ((Boolean) jVar.a(sj.M5)).booleanValue();
}
public C0040a a(int i) {
this.h = i;
return this;
}
public C0040a a(vi.a aVar) {
this.q = aVar;
return this;
}
public C0040a a(Object obj) {
this.g = obj;
return this;
}
public C0040a a(String str) {
this.c = str;
return this;
}
public C0040a a(Map map) {
this.e = map;
return this;
}
public C0040a a(JSONObject jSONObject) {
this.f = jSONObject;
return this;
}
public C0040a a(boolean z) {
this.n = z;
return this;
}
public C0040a b(int i) {
this.j = i;
return this;
}
public C0040a b(String str) {
this.b = str;
return this;
}
public C0040a b(Map map) {
this.d = map;
return this;
}
public C0040a b(boolean z) {
this.p = z;
return this;
}
public C0040a c(int i) {
this.i = i;
return this;
}
public C0040a c(String str) {
this.a = str;
return this;
}
public C0040a c(boolean z) {
this.k = z;
return this;
}
public C0040a d(boolean z) {
this.l = z;
return this;
}
public C0040a e(boolean z) {
this.m = z;
return this;
}
public C0040a f(boolean z) {
this.o = z;
return this;
}
public a a() {
return new a(this);
}
}
}

View File

@@ -0,0 +1,306 @@
package com.applovin.impl.sdk.network;
import android.content.Intent;
import android.content.IntentFilter;
import android.text.TextUtils;
import com.applovin.impl.gc;
import com.applovin.impl.jn;
import com.applovin.impl.sdk.AppLovinBroadcastManager;
import com.applovin.impl.sdk.SessionTracker;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sj;
import com.applovin.impl.tm;
import com.applovin.impl.yl;
import com.applovin.impl.yp;
import com.applovin.sdk.AppLovinPostbackListener;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class b implements AppLovinBroadcastManager.Receiver {
private final j a;
private final n b;
private final int c;
private final c d;
private final Object f = new Object();
private final List g;
private final Set h;
private final List i;
public class a implements AppLovinPostbackListener {
final /* synthetic */ d a;
final /* synthetic */ AppLovinPostbackListener b;
public a(d dVar, AppLovinPostbackListener appLovinPostbackListener) {
this.a = dVar;
this.b = appLovinPostbackListener;
}
@Override // com.applovin.sdk.AppLovinPostbackListener
public void onPostbackFailure(String str, int i) {
n unused = b.this.b;
if (n.a()) {
b.this.b.d("PersistentPostbackManager", "Failed to submit postback: " + this.a + " with error code: " + i + "; will retry later...");
}
b.this.d(this.a);
gc.a(this.b, str, i);
if (this.a.c() == 1) {
b.this.a.E().a("dispatchPostback", str, i);
}
}
@Override // com.applovin.sdk.AppLovinPostbackListener
public void onPostbackSuccess(String str) {
b.this.a(this.a);
n unused = b.this.b;
if (n.a()) {
b.this.b.a("PersistentPostbackManager", "Successfully submit postback: " + this.a);
}
b.this.c();
gc.a(this.b, str);
}
}
public b(j jVar) {
ArrayList arrayList = new ArrayList();
this.g = arrayList;
this.h = new HashSet();
this.i = new ArrayList();
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
this.a = jVar;
this.b = jVar.J();
int intValue = ((Integer) jVar.a(sj.c3)).intValue();
this.c = intValue;
if (!((Boolean) jVar.a(sj.f3)).booleanValue()) {
this.d = null;
return;
}
c cVar = new c(this, jVar);
this.d = cVar;
if (yp.a(sj.m1, jVar) && yp.h()) {
a(new Runnable() { // from class: com.applovin.impl.sdk.network.b$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
b.this.f();
}
}, true, true);
} else {
arrayList.addAll(cVar.a(intValue));
}
AppLovinBroadcastManager.registerReceiver(this, new IntentFilter(SessionTracker.ACTION_APPLICATION_PAUSED));
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void f() {
synchronized (this.f) {
this.g.addAll(0, this.d.a(this.c));
}
}
public List d() {
ArrayList arrayList = new ArrayList();
synchronized (this.f) {
try {
if (((Boolean) this.a.a(sj.e3)).booleanValue()) {
arrayList.ensureCapacity(this.i.size());
arrayList.addAll(this.i);
} else {
arrayList.ensureCapacity(this.g.size());
arrayList.addAll(this.g);
}
} catch (Throwable th) {
throw th;
}
}
return arrayList;
}
public void e(d dVar) {
a(dVar, true);
}
@Override // com.applovin.impl.sdk.AppLovinBroadcastManager.Receiver
public void onReceive(Intent intent, Map map) {
this.a.j0().a((yl) this.d, tm.b.OTHER);
}
private void c(d dVar) {
synchronized (this.f) {
while (this.g.size() > this.c) {
try {
this.g.remove(0);
} catch (Throwable th) {
throw th;
}
}
this.g.add(dVar);
}
if (n.a()) {
this.b.a("PersistentPostbackManager", "Enqueued postback: " + dVar);
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void e() {
synchronized (this.f) {
try {
Iterator it = new ArrayList(this.g).iterator();
while (it.hasNext()) {
b((d) it.next());
}
} catch (Throwable th) {
throw th;
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void b(d dVar, AppLovinPostbackListener appLovinPostbackListener) {
synchronized (this.f) {
c(dVar);
a(dVar, appLovinPostbackListener);
}
}
public void a(d dVar, boolean z) {
a(dVar, z, (AppLovinPostbackListener) null);
}
public void a(final d dVar, boolean z, final AppLovinPostbackListener appLovinPostbackListener) {
if (TextUtils.isEmpty(dVar.k())) {
if (n.a()) {
this.b.b("PersistentPostbackManager", "Requested a postback dispatch for empty URL; nothing to do...");
}
} else {
if (z) {
dVar.a();
}
a(new Runnable() { // from class: com.applovin.impl.sdk.network.b$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
b.this.b(dVar, appLovinPostbackListener);
}
}, yp.h(), dVar.m());
}
}
public void b() {
a(new Runnable() { // from class: com.applovin.impl.sdk.network.b$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
b.this.e();
}
}, true, false);
}
private void b(d dVar) {
a(dVar, (AppLovinPostbackListener) null);
}
/* JADX INFO: Access modifiers changed from: private */
public void c() {
synchronized (this.f) {
try {
Iterator it = this.i.iterator();
while (it.hasNext()) {
b((d) it.next());
}
this.i.clear();
} catch (Throwable th) {
throw th;
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void d(d dVar) {
synchronized (this.f) {
this.h.remove(dVar);
this.i.add(dVar);
}
}
public void a() {
synchronized (this.f) {
this.g.clear();
this.i.clear();
}
this.a.j0().a((yl) this.d, tm.b.OTHER);
}
private void a(d dVar, AppLovinPostbackListener appLovinPostbackListener) {
if (n.a()) {
this.b.a("PersistentPostbackManager", "Preparing to submit postback: " + dVar);
}
if (this.a.x0() && !dVar.m()) {
if (n.a()) {
this.b.a("PersistentPostbackManager", "Skipping postback dispatch because SDK is still initializing - postback will be dispatched afterwards");
return;
}
return;
}
if (TextUtils.isEmpty(dVar.k())) {
if (n.a()) {
this.b.b("PersistentPostbackManager", "Skipping empty postback dispatch...");
return;
}
return;
}
synchronized (this.f) {
try {
if (this.h.contains(dVar)) {
if (n.a()) {
this.b.a("PersistentPostbackManager", "Skipping in progress postback: " + dVar.k());
}
return;
}
dVar.l();
Integer num = (Integer) this.a.a(sj.b3);
if (dVar.c() > num.intValue()) {
if (n.a()) {
this.b.k("PersistentPostbackManager", "Exceeded maximum persisted attempt count of " + num + ". Dequeuing postback: " + dVar);
}
a(dVar);
return;
}
synchronized (this.f) {
this.h.add(dVar);
}
e a2 = e.b(this.a).b(dVar.k()).a(dVar.d()).b(dVar.i()).c(dVar.h()).a(dVar.g()).a(dVar.j() != null ? new JSONObject(dVar.j()) : null).b(dVar.o()).a(dVar.n()).a(dVar.f()).h(dVar.p()).e(dVar.e()).a();
if (n.a()) {
this.b.a("PersistentPostbackManager", "Submitting postback: " + dVar);
}
this.a.Y().dispatchPostbackRequest(a2, new a(dVar, appLovinPostbackListener));
} catch (Throwable th) {
throw th;
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void a(d dVar) {
synchronized (this.f) {
this.h.remove(dVar);
this.g.remove(dVar);
}
if (n.a()) {
this.b.a("PersistentPostbackManager", "Dequeued postback: " + dVar);
}
}
private void a(Runnable runnable, boolean z, boolean z2) {
if (z) {
this.a.j0().a((yl) new jn(this.a, z2, "runPostbackTask", runnable), tm.b.OTHER);
} else {
runnable.run();
}
}
}

View File

@@ -0,0 +1,132 @@
package com.applovin.impl.sdk.network;
import android.text.TextUtils;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.l;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sj;
import com.applovin.impl.yl;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class c extends yl {
private final b h;
private final n i;
private AtomicBoolean j;
private boolean k;
public c(b bVar, j jVar) {
super("PersistentPostbackQueueSaveTask", jVar);
this.j = new AtomicBoolean();
this.k = false;
this.h = bVar;
this.i = jVar.J();
}
public List a(int i) {
ArrayList arrayList = new ArrayList();
l B = this.a.B();
if (!B.b("persistent_postback_cache.json", j.l())) {
n.h("PersistentPostbackQueueSaveTask", "Postbacks queue file does not exist.");
return arrayList;
}
File a = B.a("persistent_postback_cache.json", j.l());
String e = B.e(a);
if (TextUtils.isEmpty(e)) {
n.h("PersistentPostbackQueueSaveTask", "Postbacks queue file has no content.");
return arrayList;
}
boolean z = false;
try {
JSONArray jSONArray = new JSONObject(e).getJSONArray("pb");
if (n.a()) {
this.i.a("PersistentPostbackQueueSaveTask", "Deserializing " + jSONArray.length() + " postback(s)...");
}
arrayList.ensureCapacity(Math.max(1, jSONArray.length()));
Integer num = (Integer) this.a.a(sj.b3);
for (int i2 = 0; i2 < jSONArray.length() && arrayList.size() < i; i2++) {
try {
d dVar = new d(jSONArray.getJSONObject(i2), this.a);
if (dVar.c() < num.intValue()) {
arrayList.add(dVar);
} else {
n.h("PersistentPostbackQueueSaveTask", "Skipping deserialization because maximum attempt count exceeded for postback: " + dVar);
}
} catch (Throwable th) {
n.c("PersistentPostbackQueueSaveTask", "Unable to deserialize postback from json", th);
this.a.E().a("PersistentPostbackQueueSaveTask", "deserializePostback", th);
}
}
if (n.a()) {
this.i.a("PersistentPostbackQueueSaveTask", "Successfully loaded postback queue with " + arrayList.size() + " postback(s).");
}
} catch (Throwable th2) {
try {
n.c("PersistentPostbackQueueSaveTask", "Failed to load postback queue", th2);
try {
this.a.E().a("PersistentPostbackQueueSaveTask", "deserializePostbackQueue", th2);
if (((Boolean) this.a.a(sj.g1)).booleanValue()) {
B.a(a, "removeAfterDeserializationFail");
}
} catch (Throwable th3) {
th = th3;
z = true;
if (z && ((Boolean) this.a.a(sj.g1)).booleanValue()) {
B.a(a, "removeAfterDeserializationFail");
}
throw th;
}
} catch (Throwable th4) {
th = th4;
}
}
this.k = arrayList.isEmpty();
return arrayList;
}
@Override // java.lang.Runnable
public void run() {
a(this.h.d());
}
private void a(List list) {
if (!(this.k && list.isEmpty()) && this.j.compareAndSet(false, true)) {
JSONArray jSONArray = new JSONArray();
Iterator it = list.iterator();
while (it.hasNext()) {
d dVar = (d) it.next();
try {
jSONArray.put(dVar.q());
} catch (Throwable th) {
n.c("PersistentPostbackQueueSaveTask", "Unable to serialize postback to JSON: " + dVar, th);
this.a.E().a("PersistentPostbackQueueSaveTask", "serializePostback", th);
}
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("pb", jSONArray);
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(jSONObject.toString().getBytes("UTF-8"));
l B = this.a.B();
if (B.a((InputStream) byteArrayInputStream, B.a("persistent_postback_cache.json", j.l()), true)) {
if (n.a()) {
this.i.a("PersistentPostbackQueueSaveTask", "Exported postback queue to disk.");
}
} else if (n.a()) {
this.i.b("PersistentPostbackQueueSaveTask", "Unable to export postback queue to disk.");
}
} catch (Throwable th2) {
n.c("PersistentPostbackQueueSaveTask", "Unable to export postbacks to disk: " + jSONArray, th2);
this.a.E().a("PersistentPostbackQueueSaveTask", "serializePostbackQueue", th2);
}
this.j.set(false);
}
}
}

View File

@@ -0,0 +1,259 @@
package com.applovin.impl.sdk.network;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.vi;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class d {
private String a;
private String b;
private String c;
private String d;
private Map e;
private Map f;
private Map g;
private vi.a h;
private boolean i;
private boolean j;
private boolean k;
private boolean l;
private String m;
private int n;
public static b b() {
return new b();
}
public void a() {
Map map = CollectionUtils.map(this.e);
map.put("postback_ts", String.valueOf(System.currentTimeMillis()));
this.e = map;
}
public int c() {
return this.n;
}
public String d() {
return this.d;
}
public String e() {
return this.m;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
return this.a.equals(((d) obj).a);
}
public vi.a f() {
return this.h;
}
public Map g() {
return this.f;
}
public String h() {
return this.b;
}
public int hashCode() {
return this.a.hashCode();
}
public Map i() {
return this.e;
}
public Map j() {
return this.g;
}
public String k() {
return this.c;
}
public void l() {
this.n++;
}
public boolean m() {
return this.k;
}
public boolean n() {
return this.i;
}
public boolean o() {
return this.j;
}
public boolean p() {
return this.l;
}
public JSONObject q() {
JSONObject jSONObject = new JSONObject();
jSONObject.put("uniqueId", this.a);
jSONObject.put("communicatorRequestId", this.m);
jSONObject.put("httpMethod", this.b);
jSONObject.put("targetUrl", this.c);
jSONObject.put("backupUrl", this.d);
jSONObject.put("encodingType", this.h);
jSONObject.put("isEncodingEnabled", this.i);
jSONObject.put("gzipBodyEncoding", this.j);
jSONObject.put("isAllowedPreInitEvent", this.k);
jSONObject.put("attemptNumber", this.n);
if (this.e != null) {
jSONObject.put("parameters", new JSONObject(this.e));
}
if (this.f != null) {
jSONObject.put("httpHeaders", new JSONObject(this.f));
}
if (this.g != null) {
jSONObject.put("requestBody", new JSONObject(this.g));
}
return jSONObject;
}
public String toString() {
return "PostbackRequest{uniqueId='" + this.a + "', communicatorRequestId='" + this.m + "', httpMethod='" + this.b + "', targetUrl='" + this.c + "', backupUrl='" + this.d + "', attemptNumber=" + this.n + ", isEncodingEnabled=" + this.i + ", isGzipBodyEncoding=" + this.j + ", isAllowedPreInitEvent=" + this.k + ", shouldFireInWebView=" + this.l + '}';
}
public d(JSONObject jSONObject, j jVar) {
String string = JsonUtils.getString(jSONObject, "uniqueId", UUID.randomUUID().toString());
String string2 = JsonUtils.getString(jSONObject, "communicatorRequestId", "");
String string3 = JsonUtils.getString(jSONObject, "httpMethod", "");
String string4 = jSONObject.getString("targetUrl");
String string5 = JsonUtils.getString(jSONObject, "backupUrl", "");
int i = jSONObject.getInt("attemptNumber");
Map synchronizedMap = JsonUtils.valueExists(jSONObject, "parameters") ? Collections.synchronizedMap(JsonUtils.toStringMap(jSONObject.getJSONObject("parameters"))) : new HashMap();
Map synchronizedMap2 = JsonUtils.valueExists(jSONObject, "httpHeaders") ? Collections.synchronizedMap(JsonUtils.toStringMap(jSONObject.getJSONObject("httpHeaders"))) : new HashMap();
Map synchronizedMap3 = JsonUtils.valueExists(jSONObject, "requestBody") ? Collections.synchronizedMap(JsonUtils.toStringObjectMap(jSONObject.getJSONObject("requestBody"))) : new HashMap();
this.a = string;
this.b = string3;
this.m = string2;
this.c = string4;
this.d = string5;
this.e = synchronizedMap;
this.f = synchronizedMap2;
this.g = synchronizedMap3;
this.h = vi.a.a(jSONObject.optInt("encodingType", vi.a.DEFAULT.b()));
this.i = jSONObject.optBoolean("isEncodingEnabled", false);
this.j = jSONObject.optBoolean("gzipBodyEncoding", false);
this.k = jSONObject.optBoolean("isAllowedPreInitEvent", false);
this.l = jSONObject.optBoolean("shouldFireInWebView", false);
this.n = i;
}
private d(b bVar) {
this.a = UUID.randomUUID().toString();
this.b = bVar.b;
this.c = bVar.c;
this.d = bVar.d;
this.e = bVar.e;
this.f = bVar.f;
this.g = bVar.g;
this.h = bVar.h;
this.i = bVar.i;
this.j = bVar.j;
this.k = bVar.k;
this.l = bVar.l;
this.m = bVar.a;
this.n = 0;
}
public static class b {
private String a;
private String b;
private String c;
private String d;
private Map e;
private Map f;
private Map g;
private vi.a h;
private boolean i;
private boolean j;
private boolean k;
private boolean l;
public b a(vi.a aVar) {
this.h = aVar;
return this;
}
public b a(String str) {
this.d = str;
return this;
}
public b a(Map map) {
this.f = map;
return this;
}
public b a(boolean z) {
this.i = z;
return this;
}
public b b(String str) {
this.a = str;
return this;
}
public b b(Map map) {
this.e = map;
return this;
}
public b b(boolean z) {
this.l = z;
return this;
}
public b c(String str) {
this.b = str;
return this;
}
public b c(Map map) {
this.g = map;
return this;
}
public b c(boolean z) {
this.j = z;
return this;
}
public b d(String str) {
this.c = str;
return this;
}
public b d(boolean z) {
this.k = z;
return this;
}
public d a() {
return new d(this);
}
}
}

View File

@@ -0,0 +1,155 @@
package com.applovin.impl.sdk.network;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.network.a;
import com.applovin.impl.sj;
import com.applovin.impl.vi;
import java.util.Map;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class e extends com.applovin.impl.sdk.network.a {
private String s;
private boolean t;
public e(a aVar) {
super(aVar);
this.s = aVar.r;
this.t = aVar.s;
}
public static a b(j jVar) {
return new a(jVar);
}
public String s() {
return this.s;
}
public boolean t() {
return this.s != null;
}
public boolean u() {
return this.t;
}
public static class a extends a.C0040a {
private String r;
private boolean s;
public a(j jVar) {
super(jVar);
this.h = ((Integer) jVar.a(sj.a3)).intValue();
this.i = ((Integer) jVar.a(sj.Z2)).intValue();
this.j = ((Integer) jVar.a(sj.j3)).intValue();
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public a a(vi.a aVar) {
this.q = aVar;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public a a(Object obj) {
this.g = obj;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public a a(JSONObject jSONObject) {
this.f = jSONObject;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: c, reason: merged with bridge method [inline-methods] */
public a a(Map map) {
this.e = map;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: d, reason: merged with bridge method [inline-methods] */
public a a(int i) {
this.h = i;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: d, reason: merged with bridge method [inline-methods] */
public a a(String str) {
this.c = str;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: d, reason: merged with bridge method [inline-methods] */
public a b(Map map) {
this.d = map;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: e, reason: merged with bridge method [inline-methods] */
public a b(int i) {
this.j = i;
return this;
}
public a e(String str) {
this.r = str;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: f, reason: merged with bridge method [inline-methods] */
public a c(int i) {
this.i = i;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: f, reason: merged with bridge method [inline-methods] */
public a b(String str) {
this.b = str;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: g, reason: merged with bridge method [inline-methods] */
public a c(String str) {
this.a = str;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: g, reason: merged with bridge method [inline-methods] */
public a a(boolean z) {
this.n = z;
return this;
}
public a h(boolean z) {
this.s = z;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: i, reason: merged with bridge method [inline-methods] */
public a b(boolean z) {
this.p = z;
return this;
}
@Override // com.applovin.impl.sdk.network.a.C0040a
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public e a() {
return new e(this);
}
}
}