Pdf Converter v5.0版本的 MD5 值为:258149214e8277c73fa6b365aba312ef
以下内容为反编译后的 k1.java 源代码,内容仅作参考
package d7;
import android.app.Application;
import android.os.Handler;
import android.util.JsonReader;
import android.util.JsonWriter;
import android.webkit.WebSettings;
import com.google.android.gms.internal.ads.n51;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.concurrent.Executor;
public final class k1 {
public final Application f16372a;
public final Handler f16373b;
public final Executor f16374c;
public final i f16375d;
public final n f16376e;
public final g1 f16377f;
public final d4.f f16378g;
public final d1 f16379h;
public k1(Application application, Handler handler, g0 g0Var, i iVar, n nVar, g1 g1Var, d4.f fVar, d1 d1Var) {
this.f16372a = application;
this.f16373b = handler;
this.f16374c = g0Var;
this.f16375d = iVar;
this.f16376e = nVar;
this.f16377f = g1Var;
this.f16378g = fVar;
this.f16379h = d1Var;
}
public final c0 a(a0 a0Var) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("https://fundingchoicesmessages.google.com/a/consent").openConnection();
httpURLConnection.setRequestProperty("User-Agent", WebSettings.getDefaultUserAgent(this.f16372a));
httpURLConnection.setConnectTimeout(10000);
httpURLConnection.setReadTimeout(30000);
httpURLConnection.setDoOutput(true);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setRequestProperty("Content-Type", "application/json");
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpURLConnection.getOutputStream(), "UTF-8");
try {
JsonWriter jsonWriter = new JsonWriter(outputStreamWriter);
jsonWriter.beginObject();
String str = a0Var.f16297a;
if (str != null) {
jsonWriter.name("admob_app_id");
jsonWriter.value(str);
}
String str2 = a0Var.f16298b;
if (str2 != null) {
jsonWriter.name("adid");
jsonWriter.value(str2);
}
y yVar = a0Var.f16299c;
if (yVar != null) {
jsonWriter.name("device_info");
jsonWriter.beginObject();
int i10 = yVar.f16462c;
if (i10 != 1) {
jsonWriter.name("os_type");
int i11 = i10 - 1;
if (i11 == 0) {
jsonWriter.value("UNKNOWN");
} else if (i11 == 1) {
jsonWriter.value("ANDROID");
}
}
String str3 = yVar.f16460a;
if (str3 != null) {
jsonWriter.name("model");
jsonWriter.value(str3);
}
Integer num = yVar.f16461b;
if (num != null) {
jsonWriter.name("android_api_level");
jsonWriter.value(num);
}
jsonWriter.endObject();
}
String str4 = a0Var.f16300d;
if (str4 != null) {
jsonWriter.name("language_code");
jsonWriter.value(str4);
}
Boolean bool = a0Var.f16301e;
if (bool != null) {
jsonWriter.name("tag_for_under_age_of_consent");
jsonWriter.value(bool.booleanValue());
}
Map map = a0Var.f16302f;
if (!map.isEmpty()) {
jsonWriter.name("stored_infos_map");
jsonWriter.beginObject();
for (Map.Entry entry : map.entrySet()) {
jsonWriter.name((String) entry.getKey());
jsonWriter.value((String) entry.getValue());
}
jsonWriter.endObject();
}
n51 n51Var = a0Var.f16303g;
if (n51Var != null) {
jsonWriter.name("screen_info");
jsonWriter.beginObject();
Integer num2 = (Integer) n51Var.f9181r;
if (num2 != null) {
jsonWriter.name("width");
jsonWriter.value(num2);
}
Integer num3 = (Integer) n51Var.f9182s;
if (num3 != null) {
jsonWriter.name("height");
jsonWriter.value(num3);
}
Double d10 = (Double) n51Var.f9183t;
if (d10 != null) {
jsonWriter.name("density");
jsonWriter.value(d10);
}
List<z> list = (List) n51Var.f9184u;
if (!list.isEmpty()) {
jsonWriter.name("screen_insets");
jsonWriter.beginArray();
for (z zVar : list) {
jsonWriter.beginObject();
Integer num4 = zVar.f16466a;
if (num4 != null) {
jsonWriter.name("top");
jsonWriter.value(num4);
}
Integer num5 = zVar.f16467b;
if (num5 != null) {
jsonWriter.name("left");
jsonWriter.value(num5);
}
Integer num6 = zVar.f16468c;
if (num6 != null) {
jsonWriter.name("right");
jsonWriter.value(num6);
}
Integer num7 = zVar.f16469d;
if (num7 != null) {
jsonWriter.name("bottom");
jsonWriter.value(num7);
}
jsonWriter.endObject();
}
jsonWriter.endArray();
}
jsonWriter.endObject();
}
j5.c0 c0Var = a0Var.f16304h;
if (c0Var != null) {
jsonWriter.name("app_info");
jsonWriter.beginObject();
String str5 = (String) c0Var.f19446s;
if (str5 != null) {
jsonWriter.name("package_name");
jsonWriter.value(str5);
}
String str6 = (String) c0Var.f19447t;
if (str6 != null) {
jsonWriter.name("publisher_display_name");
jsonWriter.value(str6);
}
String str7 = (String) c0Var.f19448u;
if (str7 != null) {
jsonWriter.name("version");
jsonWriter.value(str7);
}
jsonWriter.endObject();
}
c6.e eVar = a0Var.f16305i;
if (eVar != null) {
jsonWriter.name("sdk_info");
jsonWriter.beginObject();
String str8 = eVar.f3419a;
if (str8 != null) {
jsonWriter.name("version");
jsonWriter.value(str8);
}
jsonWriter.endObject();
}
List<x> list2 = a0Var.f16306j;
if (!list2.isEmpty()) {
jsonWriter.name("debug_params");
jsonWriter.beginArray();
for (x xVar : list2) {
int ordinal = xVar.ordinal();
if (ordinal == 0) {
jsonWriter.value("DEBUG_PARAM_UNKNOWN");
} else if (ordinal == 1) {
jsonWriter.value("ALWAYS_SHOW");
} else if (ordinal == 2) {
jsonWriter.value("GEO_OVERRIDE_EEA");
} else if (ordinal == 3) {
jsonWriter.value("GEO_OVERRIDE_NON_EEA");
} else if (ordinal == 4) {
jsonWriter.value("PREVIEWING_DEBUG_MESSAGES");
}
}
jsonWriter.endArray();
}
jsonWriter.endObject();
jsonWriter.close();
outputStreamWriter.close();
int responseCode = httpURLConnection.getResponseCode();
if (responseCode != 200) {
throw new IOException("Http error code - " + responseCode + ".\n" + new Scanner(httpURLConnection.getErrorStream()).useDelimiter("\\A").next());
}
String headerField = httpURLConnection.getHeaderField("x-ump-using-header");
if (headerField != null) {
c0 a10 = c0.a(new JsonReader(new StringReader(headerField)));
a10.f16316a = new Scanner(httpURLConnection.getInputStream()).useDelimiter("\\A").next();
return a10;
}
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), "UTF-8"));
try {
bufferedReader.readLine();
JsonReader jsonReader = new JsonReader(bufferedReader);
c0 a11 = c0.a(jsonReader);
jsonReader.close();
bufferedReader.close();
return a11;
} catch (Throwable th) {
try {
bufferedReader.close();
} catch (Throwable th2) {
Throwable.class.getDeclaredMethod("addSuppressed", Throwable.class).invoke(th, th2);
}
throw th;
}
} catch (Throwable th3) {
try {
outputStreamWriter.close();
} catch (Throwable th4) {
Throwable.class.getDeclaredMethod("addSuppressed", Throwable.class).invoke(th3, th4);
}
throw th3;
}
} catch (SocketTimeoutException e10) {
throw new e1("The server timed out.", 4, e10);
} catch (IOException e11) {
throw new e1("Error making request.", 2, e11);
}
}
}