- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
199 lines
5.9 KiB
Java
199 lines
5.9 KiB
Java
package com.ironsource.sdk.controller;
|
|
|
|
import com.ironsource.fc;
|
|
import com.ironsource.hc;
|
|
import com.ironsource.hn;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mj;
|
|
import com.ironsource.nj;
|
|
import com.ironsource.oj;
|
|
import com.ironsource.rf;
|
|
import com.ironsource.sdk.utils.IronSourceStorageUtils;
|
|
import com.ironsource.zf;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
class j {
|
|
private final String a;
|
|
private final hc b;
|
|
|
|
public class a implements hn {
|
|
final /* synthetic */ oj a;
|
|
final /* synthetic */ nj b;
|
|
|
|
public a(oj ojVar, nj njVar) {
|
|
this.a = ojVar;
|
|
this.b = njVar;
|
|
}
|
|
|
|
@Override // com.ironsource.hn
|
|
public void a(zf zfVar) {
|
|
try {
|
|
oj ojVar = this.a;
|
|
nj njVar = this.b;
|
|
ojVar.b(njVar, j.this.a(njVar, zfVar.a()));
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.hn
|
|
public void a(zf zfVar, rf rfVar) {
|
|
try {
|
|
oj ojVar = this.a;
|
|
nj njVar = this.b;
|
|
ojVar.a(njVar, j.this.a(njVar, rfVar.b()));
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
}
|
|
}
|
|
}
|
|
|
|
public j(String str, hc hcVar) {
|
|
this.a = str;
|
|
this.b = hcVar;
|
|
}
|
|
|
|
private hn a(nj njVar, oj ojVar) {
|
|
return new a(ojVar, njVar);
|
|
}
|
|
|
|
private zf a(JSONObject jSONObject, String str) throws Exception {
|
|
if (jSONObject.has(fc.c.d)) {
|
|
return new zf(IronSourceStorageUtils.buildAbsolutePathToDirInCache(str, jSONObject.getString(fc.c.d)));
|
|
}
|
|
throw new Exception(fc.a.b);
|
|
}
|
|
|
|
private JSONObject a(nj njVar, long j) {
|
|
try {
|
|
return njVar.e().put("result", j);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return new JSONObject();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public JSONObject a(nj njVar, String str) {
|
|
try {
|
|
return njVar.e().put("errMsg", str);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return new JSONObject();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public JSONObject a(nj njVar, JSONObject jSONObject) {
|
|
try {
|
|
return njVar.e().put("result", jSONObject);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return new JSONObject();
|
|
}
|
|
}
|
|
|
|
private zf b(JSONObject jSONObject, String str) throws Exception {
|
|
if (!jSONObject.has(fc.c.c) || !jSONObject.has(fc.c.b)) {
|
|
throw new Exception(fc.a.a);
|
|
}
|
|
String string = jSONObject.getString(fc.c.c);
|
|
return new zf(IronSourceStorageUtils.buildAbsolutePathToDirInCache(str, string), jSONObject.getString(fc.c.b));
|
|
}
|
|
|
|
public void a(JSONObject jSONObject, mj mjVar) {
|
|
char c;
|
|
JSONObject a2;
|
|
JSONObject jSONObject2;
|
|
nj njVar = new nj(jSONObject);
|
|
oj ojVar = new oj(mjVar);
|
|
try {
|
|
String b = njVar.b();
|
|
JSONObject c2 = njVar.c();
|
|
zf b2 = b(c2, this.a);
|
|
IronSourceStorageUtils.ensurePathSafety(b2, this.a);
|
|
switch (b.hashCode()) {
|
|
case -2073025383:
|
|
if (b.equals(fc.b.a)) {
|
|
c = 0;
|
|
break;
|
|
}
|
|
c = 65535;
|
|
break;
|
|
case -1137024519:
|
|
if (b.equals(fc.b.c)) {
|
|
c = 2;
|
|
break;
|
|
}
|
|
c = 65535;
|
|
break;
|
|
case -318115535:
|
|
if (b.equals(fc.b.e)) {
|
|
c = 4;
|
|
break;
|
|
}
|
|
c = 65535;
|
|
break;
|
|
case 537556755:
|
|
if (b.equals(fc.b.f)) {
|
|
c = 5;
|
|
break;
|
|
}
|
|
c = 65535;
|
|
break;
|
|
case 1764172231:
|
|
if (b.equals(fc.b.b)) {
|
|
c = 1;
|
|
break;
|
|
}
|
|
c = 65535;
|
|
break;
|
|
case 1953259713:
|
|
if (b.equals(fc.b.d)) {
|
|
c = 3;
|
|
break;
|
|
}
|
|
c = 65535;
|
|
break;
|
|
default:
|
|
c = 65535;
|
|
break;
|
|
}
|
|
if (c == 0) {
|
|
this.b.a(b2, c2.optString(fc.c.a), c2.optInt("connectionTimeout"), c2.optInt("readTimeout"), a(njVar, ojVar));
|
|
return;
|
|
}
|
|
if (c == 1) {
|
|
this.b.a(b2);
|
|
a2 = b2.a();
|
|
} else if (c == 2) {
|
|
this.b.b(b2);
|
|
a2 = b2.a();
|
|
} else if (c == 3) {
|
|
a2 = this.b.c(b2);
|
|
} else if (c == 4) {
|
|
jSONObject2 = a(njVar, this.b.d(b2));
|
|
ojVar.b(njVar, jSONObject2);
|
|
} else {
|
|
if (c != 5) {
|
|
return;
|
|
}
|
|
this.b.a(b2, c2.optJSONObject(fc.c.g));
|
|
a2 = b2.a();
|
|
}
|
|
jSONObject2 = a(njVar, a2);
|
|
ojVar.b(njVar, jSONObject2);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
ojVar.a(njVar, a(njVar, e.getMessage()));
|
|
}
|
|
}
|
|
}
|