正在查看: Tarjeta Transporte v3.0.29 应用的 q03.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tarjeta Transporte v3.0.29 应用的 q03.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.sgcr;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.pm.Signature;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ext.SdkExtensions;
import android.text.TextUtils;
import com.google.android.gms.measurement.internal.zzae;
import com.google.android.gms.measurement.internal.zzbc;
import com.google.android.gms.measurement.internal.zzbd;
import com.google.android.gms.measurement.internal.zzno;
import com.itextpdf.text.Annotation;
import com.itextpdf.text.xml.xmp.DublinCoreProperties;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Random;
import java.util.TreeSet;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicLong;
import javax.security.auth.x500.X500Principal;
public final class q03 extends mp2 {
public static final String[] f13082break = {"firebase_", "google_", "ga_"};
public static final String[] f13083catch = {"_err"};
public int f13084case;
public qm0 f13085else;
public Boolean f13086goto;
public SecureRandom f13087new;
public Integer f13088this;
public final AtomicLong f13089try;
public q03(gn2 gn2Var) {
super(gn2Var);
this.f13088this = null;
this.f13089try = new AtomicLong(0L);
}
public static boolean A(String str, String str2, String str3, String str4) {
boolean isEmpty = TextUtils.isEmpty(str);
boolean isEmpty2 = TextUtils.isEmpty(str2);
if (!isEmpty && !isEmpty2) {
wx0.m18045class(str);
return !str.equals(str2);
}
if (isEmpty && isEmpty2) {
return (TextUtils.isEmpty(str3) || TextUtils.isEmpty(str4)) ? !TextUtils.isEmpty(str4) : !str3.equals(str4);
}
if (isEmpty || !isEmpty2) {
return TextUtils.isEmpty(str3) || !str3.equals(str4);
}
if (TextUtils.isEmpty(str4)) {
return false;
}
return TextUtils.isEmpty(str3) || !str3.equals(str4);
}
public static boolean B(String str, String[] strArr) {
wx0.m18045class(strArr);
for (String str2 : strArr) {
if (Objects.equals(str, str2)) {
return true;
}
}
return false;
}
public static byte[] E(Parcelable parcelable) {
if (parcelable == null) {
return null;
}
Parcel obtain = Parcel.obtain();
try {
parcelable.writeToParcel(obtain, 0);
return obtain.marshall();
} finally {
obtain.recycle();
}
}
public static ArrayList H(List list) {
if (list == null) {
return new ArrayList(0);
}
ArrayList arrayList = new ArrayList(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
zzae zzaeVar = (zzae) it.next();
Bundle bundle = new Bundle();
bundle.putString("app_id", zzaeVar.f3963if);
bundle.putString("origin", zzaeVar.f3962for);
bundle.putLong("creation_timestamp", zzaeVar.f3971try);
bundle.putString("name", zzaeVar.f3966new.f3982for);
qp2.m14587for(bundle, wx0.m18045class(zzaeVar.f3966new.m3574else()));
bundle.putBoolean("active", zzaeVar.f3961final);
String str = zzaeVar.f3964import;
if (str != null) {
bundle.putString("trigger_event_name", str);
}
zzbd zzbdVar = zzaeVar.f3965native;
if (zzbdVar != null) {
bundle.putString("timed_out_event_name", zzbdVar.f3975if);
zzbc zzbcVar = zzbdVar.f3974for;
if (zzbcVar != null) {
bundle.putBundle("timed_out_event_params", zzbcVar.m3568break());
}
}
bundle.putLong("trigger_timeout", zzaeVar.f3967public);
zzbd zzbdVar2 = zzaeVar.f3968return;
if (zzbdVar2 != null) {
bundle.putString("triggered_event_name", zzbdVar2.f3975if);
zzbc zzbcVar2 = zzbdVar2.f3974for;
if (zzbcVar2 != null) {
bundle.putBundle("triggered_event_params", zzbcVar2.m3568break());
}
}
bundle.putLong("triggered_timestamp", zzaeVar.f3966new.f3986new);
bundle.putLong("time_to_live", zzaeVar.f3969static);
zzbd zzbdVar3 = zzaeVar.f3970switch;
if (zzbdVar3 != null) {
bundle.putString("expired_event_name", zzbdVar3.f3975if);
zzbc zzbcVar3 = zzbdVar3.f3974for;
if (zzbcVar3 != null) {
bundle.putBundle("expired_event_params", zzbcVar3.m3568break());
}
}
arrayList.add(bundle);
}
return arrayList;
}
public static boolean J(Bundle bundle, int i) {
if (bundle == null || bundle.getLong("_err") != 0) {
return false;
}
bundle.putLong("_err", i);
return true;
}
public static Bundle[] L(Object obj) {
if (obj instanceof Bundle) {
return new Bundle[]{(Bundle) obj};
}
if (obj instanceof Parcelable[]) {
Parcelable[] parcelableArr = (Parcelable[]) obj;
return (Bundle[]) Arrays.copyOf(parcelableArr, parcelableArr.length, Bundle[].class);
}
if (!(obj instanceof ArrayList)) {
return null;
}
ArrayList arrayList = (ArrayList) obj;
return (Bundle[]) arrayList.toArray(new Bundle[arrayList.size()]);
}
public static int M() {
int extensionVersion;
int extensionVersion2;
if (Build.VERSION.SDK_INT < 30) {
return 0;
}
extensionVersion = SdkExtensions.getExtensionVersion(30);
if (extensionVersion <= 3) {
return 0;
}
extensionVersion2 = SdkExtensions.getExtensionVersion(1000000);
return extensionVersion2;
}
public static boolean P(Context context, String str) {
ServiceInfo serviceInfo;
try {
PackageManager packageManager = context.getPackageManager();
if (packageManager != null && (serviceInfo = packageManager.getServiceInfo(new ComponentName(context, str), 0)) != null) {
if (serviceInfo.enabled) {
return true;
}
}
} catch (PackageManager.NameNotFoundException unused) {
}
return false;
}
public static boolean R(String str) {
return U((String) x72.q.m5511if(null), str);
}
public static boolean U(String str, String str2) {
return str.equals("*") || Arrays.asList(str.split(",")).contains(str2);
}
public static boolean V(String str) {
return U((String) x72.J.m5511if(null), str);
}
public static boolean X(String str) {
return !TextUtils.isEmpty(str) && str.startsWith("_");
}
public static boolean Z(String str) {
wx0.m18043case(str);
return str.charAt(0) != '_' || str.equals("_ep");
}
public static boolean b0(String str) {
for (String str2 : f13083catch) {
if (str2.equals(str)) {
return false;
}
}
return true;
}
public static Bundle m14391continue(Bundle bundle) {
if (bundle == null) {
return new Bundle();
}
Bundle bundle2 = new Bundle(bundle);
for (String str : bundle2.keySet()) {
Object obj = bundle2.get(str);
if (obj instanceof Bundle) {
bundle2.putBundle(str, new Bundle((Bundle) obj));
} else {
int i = 0;
if (obj instanceof Parcelable[]) {
Parcelable[] parcelableArr = (Parcelable[]) obj;
while (i < parcelableArr.length) {
if (parcelableArr[i] instanceof Bundle) {
parcelableArr[i] = new Bundle((Bundle) parcelableArr[i]);
}
i++;
}
} else if (obj instanceof List) {
List list = (List) obj;
while (i < list.size()) {
Object obj2 = list.get(i);
if (obj2 instanceof Bundle) {
list.set(i, new Bundle((Bundle) obj2));
}
i++;
}
}
}
}
return bundle2;
}
public static int e0(String str) {
if ("_ldl".equals(str)) {
return 2048;
}
if ("_id".equals(str)) {
return 256;
}
return "_lgclid".equals(str) ? 100 : 36;
}
public static long m14392extends(long j, long j2) {
return (j + (j2 * 60000)) / 86400000;
}
public static boolean h0(String str) {
wx0.m18045class(str);
return str.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$");
}
public static String m14393implements(String str, int i, boolean z) {
if (str == null) {
return null;
}
if (str.codePointCount(0, str.length()) <= i) {
return str;
}
if (!z) {
return null;
}
return str.substring(0, str.offsetByCodePoints(0, i)) + "...";
}
public static Bundle m14394interface(List list) {
Bundle bundle = new Bundle();
if (list == null) {
return bundle;
}
Iterator it = list.iterator();
while (it.hasNext()) {
zzno zznoVar = (zzno) it.next();
String str = zznoVar.f3981final;
if (str != null) {
bundle.putString(zznoVar.f3982for, str);
} else {
Long l = zznoVar.f3987try;
if (l != null) {
bundle.putLong(zznoVar.f3982for, l.longValue());
} else {
Double d = zznoVar.f3985native;
if (d != null) {
bundle.putDouble(zznoVar.f3982for, d.doubleValue());
}
}
}
}
return bundle;
}
public static MessageDigest j0() {
MessageDigest messageDigest;
for (int i = 0; i < 2; i++) {
try {
messageDigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException unused) {
}
if (messageDigest != null) {
return messageDigest;
}
}
return null;
}
public static void l(du2 du2Var, Bundle bundle, boolean z) {
if (bundle == null || du2Var == null || (bundle.containsKey("_sc") && !z)) {
if (bundle != null && du2Var == null && z) {
bundle.remove("_sn");
bundle.remove("_sc");
bundle.remove("_si");
return;
}
return;
}
String str = du2Var.f7774if;
if (str != null) {
bundle.putString("_sn", str);
} else {
bundle.remove("_sn");
}
String str2 = du2Var.f7773for;
if (str2 != null) {
bundle.putString("_sc", str2);
} else {
bundle.remove("_sc");
}
bundle.putLong("_si", du2Var.f7775new);
}
public static void m(u03 u03Var, int i, String str, String str2, int i2) {
n(u03Var, null, i, str, str2, i2);
}
public static void n(u03 u03Var, String str, int i, String str2, String str3, int i2) {
Bundle bundle = new Bundle();
J(bundle, i);
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
bundle.putString(str2, str3);
}
if (i == 6 || i == 7 || i == 2) {
bundle.putLong("_el", i2);
}
u03Var.mo5678final(str, "_err", bundle);
}
public static long m14395package(zzbc zzbcVar) {
long j = 0;
if (zzbcVar == null) {
return 0L;
}
Iterator<String> it = zzbcVar.iterator();
while (it.hasNext()) {
if (zzbcVar.m3569default(it.next()) instanceof Parcelable[]) {
j += ((Parcelable[]) r3).length;
}
}
return j;
}
public static long m14396private(byte[] bArr) {
wx0.m18045class(bArr);
int i = 0;
wx0.m18053super(bArr.length > 0);
long j = 0;
for (int length = bArr.length - 1; length >= 0 && length >= bArr.length - 8; length--) {
j += (bArr[length] & 255) << i;
i += 8;
}
return j;
}
public static boolean r(Context context) {
ActivityInfo receiverInfo;
wx0.m18045class(context);
try {
PackageManager packageManager = context.getPackageManager();
if (packageManager != null && (receiverInfo = packageManager.getReceiverInfo(new ComponentName(context, "com.google.android.gms.measurement.AppMeasurementReceiver"), 0)) != null) {
if (receiverInfo.enabled) {
return true;
}
}
} catch (PackageManager.NameNotFoundException unused) {
}
return false;
}
public static boolean s(Context context, boolean z) {
wx0.m18045class(context);
return P(context, "com.google.android.gms.measurement.AppMeasurementJobService");
}
public static void m14397synchronized(Bundle bundle, int i, String str, Object obj) {
if (J(bundle, i)) {
bundle.putString("_ev", m14393implements(str, 40, true));
if (obj != null) {
wx0.m18045class(bundle);
if ((obj instanceof String) || (obj instanceof CharSequence)) {
bundle.putLong("_el", String.valueOf(obj).length());
}
}
}
}
public static boolean t(Intent intent) {
String stringExtra = intent.getStringExtra("android.intent.extra.REFERRER_NAME");
return "android-app://com.google.android.googlequicksearchbox/https/www.google.com".equals(stringExtra) || "https://www.google.com".equals(stringExtra) || "android-app://com.google.appcrawler".equals(stringExtra);
}
public static boolean u(Bundle bundle, int i) {
int i2 = 0;
if (bundle.size() <= i) {
return false;
}
for (String str : new TreeSet(bundle.keySet())) {
i2++;
if (i2 > i) {
bundle.remove(str);
}
}
return true;
}
public static boolean v(Object obj) {
return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
}
public final boolean C(String str, String[] strArr, String str2) {
return D(str, strArr, null, str2);
}
public final boolean D(String str, String[] strArr, String[] strArr2, String str2) {
boolean z;
if (str2 == null) {
mo5535catch().m15079protected().m17249for("Name is required and can't be null. Type", str);
return false;
}
wx0.m18045class(str2);
String[] strArr3 = f13082break;
int length = strArr3.length;
int i = 0;
while (true) {
if (i >= length) {
z = false;
break;
}
if (str2.startsWith(strArr3[i])) {
z = true;
break;
}
i++;
}
if (z) {
mo5535catch().m15079protected().m17251new("Name starts with reserved prefix. Type, name", str, str2);
return false;
}
if (strArr == null || !B(str2, strArr) || (strArr2 != null && B(str2, strArr2))) {
return true;
}
mo5535catch().m15079protected().m17251new("Name is reserved. Type, name", str, str2);
return false;
}
public final int F(String str) {
if (!K("user property", str)) {
return 6;
}
if (C("user property", fq2.f8619if, str)) {
return !x("user property", 24, str) ? 6 : 0;
}
return 15;
}
public final Object G(String str, Object obj) {
if ("_ev".equals(str)) {
return m14407transient(mo5534case().m9474throws(null, false), obj, true, true, null);
}
return m14407transient(X(str) ? mo5534case().m9474throws(null, false) : mo5534case().m9462native(null, false), obj, false, true, null);
}
public final boolean I(Context context, String str) {
vj2 m15078interface;
String str2;
Signature[] signatureArr;
X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
try {
PackageInfo m17371case = sy1.m15807if(context).m17371case(str, 64);
if (m17371case == null || (signatureArr = m17371case.signatures) == null || signatureArr.length <= 0) {
return true;
}
return ((X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(signatureArr[0].toByteArray()))).getSubjectX500Principal().equals(x500Principal);
} catch (PackageManager.NameNotFoundException e) {
e = e;
m15078interface = mo5535catch().m15078interface();
str2 = "Package name not found";
m15078interface.m17249for(str2, e);
return true;
} catch (CertificateException e2) {
e = e2;
m15078interface = mo5535catch().m15078interface();
str2 = "Error obtaining certificate";
m15078interface.m17249for(str2, e);
return true;
}
}
public final boolean K(String str, String str2) {
if (str2 == null) {
mo5535catch().m15079protected().m17249for("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
mo5535catch().m15079protected().m17249for("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt) && codePointAt != 95) {
mo5535catch().m15079protected().m17251new("Name must start with a letter or _ (underscore). Type, name", str, str2);
return false;
}
int length = str2.length();
int charCount = Character.charCount(codePointAt);
while (charCount < length) {
int codePointAt2 = str2.codePointAt(charCount);
if (codePointAt2 != 95 && !Character.isLetterOrDigit(codePointAt2)) {
mo5535catch().m15079protected().m17251new("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final long N(String str) {
if (mo5543if().getPackageManager() == null) {
return 0L;
}
int i = 0;
try {
ApplicationInfo m17376new = sy1.m15807if(mo5543if()).m17376new(str, 0);
if (m17376new != null) {
i = m17376new.targetSdkVersion;
}
} catch (PackageManager.NameNotFoundException unused) {
mo5535catch().m15076implements().m17249for("PackageManager failed to find running app: app_id", str);
}
return i;
}
public final Object O(String str, Object obj) {
return "_ldl".equals(str) ? m14407transient(e0(str), obj, true, false, null) : m14407transient(e0(str), obj, false, false, null);
}
public final boolean Q(String str, String str2) {
if (str2 == null) {
mo5535catch().m15079protected().m17249for("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
mo5535catch().m15079protected().m17249for("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
mo5535catch().m15079protected().m17251new("Name must start with a letter. Type, name", str, str2);
return false;
}
int length = str2.length();
int charCount = Character.charCount(codePointAt);
while (charCount < length) {
int codePointAt2 = str2.codePointAt(charCount);
if (codePointAt2 != 95 && !Character.isLetterOrDigit(codePointAt2)) {
mo5535catch().m15079protected().m17251new("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final boolean S(String str, String str2) {
if (d33.m7030if() && mo5534case().m9468return(x72.I) && !TextUtils.isEmpty(str2)) {
return true;
}
if (TextUtils.isEmpty(str)) {
return false;
}
return mo5534case().d().equals(str);
}
public final boolean T(String str) {
mo5555super();
if (sy1.m15807if(mo5543if()).m17375if(str) == 0) {
return true;
}
mo5535catch().m15082volatile().m17249for("Permission not granted", str);
return false;
}
public final int W() {
if (this.f13088this == null) {
this.f13088this = Integer.valueOf(g80.m8663else().m8665if(mo5543if()) / 1000);
}
return this.f13088this.intValue();
}
public final long Y() {
int extensionVersion;
long j;
mo5555super();
if (!R(this.f12695if.m9059private().m6519volatile())) {
return 0L;
}
if (Build.VERSION.SDK_INT < 30) {
j = 4;
} else {
extensionVersion = SdkExtensions.getExtensionVersion(30);
j = extensionVersion < 4 ? 8L : M() < ((Integer) x72.k.m5511if(null)).intValue() ? 16L : 0L;
}
if (!T("android.permission.ACCESS_ADSERVICES_ATTRIBUTION")) {
j |= 2;
}
if (j == 0 && !n0()) {
j |= 64;
}
if (j == 0) {
return 1L;
}
return j;
}
public final void a(Bundle bundle, long j) {
long j2 = bundle.getLong("_et");
if (j2 != 0) {
mo5535catch().m15080synchronized().m17249for("Params already contained engagement", Long.valueOf(j2));
}
bundle.putLong("_et", j + j2);
}
public final boolean a0(String str) {
List<ResolveInfo> queryIntentActivities;
return (TextUtils.isEmpty(str) || (queryIntentActivities = mo5543if().getPackageManager().queryIntentActivities(new Intent("android.intent.action.VIEW", Uri.parse(str)), 0)) == null || queryIntentActivities.isEmpty()) ? false : true;
}
public final Bundle m14398abstract(Uri uri, boolean z) {
String str;
String str2;
String str3;
String str4;
String str5;
String str6;
String str7;
String str8;
String str9;
String str10;
if (uri == null) {
return null;
}
try {
if (uri.isHierarchical()) {
str = uri.getQueryParameter("utm_campaign");
str2 = uri.getQueryParameter("utm_source");
str3 = uri.getQueryParameter("utm_medium");
str4 = uri.getQueryParameter("gclid");
str5 = z ? uri.getQueryParameter("gbraid") : null;
str6 = uri.getQueryParameter("utm_id");
str7 = uri.getQueryParameter("dclid");
str8 = uri.getQueryParameter("srsltid");
str9 = uri.getQueryParameter("sfmc_id");
} else {
str = null;
str2 = null;
str3 = null;
str4 = null;
str5 = null;
str6 = null;
str7 = null;
str8 = null;
str9 = null;
}
if (TextUtils.isEmpty(str) && TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3) && TextUtils.isEmpty(str4) && ((!z || TextUtils.isEmpty(str5)) && TextUtils.isEmpty(str6) && TextUtils.isEmpty(str7) && TextUtils.isEmpty(str8) && TextUtils.isEmpty(str9))) {
return null;
}
Bundle bundle = new Bundle();
if (TextUtils.isEmpty(str)) {
str10 = "sfmc_id";
} else {
str10 = "sfmc_id";
bundle.putString("campaign", str);
}
if (!TextUtils.isEmpty(str2)) {
bundle.putString(DublinCoreProperties.SOURCE, str2);
}
if (!TextUtils.isEmpty(str3)) {
bundle.putString("medium", str3);
}
if (!TextUtils.isEmpty(str4)) {
bundle.putString("gclid", str4);
}
if (z && !TextUtils.isEmpty(str5)) {
bundle.putString("gbraid", str5);
}
String queryParameter = uri.getQueryParameter("gad_source");
if (z && !TextUtils.isEmpty(queryParameter)) {
bundle.putString("gad_source", queryParameter);
}
String queryParameter2 = uri.getQueryParameter("utm_term");
if (!TextUtils.isEmpty(queryParameter2)) {
bundle.putString("term", queryParameter2);
}
String queryParameter3 = uri.getQueryParameter("utm_content");
if (!TextUtils.isEmpty(queryParameter3)) {
bundle.putString(Annotation.CONTENT, queryParameter3);
}
String queryParameter4 = uri.getQueryParameter("aclid");
if (!TextUtils.isEmpty(queryParameter4)) {
bundle.putString("aclid", queryParameter4);
}
String queryParameter5 = uri.getQueryParameter("cp1");
if (!TextUtils.isEmpty(queryParameter5)) {
bundle.putString("cp1", queryParameter5);
}
String queryParameter6 = uri.getQueryParameter("anid");
if (!TextUtils.isEmpty(queryParameter6)) {
bundle.putString("anid", queryParameter6);
}
if (!TextUtils.isEmpty(str6)) {
bundle.putString("campaign_id", str6);
}
if (!TextUtils.isEmpty(str7)) {
bundle.putString("dclid", str7);
}
String queryParameter7 = uri.getQueryParameter("utm_source_platform");
if (!TextUtils.isEmpty(queryParameter7)) {
bundle.putString("source_platform", queryParameter7);
}
String queryParameter8 = uri.getQueryParameter("utm_creative_format");
if (!TextUtils.isEmpty(queryParameter8)) {
bundle.putString("creative_format", queryParameter8);
}
String queryParameter9 = uri.getQueryParameter("utm_marketing_tactic");
if (!TextUtils.isEmpty(queryParameter9)) {
bundle.putString("marketing_tactic", queryParameter9);
}
if (!TextUtils.isEmpty(str8)) {
bundle.putString("srsltid", str8);
}
if (!TextUtils.isEmpty(str9)) {
bundle.putString(str10, str9);
}
return bundle;
} catch (UnsupportedOperationException e) {
mo5535catch().m15080synchronized().m17249for("Install referrer url isn't a hierarchical URI", e);
return null;
}
}
public final void b(Bundle bundle, Bundle bundle2) {
if (bundle2 == null) {
return;
}
for (String str : bundle2.keySet()) {
if (!bundle.containsKey(str)) {
mo5533break().c(bundle, str, bundle2.get(str));
}
}
}
@Override
public final q03 mo5533break() {
return super.mo5533break();
}
public final void c(Bundle bundle, String str, Object obj) {
if (bundle == null) {
return;
}
if (obj instanceof Long) {
bundle.putLong(str, ((Long) obj).longValue());
return;
}
if (obj instanceof String) {
bundle.putString(str, String.valueOf(obj));
return;
}
if (obj instanceof Double) {
bundle.putDouble(str, ((Double) obj).doubleValue());
} else if (obj instanceof Bundle[]) {
bundle.putParcelableArray(str, (Bundle[]) obj);
} else if (str != null) {
mo5535catch().a().m17251new("Not putting event parameter. Invalid value type. name, type", mo5542goto().m7738else(str), obj != null ? obj.getClass().getSimpleName() : null);
}
}
public final int c0(String str) {
if (!K("event param", str)) {
return 3;
}
if (C("event param", null, str)) {
return !x("event param", 40, str) ? 3 : 0;
}
return 14;
}
@Override
public final h52 mo5534case() {
return super.mo5534case();
}
@Override
public final rj2 mo5535catch() {
return super.mo5535catch();
}
@Override
public final void mo5536class() {
super.mo5536class();
}
@Override
public final tm2 mo5537const() {
return super.mo5537const();
}
public final void d(ed2 ed2Var, int i) {
Bundle bundle = new Bundle();
bundle.putInt("r", i);
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning int value to wrapper", e);
}
}
public final int d0(String str) {
if (!Q("event param", str)) {
return 3;
}
if (C("event param", null, str)) {
return !x("event param", 40, str) ? 3 : 0;
}
return 14;
}
public final int m14399default(java.lang.String r16, java.lang.String r17, java.lang.String r18, java.lang.Object r19, android.os.Bundle r20, java.util.List r21, boolean r22, boolean r23) {
throw new UnsupportedOperationException("Method not decompiled: com.sgcr.q03.m14399default(java.lang.String, java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
}
public final void e(ed2 ed2Var, long j) {
Bundle bundle = new Bundle();
bundle.putLong("r", j);
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning long value to wrapper", e);
}
}
@Override
public final s62 mo5539else() {
return super.mo5539else();
}
public final void f(ed2 ed2Var, Bundle bundle) {
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning bundle value to wrapper", e);
}
}
public final long f0() {
long andIncrement;
long j;
if (this.f13089try.get() != 0) {
synchronized (this.f13089try) {
this.f13089try.compareAndSet(-1L, 1L);
andIncrement = this.f13089try.getAndIncrement();
}
return andIncrement;
}
synchronized (this.f13089try) {
long nextLong = new Random(System.nanoTime() ^ mo5541for().mo17327if()).nextLong();
int i = this.f13084case + 1;
this.f13084case = i;
j = nextLong + i;
}
return j;
}
@Override
public final void mo5540final() {
super.mo5540final();
}
public final long m14400finally(Context context, String str) {
mo5555super();
wx0.m18045class(context);
wx0.m18043case(str);
PackageManager packageManager = context.getPackageManager();
MessageDigest j0 = j0();
long j = -1;
if (j0 == null) {
mo5535catch().m15078interface().m17250if("Could not get MD5 instance");
} else {
if (packageManager != null) {
try {
} catch (PackageManager.NameNotFoundException e) {
mo5535catch().m15078interface().m17249for("Package name not found", e);
}
if (!I(context, str)) {
Signature[] signatureArr = sy1.m15807if(context).m17371case(mo5543if().getPackageName(), 64).signatures;
if (signatureArr == null || signatureArr.length <= 0) {
mo5535catch().m15080synchronized().m17250if("Could not get signatures");
} else {
j = m14396private(j0.digest(signatureArr[0].toByteArray()));
}
}
}
j = 0;
}
return j;
}
@Override
public final yf mo5541for() {
return super.mo5541for();
}
public final void g(ed2 ed2Var, String str) {
Bundle bundle = new Bundle();
bundle.putString("r", str);
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning string value to wrapper", e);
}
}
public final qm0 g0() {
if (this.f13085else == null) {
this.f13085else = qm0.m14552if(mo5543if());
}
return this.f13085else;
}
@Override
public final ej2 mo5542goto() {
return super.mo5542goto();
}
public final void h(ed2 ed2Var, ArrayList arrayList) {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("r", arrayList);
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning bundle list to wrapper", e);
}
}
public final void i(ed2 ed2Var, boolean z) {
Bundle bundle = new Bundle();
bundle.putBoolean("r", z);
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning boolean value to wrapper", e);
}
}
public final String i0() {
byte[] bArr = new byte[16];
k0().nextBytes(bArr);
return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
}
@Override
public final Context mo5543if() {
return super.mo5543if();
}
public final URL m14401instanceof(long j, String str, String str2, long j2, String str3) {
try {
wx0.m18043case(str2);
wx0.m18043case(str);
String format = String.format("https://www.googleadservices.com/pagead/conversion/app/deeplink?id_type=adid&sdk_version=%s&rdid=%s&bundleid=%s&retry=%s", String.format("v%s.%s", Long.valueOf(j), Integer.valueOf(W())), str2, str, Long.valueOf(j2));
if (str.equals(mo5534case().e())) {
format = format.concat("&ddl_test=1");
}
if (!str3.isEmpty()) {
if (str3.charAt(0) != '&') {
format = format.concat("&");
}
format = format.concat(str3);
}
return new URL(format);
} catch (IllegalArgumentException | MalformedURLException e) {
mo5535catch().m15078interface().m17249for("Failed to create BOW URL for Deferred Deep Link. exception", e.getMessage());
return null;
}
}
public final void j(ed2 ed2Var, byte[] bArr) {
Bundle bundle = new Bundle();
bundle.putByteArray("r", bArr);
try {
ed2Var.mo7638else(bundle);
} catch (RemoteException e) {
this.f12695if.mo5535catch().m15080synchronized().m17249for("Error returning byte array to wrapper", e);
}
}
public final void k(ik2 ik2Var, int i) {
int i2 = 0;
for (String str : new TreeSet(ik2Var.f9885try.keySet())) {
if (Z(str) && (i2 = i2 + 1) > i) {
mo5535catch().m15079protected().m17251new("Event can't contain more than " + i + " params", mo5542goto().m7742new(ik2Var.f9883if), mo5542goto().m7741if(ik2Var.f9885try));
J(ik2Var.f9885try, 5);
ik2Var.f9885try.remove(str);
}
}
}
public final SecureRandom k0() {
mo5555super();
if (this.f13087new == null) {
this.f13087new = new SecureRandom();
}
return this.f13087new;
}
public final boolean l0() {
mo5555super();
return Y() == 1;
}
public final boolean m0() {
try {
mo5543if().getClassLoader().loadClass("com.google.firebase.remoteconfig.FirebaseRemoteConfig");
return true;
} catch (ClassNotFoundException unused) {
return false;
}
}
public final boolean n0() {
Integer num;
if (this.f13086goto == null) {
qm0 g0 = g0();
boolean z = false;
if (g0 == null) {
return false;
}
Integer num2 = null;
try {
num = (Integer) g0.mo14553for().get(10000L, TimeUnit.MILLISECONDS);
if (num != null) {
try {
if (num.intValue() == 1) {
z = true;
}
} catch (InterruptedException e) {
e = e;
num2 = num;
mo5535catch().m15080synchronized().m17249for("Measurement manager api exception", e);
this.f13086goto = Boolean.FALSE;
num = num2;
mo5535catch().m15077instanceof().m17249for("Measurement manager api status result", num);
return this.f13086goto.booleanValue();
} catch (CancellationException e2) {
e = e2;
num2 = num;
mo5535catch().m15080synchronized().m17249for("Measurement manager api exception", e);
this.f13086goto = Boolean.FALSE;
num = num2;
mo5535catch().m15077instanceof().m17249for("Measurement manager api status result", num);
return this.f13086goto.booleanValue();
} catch (ExecutionException e3) {
e = e3;
num2 = num;
mo5535catch().m15080synchronized().m17249for("Measurement manager api exception", e);
this.f13086goto = Boolean.FALSE;
num = num2;
mo5535catch().m15077instanceof().m17249for("Measurement manager api status result", num);
return this.f13086goto.booleanValue();
} catch (TimeoutException e4) {
e = e4;
num2 = num;
mo5535catch().m15080synchronized().m17249for("Measurement manager api exception", e);
this.f13086goto = Boolean.FALSE;
num = num2;
mo5535catch().m15077instanceof().m17249for("Measurement manager api status result", num);
return this.f13086goto.booleanValue();
}
}
this.f13086goto = Boolean.valueOf(z);
} catch (InterruptedException e5) {
e = e5;
} catch (CancellationException e6) {
e = e6;
} catch (ExecutionException e7) {
e = e7;
} catch (TimeoutException e8) {
e = e8;
}
mo5535catch().m15077instanceof().m17249for("Measurement manager api status result", num);
}
return this.f13086goto.booleanValue();
}
public final void o(String str, String str2, String str3, Bundle bundle, List list, boolean z) {
int d0;
String str4;
int m14399default;
vj2 m15079protected;
String m7742new;
String m7741if;
String str5;
if (bundle == null) {
return;
}
int m9456default = mo5534case().m9456default();
int i = 0;
for (String str6 : new TreeSet(bundle.keySet())) {
if (list == null || !list.contains(str6)) {
d0 = !z ? d0(str6) : 0;
if (d0 == 0) {
d0 = c0(str6);
}
} else {
d0 = 0;
}
if (d0 != 0) {
m14397synchronized(bundle, d0, str6, d0 == 3 ? str6 : null);
bundle.remove(str6);
} else {
if (v(bundle.get(str6))) {
mo5535catch().a().m17252try("Nested Bundle parameters are not allowed; discarded. event name, param name, child param name", str2, str3, str6);
m14399default = 22;
str4 = str6;
} else {
str4 = str6;
m14399default = m14399default(str, str2, str6, bundle.get(str6), bundle, list, z, false);
}
if (m14399default != 0 && !"_ev".equals(str4)) {
m14397synchronized(bundle, m14399default, str4, bundle.get(str4));
bundle.remove(str4);
} else if (Z(str4) && !B(str4, aq2.f6489try)) {
int i2 = i + 1;
if (q(231100000, true)) {
if (i2 > m9456default) {
if (c23.m6235if() && mo5534case().m9468return(x72.M)) {
mo5535catch().m15079protected().m17251new("Item can't contain more than " + m9456default + " item-scoped custom params", mo5542goto().m7742new(str2), mo5542goto().m7741if(bundle));
J(bundle, 28);
bundle.remove(str4);
} else {
m15079protected = mo5535catch().m15079protected();
m7742new = mo5542goto().m7742new(str2);
m7741if = mo5542goto().m7741if(bundle);
str5 = "Item cannot contain custom parameters";
}
}
i = i2;
} else {
m15079protected = mo5535catch().m15079protected();
m7742new = mo5542goto().m7742new(str2);
m7741if = mo5542goto().m7741if(bundle);
str5 = "Item array not supported on client's version of Google Play Services (Android Only)";
}
m15079protected.m17251new(str5, m7742new, m7741if);
J(bundle, 23);
bundle.remove(str4);
i = i2;
}
}
}
}
public final void p(Parcelable[] parcelableArr, int i, boolean z) {
int i2;
wx0.m18045class(parcelableArr);
for (Parcelable parcelable : parcelableArr) {
Bundle bundle = (Bundle) parcelable;
int i3 = 0;
for (String str : new TreeSet(bundle.keySet())) {
if (Z(str) && !B(str, aq2.f6489try) && (i3 = i3 + 1) > i) {
vj2 m15079protected = mo5535catch().m15079protected();
if (z) {
m15079protected.m17251new("Param can't contain more than " + i + " item-scoped custom parameters", mo5542goto().m7738else(str), mo5542goto().m7741if(bundle));
i2 = 28;
} else {
m15079protected.m17251new("Param cannot contain item-scoped custom parameters", mo5542goto().m7738else(str), mo5542goto().m7741if(bundle));
i2 = 23;
}
J(bundle, i2);
bundle.remove(str);
}
}
}
}
public final zzbd m14402protected(String str, String str2, Bundle bundle, String str3, long j, boolean z, boolean z2) {
if (TextUtils.isEmpty(str2)) {
return null;
}
if (m14405switch(str2) != 0) {
mo5535catch().m15078interface().m17249for("Invalid conditional property event name", mo5542goto().m7740goto(str2));
throw new IllegalArgumentException();
}
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
bundle2.putString("_o", str3);
Bundle m14408volatile = m14408volatile(str, str2, bundle2, og.m13673if("_o"), true);
if (z) {
m14408volatile = m14404strictfp(m14408volatile, str);
}
wx0.m18045class(m14408volatile);
return new zzbd(str2, new zzbc(m14408volatile), str3, j);
}
public final boolean q(int i, boolean z) {
Boolean k = this.f12695if.m9053implements().k();
if (W() < i / 1000) {
return (k == null || k.booleanValue()) ? false : true;
}
return true;
}
@Override
public final boolean mo12778return() {
return true;
}
public final int m14403static(int i) {
return g80.m8663else().mo8063this(mo5543if(), l80.f10986if);
}
public final Bundle m14404strictfp(Bundle bundle, String str) {
Bundle bundle2 = new Bundle();
if (bundle != null) {
for (String str2 : bundle.keySet()) {
Object G = G(str2, bundle.get(str2));
if (G == null) {
mo5535catch().a().m17249for("Param value can't be null", mo5542goto().m7738else(str2));
} else {
c(bundle2, str2, G);
}
}
}
return bundle2;
}
@Override
public final void mo5555super() {
super.mo5555super();
}
public final int m14405switch(String str) {
if (!K("event", str)) {
return 2;
}
if (D("event", cq2.f7230if, cq2.f7229for, str)) {
return !x("event", 40, str) ? 2 : 0;
}
return 13;
}
@Override
public final wk2 mo5557this() {
return super.mo5557this();
}
@Override
public final void mo12779throw() {
mo5555super();
SecureRandom secureRandom = new SecureRandom();
long nextLong = secureRandom.nextLong();
if (nextLong == 0) {
nextLong = secureRandom.nextLong();
if (nextLong == 0) {
mo5535catch().m15080synchronized().m17250if("Utils falling back to Random for random id");
}
}
this.f13089try.set(nextLong);
}
public final int m14406throws(String str, Object obj) {
return z("_ldl".equals(str) ? "user property referrer" : "user property", str, e0(str), obj) ? 0 : 7;
}
public final Object m14407transient(int i, Object obj, boolean z, boolean z2, String str) {
Bundle m14404strictfp;
if (obj == null) {
return null;
}
if ((obj instanceof Long) || (obj instanceof Double)) {
return obj;
}
if (obj instanceof Integer) {
return Long.valueOf(((Integer) obj).intValue());
}
if (obj instanceof Byte) {
return Long.valueOf(((Byte) obj).byteValue());
}
if (obj instanceof Short) {
return Long.valueOf(((Short) obj).shortValue());
}
if (obj instanceof Boolean) {
return Long.valueOf(((Boolean) obj).booleanValue() ? 1L : 0L);
}
if (obj instanceof Float) {
return Double.valueOf(((Float) obj).doubleValue());
}
if ((obj instanceof String) || (obj instanceof Character) || (obj instanceof CharSequence)) {
return m14393implements(String.valueOf(obj), i, z);
}
if (!z2 || (!(obj instanceof Bundle[]) && !(obj instanceof Parcelable[]))) {
return null;
}
ArrayList arrayList = new ArrayList();
for (Parcelable parcelable : (Parcelable[]) obj) {
if ((parcelable instanceof Bundle) && (m14404strictfp = m14404strictfp((Bundle) parcelable, null)) != null && !m14404strictfp.isEmpty()) {
arrayList.add(m14404strictfp);
}
}
return arrayList.toArray(new Bundle[arrayList.size()]);
}
@Override
public final m42 mo5560try() {
return super.mo5560try();
}
public final Bundle m14408volatile(String str, String str2, Bundle bundle, List list, boolean z) {
int d0;
int i;
q03 q03Var = this;
boolean B = B(str2, cq2.f7232try);
if (bundle == null) {
return null;
}
Bundle bundle2 = new Bundle(bundle);
int m9466protected = mo5534case().m9466protected();
int i2 = 0;
for (String str3 : new TreeSet(bundle.keySet())) {
if (list == null || !list.contains(str3)) {
d0 = !z ? q03Var.d0(str3) : 0;
if (d0 == 0) {
d0 = q03Var.c0(str3);
}
} else {
d0 = 0;
}
if (d0 != 0) {
m14397synchronized(bundle2, d0, str3, d0 == 3 ? str3 : null);
bundle2.remove(str3);
i = m9466protected;
} else {
i = m9466protected;
int m14399default = m14399default(str, str2, str3, bundle.get(str3), bundle2, list, z, B);
if (m14399default == 17) {
m14397synchronized(bundle2, m14399default, str3, Boolean.FALSE);
} else if (m14399default != 0 && !"_ev".equals(str3)) {
m14397synchronized(bundle2, m14399default, m14399default == 21 ? str2 : str3, bundle.get(str3));
bundle2.remove(str3);
}
if (Z(str3)) {
int i3 = i2 + 1;
if (i3 > i) {
mo5535catch().m15079protected().m17251new("Event can't contain more than " + i + " params", mo5542goto().m7742new(str2), mo5542goto().m7741if(bundle));
J(bundle2, 5);
bundle2.remove(str3);
}
i2 = i3;
}
}
m9466protected = i;
q03Var = this;
}
return bundle2;
}
public final boolean w(String str, double d) {
try {
SharedPreferences.Editor edit = mo5543if().getSharedPreferences("google.analytics.deferred.deeplink.prefs", 0).edit();
edit.putString("deeplink", str);
edit.putLong("timestamp", Double.doubleToRawLongBits(d));
return edit.commit();
} catch (RuntimeException e) {
mo5535catch().m15078interface().m17249for("Failed to persist Deferred Deep Link. exception", e);
return false;
}
}
public final boolean x(String str, int i, String str2) {
if (str2 == null) {
mo5535catch().m15079protected().m17249for("Name is required and can't be null. Type", str);
return false;
}
if (str2.codePointCount(0, str2.length()) <= i) {
return true;
}
mo5535catch().m15079protected().m17252try("Name is too long. Type, maximum supported length, name", str, Integer.valueOf(i), str2);
return false;
}
public final boolean y(String str, String str2) {
if (!TextUtils.isEmpty(str)) {
if (h0(str)) {
return true;
}
if (this.f12695if.m9057native()) {
mo5535catch().m15079protected().m17249for("Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id", rj2.m15071switch(str));
}
return false;
}
if (TextUtils.isEmpty(str2)) {
if (this.f12695if.m9057native()) {
mo5535catch().m15079protected().m17250if("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
}
return false;
}
if (h0(str2)) {
return true;
}
mo5535catch().m15079protected().m17249for("Invalid admob_app_id. Analytics disabled.", rj2.m15071switch(str2));
return false;
}
public final boolean z(String str, String str2, int i, Object obj) {
if (obj != null && !(obj instanceof Long) && !(obj instanceof Float) && !(obj instanceof Integer) && !(obj instanceof Byte) && !(obj instanceof Short) && !(obj instanceof Boolean) && !(obj instanceof Double)) {
if (!(obj instanceof String) && !(obj instanceof Character) && !(obj instanceof CharSequence)) {
return false;
}
String valueOf = String.valueOf(obj);
if (valueOf.codePointCount(0, valueOf.length()) > i) {
mo5535catch().a().m17252try("Value is too long; discarded. Value kind, name, value length", str, str2, Integer.valueOf(valueOf.length()));
return false;
}
}
return true;
}
}