MD5 校验值:61e58c10a11e4adec8760ee3854e996a
C2207d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package q3; import android.accounts.Account; import android.app.Application; import android.app.Dialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.net.NetworkCapabilities; import android.net.Uri; import android.os.Handler; import android.text.TextUtils; import android.util.JsonReader; import android.util.JsonWriter; import android.util.Log; import android.webkit.WebSettings; import com.google.android.gms.internal.ads.B4; import com.google.android.gms.internal.ads.C1067lu; import com.google.android.gms.internal.ads.C1251pu; import com.google.android.gms.internal.ads.C1297qu; import com.google.android.gms.internal.ads.C1491v4; import com.google.android.gms.internal.ads.K4; import com.google.android.gms.internal.ads.S1; import com.google.android.gms.internal.ads.Sn; import com.google.android.gms.internal.ads.Y3; import f0.AbstractC1761a; import g1.C1797c; 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.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Scanner; import java.util.Set; import java.util.concurrent.Executor; import org.apache.http.client.methods.HttpPost; import org.apache.http.cookie.ClientCookie; import org.apache.http.protocol.HTTP; import org.json.JSONObject; import q.C2157c; import v3.C2370a; public final class C2207d implements InterfaceC2184B { public static C2207d f18087o; public final Object f18088b; public final Object e; public final Object f18089f; public final Object f18090j; public final Object f18091k; public final Object f18092l; public final Object f18093m; public Object f18094n; public C2207d(Account account, C2157c c2157c, String str, String str2) { C2370a c2370a = C2370a.f18987b; this.f18088b = account; Set emptySet = c2157c == null ? Collections.emptySet() : Collections.unmodifiableSet(c2157c); this.e = emptySet; Map emptyMap = Collections.emptyMap(); this.f18090j = null; this.f18091k = str; this.f18092l = str2; this.f18093m = c2370a; HashSet hashSet = new HashSet(emptySet); Iterator it = emptyMap.values().iterator(); if (it.hasNext()) { AbstractC1761a.r(it.next()); throw null; } this.f18089f = Collections.unmodifiableSet(hashSet); } public static C2207d c(Context context) { C2207d c2207d; synchronized (C2207d.class) { try { if (f18087o == null) { Application application = (Application) context.getApplicationContext(); application.getClass(); f18087o = new C2207d(application); } c2207d = f18087o; } catch (Throwable th) { throw th; } } return c2207d; } @Override public Executor a() { Handler handler = (Handler) this.f18089f; Objects.requireNonNull(handler); return new d3.l(handler, 2); } @Override public boolean b(String str, JSONObject jSONObject) { char c7; char c8 = 65535; switch (str.hashCode()) { case -1370505102: if (str.equals("load_complete")) { c7 = 0; break; } c7 = 65535; break; case -278739366: if (str.equals("configure_app_assets")) { c7 = 3; break; } c7 = 65535; break; case 150940456: if (str.equals("browser")) { c7 = 2; break; } c7 = 65535; break; case 1671672458: if (str.equals("dismiss")) { c7 = 1; break; } c7 = 65535; break; default: c7 = 65535; break; } C2214k c2214k = (C2214k) this.f18093m; if (c7 != 0) { if (c7 != 1) { if (c7 != 2) { if (c7 != 3) { return false; } ((Executor) this.f18090j).execute(new RunnableC2217n(this, 1)); return true; } String optString = jSONObject.optString("url"); if (TextUtils.isEmpty(optString)) { Log.d("UserMessagingPlatform", "Action[browser]: empty url."); } Uri parse = Uri.parse(optString); if (parse.getScheme() == null) { Log.d("UserMessagingPlatform", "Action[browser]: empty scheme: ".concat(String.valueOf(optString))); } try { ((C2220q) this.e).startActivity(new Intent("android.intent.action.VIEW", parse)); } catch (ActivityNotFoundException e) { Log.d("UserMessagingPlatform", "Action[browser]: can not open url: ".concat(String.valueOf(optString)), e); } return true; } String optString2 = jSONObject.optString("status"); optString2.getClass(); switch (optString2.hashCode()) { case -954325659: if (optString2.equals("CONSENT_SIGNAL_NON_PERSONALIZED_ADS")) { c8 = 0; break; } break; case -258041904: if (optString2.equals("personalized")) { c8 = 1; break; } break; case 429411856: if (optString2.equals("CONSENT_SIGNAL_SUFFICIENT")) { c8 = 2; break; } break; case 467888915: if (optString2.equals("CONSENT_SIGNAL_PERSONALIZED_ADS")) { c8 = 3; break; } break; case 1666911234: if (optString2.equals("non_personalized")) { c8 = 4; break; } break; } switch (c8) { case 0: case 1: case 2: case 3: case 4: Dialog dialog = c2214k.f18106f; if (dialog != null) { dialog.dismiss(); c2214k.f18106f = null; } c2214k.f18104b.f18123a = null; C2212i c2212i = (C2212i) c2214k.f18111k.getAndSet(null); if (c2212i != null) { c2212i.e.f18103a.unregisterActivityLifecycleCallbacks(c2212i); } P4.g gVar = (P4.g) c2214k.f18110j.getAndSet(null); if (gVar != null) { c2214k.f18105c.f18098b.edit().putInt("consent_status", 3).apply(); gVar.a(null); } return true; default: C2199Q c2199q = new C2199Q(1, "We are getting something wrong with the webview."); Dialog dialog2 = c2214k.f18106f; if (dialog2 != null) { dialog2.dismiss(); c2214k.f18106f = null; } c2214k.f18104b.f18123a = null; C2212i c2212i2 = (C2212i) c2214k.f18111k.getAndSet(null); if (c2212i2 != null) { c2212i2.e.f18103a.unregisterActivityLifecycleCallbacks(c2212i2); } P4.g gVar2 = (P4.g) c2214k.f18110j.getAndSet(null); if (gVar2 != null) { gVar2.a(c2199q.a()); } return true; } } C2213j c2213j = (C2213j) c2214k.f18109i.getAndSet(null); if (c2213j != null) { c2213j.a(c2214k); } return true; } public HashMap d() { long j5; long j6; HashMap f7 = f(); S1 s12 = (S1) this.e; C1251pu c1251pu = (C1251pu) s12.f8441j; x3.l lVar = (x3.l) s12.f8443l; c1251pu.getClass(); Y3 y32 = C1251pu.f12846a; if (lVar.c()) { y32 = (Y3) lVar.b(); } f7.put("gai", Boolean.valueOf(((C1067lu) this.f18088b).f11888b)); f7.put("did", y32.w0()); f7.put("dst", Integer.valueOf(y32.l0() - 1)); f7.put("doo", Boolean.valueOf(y32.i0())); C1491v4 c1491v4 = (C1491v4) this.f18091k; if (c1491v4 != null) { synchronized (C1491v4.class) { try { NetworkCapabilities networkCapabilities = (NetworkCapabilities) c1491v4.e; if (networkCapabilities != null) { if (networkCapabilities.hasTransport(4)) { j6 = 2; } else if (((NetworkCapabilities) c1491v4.e).hasTransport(1)) { j6 = 1; } else if (((NetworkCapabilities) c1491v4.e).hasTransport(0)) { j6 = 0; } } j6 = -1; } finally { } } f7.put("nt", Long.valueOf(j6)); } K4 k42 = (K4) this.f18092l; if (k42 != null) { if (k42.d) { j5 = k42.f7486b - k42.f7485a; } else { j5 = -1; } f7.put("vs", Long.valueOf(j5)); K4 k43 = (K4) this.f18092l; long j7 = k43.f7487c; k43.f7487c = -1L; f7.put("vf", Long.valueOf(j7)); } return f7; } public Sn e(K0.j jVar) { String str; String str2; try { HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("https://fundingchoicesmessages.google.com/a/consent").openConnection(); httpURLConnection.setRequestProperty("User-Agent", WebSettings.getDefaultUserAgent((Application) this.f18088b)); httpURLConnection.setConnectTimeout(10000); httpURLConnection.setReadTimeout(30000); httpURLConnection.setDoOutput(true); httpURLConnection.setRequestMethod(HttpPost.METHOD_NAME); httpURLConnection.setRequestProperty("Content-Type", "application/json"); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpURLConnection.getOutputStream(), HTTP.UTF_8); try { JsonWriter jsonWriter = new JsonWriter(outputStreamWriter); try { jsonWriter.beginObject(); String str3 = (String) jVar.f1383a; if (str3 != null) { jsonWriter.name("admob_app_id"); jsonWriter.value(str3); } V1.z zVar = (V1.z) jVar.f1384b; if (zVar != null) { jsonWriter.name("device_info"); jsonWriter.beginObject(); int i5 = zVar.e; if (i5 != 1) { jsonWriter.name("os_type"); int i6 = i5 - 1; if (i6 != 0) { if (i6 == 1) { str2 = "ANDROID"; } } else { str2 = "UNKNOWN"; } jsonWriter.value(str2); } String str4 = (String) zVar.f4102f; if (str4 != null) { jsonWriter.name("model"); jsonWriter.value(str4); } Integer num = (Integer) zVar.f4103j; if (num != null) { jsonWriter.name("android_api_level"); jsonWriter.value(num); } jsonWriter.endObject(); } String str5 = (String) jVar.f1385c; if (str5 != null) { jsonWriter.name("language_code"); jsonWriter.value(str5); } Boolean bool = (Boolean) jVar.d; if (bool != null) { jsonWriter.name("tag_for_under_age_of_consent"); jsonWriter.value(bool.booleanValue()); } Map map = (Map) jVar.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(); } I0.i iVar = (I0.i) jVar.f1386f; if (iVar != null) { jsonWriter.name("screen_info"); jsonWriter.beginObject(); Integer num2 = (Integer) iVar.e; if (num2 != null) { jsonWriter.name("width"); jsonWriter.value(num2); } Integer num3 = (Integer) iVar.f868f; if (num3 != null) { jsonWriter.name("height"); jsonWriter.value(num3); } Double d = (Double) iVar.f869j; if (d != null) { jsonWriter.name("density"); jsonWriter.value(d); } List<C2224u> list = (List) iVar.f870k; if (!list.isEmpty()) { jsonWriter.name("screen_insets"); jsonWriter.beginArray(); for (C2224u c2224u : list) { jsonWriter.beginObject(); Integer num4 = c2224u.f18133a; if (num4 != null) { jsonWriter.name("top"); jsonWriter.value(num4); } Integer num5 = c2224u.f18134b; if (num5 != null) { jsonWriter.name("left"); jsonWriter.value(num5); } Integer num6 = c2224u.f18135c; if (num6 != null) { jsonWriter.name("right"); jsonWriter.value(num6); } Integer num7 = c2224u.d; if (num7 != null) { jsonWriter.name("bottom"); jsonWriter.value(num7); } jsonWriter.endObject(); } jsonWriter.endArray(); } jsonWriter.endObject(); } C2222s c2222s = (C2222s) jVar.f1387g; if (c2222s != null) { jsonWriter.name("app_info"); jsonWriter.beginObject(); String str6 = (String) c2222s.e; if (str6 != null) { jsonWriter.name("package_name"); jsonWriter.value(str6); } String str7 = (String) c2222s.f18130f; if (str7 != null) { jsonWriter.name("publisher_display_name"); jsonWriter.value(str7); } String str8 = (String) c2222s.f18131j; if (str8 != null) { jsonWriter.name(ClientCookie.VERSION_ATTR); jsonWriter.value(str8); } jsonWriter.endObject(); } S2.j jVar2 = (S2.j) jVar.f1388h; if (jVar2 != null) { jsonWriter.name("sdk_info"); jsonWriter.beginObject(); String str9 = jVar2.f3066a; if (str9 != null) { jsonWriter.name(ClientCookie.VERSION_ATTR); jsonWriter.value(str9); } jsonWriter.endObject(); } List list2 = (List) jVar.f1389i; if (!list2.isEmpty()) { jsonWriter.name("debug_params"); jsonWriter.beginArray(); Iterator it = list2.iterator(); while (it.hasNext()) { int ordinal = ((EnumC2223t) it.next()).ordinal(); if (ordinal != 0) { if (ordinal != 1) { if (ordinal != 2) { if (ordinal != 3) { if (ordinal == 4) { str = "PREVIEWING_DEBUG_MESSAGES"; } } else { str = "GEO_OVERRIDE_NON_EEA"; } } else { str = "GEO_OVERRIDE_EEA"; } } else { str = "ALWAYS_SHOW"; } } else { str = "DEBUG_PARAM_UNKNOWN"; } jsonWriter.value(str); } jsonWriter.endArray(); } jsonWriter.endObject(); jsonWriter.close(); outputStreamWriter.close(); int responseCode = httpURLConnection.getResponseCode(); if (responseCode == 200) { String headerField = httpURLConnection.getHeaderField("x-ump-using-header"); if (headerField != null) { Sn a6 = Sn.a(new JsonReader(new StringReader(headerField))); a6.f8479a = new Scanner(httpURLConnection.getInputStream()).useDelimiter("\\A").next(); return a6; } BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), HTTP.UTF_8)); try { bufferedReader.readLine(); JsonReader jsonReader = new JsonReader(bufferedReader); try { Sn a7 = Sn.a(jsonReader); jsonReader.close(); bufferedReader.close(); return a7; } finally { } } catch (Throwable th) { try { bufferedReader.close(); } catch (Throwable th2) { th.addSuppressed(th2); } throw th; } } throw new IOException("Http error code - " + responseCode + ".\n" + new Scanner(httpURLConnection.getErrorStream()).useDelimiter("\\A").next()); } finally { } } catch (Throwable th3) { try { outputStreamWriter.close(); } catch (Throwable th4) { th3.addSuppressed(th4); } throw th3; } } catch (SocketTimeoutException e) { throw new C2199Q(4, e, "The server timed out."); } catch (IOException e7) { throw new C2199Q(2, e7, "Error making request."); } } public HashMap f() { HashMap hashMap = new HashMap(); S1 s12 = (S1) this.e; C1297qu c1297qu = (C1297qu) s12.f8442k; x3.l lVar = (x3.l) s12.f8444m; c1297qu.getClass(); Y3 y32 = C1297qu.f12954a; if (lVar.c()) { y32 = (Y3) lVar.b(); } C1067lu c1067lu = (C1067lu) this.f18088b; hashMap.put("v", c1067lu.f11887a); hashMap.put("gms", Boolean.valueOf(c1067lu.f11889c)); hashMap.put("int", y32.x0()); hashMap.put("up", Boolean.valueOf(((B4) this.f18090j).f6195a)); hashMap.put("t", new Throwable()); N1.b bVar = (N1.b) this.f18093m; if (bVar != null) { hashMap.put("tcq", Long.valueOf(bVar.f2095a)); hashMap.put("tpq", Long.valueOf(bVar.f2096b)); hashMap.put("tcv", Long.valueOf(bVar.f2097c)); hashMap.put("tpv", Long.valueOf(bVar.d)); hashMap.put("tchv", Long.valueOf(bVar.e)); hashMap.put("tphv", Long.valueOf(bVar.f2098f)); hashMap.put("tcc", Long.valueOf(bVar.f2099g)); hashMap.put("tpc", Long.valueOf(bVar.f2100h)); } return hashMap; } public void g(String str) { Log.d("UserMessagingPlatform", "Receive consent action: ".concat(String.valueOf(str))); Uri parse = Uri.parse(str); String queryParameter = parse.getQueryParameter("action"); String queryParameter2 = parse.getQueryParameter("args"); InterfaceC2184B[] interfaceC2184BArr = {this, (B0.o) this.f18092l}; C2198P c2198p = (C2198P) this.f18091k; c2198p.getClass(); c2198p.f18070a.execute(new A3.c(queryParameter, queryParameter2, interfaceC2184BArr, 14, false)); } public C2207d(Application application) { this.f18088b = this; if (application != null) { L2.y yVar = new L2.y(application); this.e = yVar; C2195M b7 = C2195M.b(new C2211h(yVar, 0)); this.f18089f = b7; C2195M b8 = C2195M.b(w.f18139b); this.f18090j = b8; C2195M b9 = C2195M.b(new C2206c(new C2206c(this, 0), 1)); this.f18091k = b9; C2201T c2201t = new C2201T(yVar, b7); C2195M b10 = C2195M.b(new C1797c(12)); this.f18092l = b10; C2209f c2209f = new C2209f(yVar, b7); this.f18094n = c2209f; this.f18093m = C2195M.b(new C2222s(b7, new C2203V(yVar, b8, b7, b9, c2201t, new C2204a(b10, c2209f, b7), b10), b9, 1)); return; } throw new NullPointerException("instance cannot be null"); } public C2207d(Object obj, Object obj2, Object obj3, Object obj4, Object obj5, Object obj6, Object obj7, Object obj8) { this.f18088b = obj; this.e = obj2; this.f18089f = obj3; this.f18090j = obj4; this.f18091k = obj5; this.f18092l = obj6; this.f18093m = obj7; this.f18094n = obj8; } }