正在查看: CityMall v1.42.1 应用的 g1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CityMall v1.42.1 应用的 g1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package M4;
import android.app.Activity;
import android.app.Application;
import android.os.Handler;
import android.util.JsonReader;
import android.util.JsonWriter;
import android.util.Log;
import android.webkit.WebSettings;
import com.google.android.ump.ConsentDebugSettings;
import com.google.android.ump.ConsentInformation;
import com.heanoria.library.reactnative.locationenabler.AndroidLocationEnablerModule;
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.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;
import java.util.concurrent.Executor;
import s5.C4062a;
final class g1 {
private final Application a;
private final Handler b;
private final Executor c;
private final C0085n d;
private final K e;
private final V0 f;
private final j1 g;
private final O0 h;
g1(Application application, C0063c c0063c, Handler handler, Executor executor, C0085n c0085n, K k, V0 v0, j1 j1Var, O0 o0) {
this.a = application;
this.b = handler;
this.c = executor;
this.d = c0085n;
this.e = k;
this.f = v0;
this.g = j1Var;
this.h = o0;
}
private final C0078j0 d(C0074h0 c0074h0) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("https://fundingchoicesmessages.google.com/a/consent").openConnection();
httpURLConnection.setRequestProperty("User-Agent", WebSettings.getDefaultUserAgent(this.a));
httpURLConnection.setConnectTimeout(AndroidLocationEnablerModule.DEFAULT_INTERVAL_DURATION);
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);
try {
jsonWriter.beginObject();
String str = c0074h0.a;
if (str != null) {
jsonWriter.name("admob_app_id");
jsonWriter.value(str);
}
C0066d0 c0066d0 = c0074h0.b;
if (c0066d0 != null) {
jsonWriter.name("device_info");
jsonWriter.beginObject();
int i = c0066d0.c;
if (i != 1) {
jsonWriter.name("os_type");
int i2 = i - 1;
if (i2 == 0) {
jsonWriter.value("UNKNOWN");
} else if (i2 == 1) {
jsonWriter.value("ANDROID");
}
}
String str2 = c0066d0.a;
if (str2 != null) {
jsonWriter.name("model");
jsonWriter.value(str2);
}
Integer num = c0066d0.b;
if (num != null) {
jsonWriter.name("android_api_level");
jsonWriter.value(num);
}
jsonWriter.endObject();
}
String str3 = c0074h0.c;
if (str3 != null) {
jsonWriter.name("language_code");
jsonWriter.value(str3);
}
Boolean bool = c0074h0.d;
if (bool != null) {
jsonWriter.name("tag_for_under_age_of_consent");
jsonWriter.value(bool.booleanValue());
}
Map map = c0074h0.e;
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();
}
C0070f0 c0070f0 = c0074h0.f;
if (c0070f0 != null) {
jsonWriter.name("screen_info");
jsonWriter.beginObject();
Integer num2 = c0070f0.a;
if (num2 != null) {
jsonWriter.name("width");
jsonWriter.value(num2);
}
Integer num3 = c0070f0.b;
if (num3 != null) {
jsonWriter.name("height");
jsonWriter.value(num3);
}
Double d = c0070f0.c;
if (d != null) {
jsonWriter.name("density");
jsonWriter.value(d);
}
List<C0068e0> list = c0070f0.d;
if (!list.isEmpty()) {
jsonWriter.name("screen_insets");
jsonWriter.beginArray();
for (C0068e0 c0068e0 : list) {
jsonWriter.beginObject();
Integer num4 = c0068e0.a;
if (num4 != null) {
jsonWriter.name("top");
jsonWriter.value(num4);
}
Integer num5 = c0068e0.b;
if (num5 != null) {
jsonWriter.name("left");
jsonWriter.value(num5);
}
Integer num6 = c0068e0.c;
if (num6 != null) {
jsonWriter.name("right");
jsonWriter.value(num6);
}
Integer num7 = c0068e0.d;
if (num7 != null) {
jsonWriter.name("bottom");
jsonWriter.value(num7);
}
jsonWriter.endObject();
}
jsonWriter.endArray();
}
jsonWriter.endObject();
}
C0060a0 c0060a0 = c0074h0.g;
if (c0060a0 != null) {
jsonWriter.name("app_info");
jsonWriter.beginObject();
String str4 = c0060a0.a;
if (str4 != null) {
jsonWriter.name("package_name");
jsonWriter.value(str4);
}
String str5 = c0060a0.b;
if (str5 != null) {
jsonWriter.name("publisher_display_name");
jsonWriter.value(str5);
}
String str6 = c0060a0.c;
if (str6 != null) {
jsonWriter.name("version");
jsonWriter.value(str6);
}
jsonWriter.endObject();
}
C0072g0 c0072g0 = c0074h0.h;
if (c0072g0 != null) {
jsonWriter.name("sdk_info");
jsonWriter.beginObject();
String str7 = c0072g0.a;
if (str7 != null) {
jsonWriter.name("version");
jsonWriter.value(str7);
}
jsonWriter.endObject();
}
List list2 = c0074h0.i;
if (!list2.isEmpty()) {
jsonWriter.name("debug_params");
jsonWriter.beginArray();
Iterator it = list2.iterator();
while (it.hasNext()) {
switch ((EnumC0064c0) it.next()) {
case DEBUG_PARAM_UNKNOWN:
jsonWriter.value("DEBUG_PARAM_UNKNOWN");
break;
case ALWAYS_SHOW:
jsonWriter.value("ALWAYS_SHOW");
break;
case GEO_OVERRIDE_EEA:
jsonWriter.value("GEO_OVERRIDE_EEA");
break;
case GEO_OVERRIDE_REGULATED_US_STATE:
jsonWriter.value("GEO_OVERRIDE_REGULATED_US_STATE");
break;
case GEO_OVERRIDE_OTHER:
jsonWriter.value("GEO_OVERRIDE_OTHER");
break;
case GEO_OVERRIDE_NON_EEA:
jsonWriter.value("GEO_OVERRIDE_NON_EEA");
break;
case PREVIEWING_DEBUG_MESSAGES:
jsonWriter.value("PREVIEWING_DEBUG_MESSAGES");
break;
}
}
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) {
C0078j0 a = C0078j0.a(new JsonReader(new StringReader(headerField)));
a.a = new Scanner(httpURLConnection.getInputStream()).useDelimiter("\\A").next();
return a;
}
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), "UTF-8"));
try {
bufferedReader.readLine();
JsonReader jsonReader = new JsonReader(bufferedReader);
try {
C0078j0 a2 = C0078j0.a(jsonReader);
jsonReader.close();
bufferedReader.close();
return a2;
} finally {
}
} finally {
}
} finally {
}
} finally {
}
} catch (SocketTimeoutException e) {
throw new Q0(4, "The server timed out.", e);
} catch (IOException e2) {
throw new Q0(2, "Error making request.", e2);
}
}
final void a(final ConsentInformation.OnConsentInfoUpdateSuccessListener onConsentInfoUpdateSuccessListener, l1 l1Var) {
Objects.requireNonNull(onConsentInfoUpdateSuccessListener);
this.b.post(new Runnable() {
@Override
public final void run() {
ConsentInformation.OnConsentInfoUpdateSuccessListener.this.a();
}
});
if (l1Var.b != ConsentInformation.a.NOT_REQUIRED) {
this.e.c();
}
}
final void b(Activity activity, C4062a c4062a, final ConsentInformation.OnConsentInfoUpdateSuccessListener onConsentInfoUpdateSuccessListener, final ConsentInformation.OnConsentInfoUpdateFailureListener onConsentInfoUpdateFailureListener) {
try {
ConsentDebugSettings a = c4062a.a();
if (a != null) {
if (!a.b()) {
}
final l1 a2 = new i1(this.g, d(this.f.c(activity, c4062a))).a();
this.d.g(a2.a);
this.d.i(a2.b);
this.e.d(a2.c);
this.h.a().execute(new Runnable() {
@Override
public final void run() {
g1.this.a(onConsentInfoUpdateSuccessListener, a2);
}
});
}
Log.i("UserMessagingPlatform", "Use new ConsentDebugSettings.Builder().addTestDeviceHashedId(\"" + AbstractC0080k0.a(this.a) + "\") to set this as a debug device.");
final l1 a22 = new i1(this.g, d(this.f.c(activity, c4062a))).a();
this.d.g(a22.a);
this.d.i(a22.b);
this.e.d(a22.c);
this.h.a().execute(new Runnable() {
@Override
public final void run() {
g1.this.a(onConsentInfoUpdateSuccessListener, a22);
}
});
} catch (Q0 e) {
this.b.post(new Runnable() {
@Override
public final void run() {
ConsentInformation.OnConsentInfoUpdateFailureListener.this.a(e.a());
}
});
} catch (RuntimeException e2) {
final Q0 q0 = new Q0(1, "Caught exception when trying to request consent info update: ".concat(String.valueOf(Log.getStackTraceString(e2))));
this.b.post(new Runnable() {
@Override
public final void run() {
ConsentInformation.OnConsentInfoUpdateFailureListener.this.a(q0.a());
}
});
}
}
final void c(final Activity activity, final C4062a c4062a, final ConsentInformation.OnConsentInfoUpdateSuccessListener onConsentInfoUpdateSuccessListener, final ConsentInformation.OnConsentInfoUpdateFailureListener onConsentInfoUpdateFailureListener) {
this.c.execute(new Runnable() {
@Override
public final void run() {
g1.this.b(activity, c4062a, onConsentInfoUpdateSuccessListener, onConsentInfoUpdateFailureListener);
}
});
}
}