- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
78 lines
2.6 KiB
Java
78 lines
2.6 KiB
Java
package com.ironsource;
|
|
|
|
import android.content.Context;
|
|
import com.ironsource.cr;
|
|
import com.ironsource.mediationsdk.utils.IronSourceUtils;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class ch {
|
|
public static final a a = new a(null);
|
|
|
|
@SourceDebugExtension({"SMAP\nInitServerResponse.kt\nKotlin\n*S Kotlin\n*F\n+ 1 InitServerResponse.kt\ncom/ironsource/mediationsdk/InitServerResponse$Companion\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,56:1\n1#2:57\n*E\n"})
|
|
public static final class a {
|
|
private a() {
|
|
}
|
|
|
|
public /* synthetic */ a(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private final JSONObject a(Context context) {
|
|
try {
|
|
return new JSONObject(IronSourceUtils.getLastResponse(context));
|
|
} catch (JSONException unused) {
|
|
return new JSONObject();
|
|
}
|
|
}
|
|
|
|
public final boolean b(Context context) {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
x7 d = d(context);
|
|
return d.d().length() > 0 && d.e().length() > 0;
|
|
}
|
|
|
|
public final cr c(Context context) {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
x7 d = d(context);
|
|
if (d.d().length() <= 0 || d.e().length() <= 0) {
|
|
d = null;
|
|
}
|
|
if (d == null) {
|
|
return null;
|
|
}
|
|
cr crVar = new cr(context, d.d(), d.f(), d.e());
|
|
crVar.a(cr.a.CACHE);
|
|
return crVar;
|
|
}
|
|
|
|
public final x7 d(Context context) {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
JSONObject a = a(context);
|
|
String cachedAppKey = a.optString("appKey");
|
|
String cachedUserId = a.optString("userId");
|
|
String cachedSettings = a.optString(cr.n);
|
|
Intrinsics.checkNotNullExpressionValue(cachedAppKey, "cachedAppKey");
|
|
Intrinsics.checkNotNullExpressionValue(cachedUserId, "cachedUserId");
|
|
Intrinsics.checkNotNullExpressionValue(cachedSettings, "cachedSettings");
|
|
return new x7(cachedAppKey, cachedUserId, cachedSettings);
|
|
}
|
|
}
|
|
|
|
public static final boolean a(Context context) {
|
|
return a.b(context);
|
|
}
|
|
|
|
public static final cr b(Context context) {
|
|
return a.c(context);
|
|
}
|
|
|
|
public static final x7 c(Context context) {
|
|
return a.d(context);
|
|
}
|
|
}
|