正在查看: Online Loans v421.2.42 应用的 o7.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Online Loans v421.2.42 应用的 o7.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package m2;
import P1.AbstractC0657i;
import P1.C0655g;
import S1.AbstractC0725o;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
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.internal.measurement.InterfaceC1308z0;
import j$.util.Objects;
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.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 o7 extends U3 {
public static final String[] f18490i = {"firebase_", "google_", "ga_"};
public static final String[] f18491j = {"_err"};
public SecureRandom f18492c;
public final AtomicLong f18493d;
public int f18494e;
public B0.a f18495f;
public Boolean f18496g;
public Integer f18497h;
public o7(C2052q3 c2052q3) {
super(c2052q3);
this.f18497h = null;
this.f18493d = new AtomicLong(0L);
}
public static MessageDigest C() {
MessageDigest messageDigest;
for (int i6 = 0; i6 < 2; i6++) {
try {
messageDigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException unused) {
}
if (messageDigest != null) {
return messageDigest;
}
}
return null;
}
public static long D(byte[] bArr) {
AbstractC0725o.k(bArr);
int length = bArr.length;
int i6 = 0;
AbstractC0725o.n(length > 0);
long j6 = 0;
for (int i7 = length - 1; i7 >= 0 && i7 >= bArr.length - 8; i7--) {
j6 += (bArr[i7] & 255) << i6;
i6 += 8;
}
return j6;
}
public static boolean E(Context context, boolean z6) {
AbstractC0725o.k(context);
return Build.VERSION.SDK_INT >= 24 ? F(context, "com.google.android.gms.measurement.AppMeasurementJobService") : F(context, "com.google.android.gms.measurement.AppMeasurementService");
}
public static boolean F(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 N(String str) {
return !TextUtils.isEmpty(str) && str.startsWith("_");
}
public static boolean O(String str, String[] strArr) {
AbstractC0725o.k(strArr);
for (String str2 : strArr) {
if (Objects.equals(str, str2)) {
return true;
}
}
return false;
}
public static boolean U(String str) {
return !f18491j[0].equals(str);
}
public static ArrayList h0(List list) {
if (list == null) {
return new ArrayList(0);
}
ArrayList arrayList = new ArrayList(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
C1984i c1984i = (C1984i) it.next();
Bundle bundle = new Bundle();
bundle.putString("app_id", c1984i.f18375a);
bundle.putString("origin", c1984i.f18376b);
bundle.putLong("creation_timestamp", c1984i.f18378d);
bundle.putString("name", c1984i.f18377c.f18423b);
W3.a(bundle, AbstractC0725o.k(c1984i.f18377c.d()));
bundle.putBoolean("active", c1984i.f18379e);
String str = c1984i.f18380i;
if (str != null) {
bundle.putString("trigger_event_name", str);
}
C1915J c1915j = c1984i.f18381s;
if (c1915j != null) {
bundle.putString("timed_out_event_name", c1915j.f17714a);
C1913H c1913h = c1915j.f17715b;
if (c1913h != null) {
bundle.putBundle("timed_out_event_params", c1913h.o());
}
}
bundle.putLong("trigger_timeout", c1984i.f18382t);
C1915J c1915j2 = c1984i.f18383u;
if (c1915j2 != null) {
bundle.putString("triggered_event_name", c1915j2.f17714a);
C1913H c1913h2 = c1915j2.f17715b;
if (c1913h2 != null) {
bundle.putBundle("triggered_event_params", c1913h2.o());
}
}
bundle.putLong("triggered_timestamp", c1984i.f18377c.f18424c);
bundle.putLong("time_to_live", c1984i.f18384v);
C1915J c1915j3 = c1984i.f18385w;
if (c1915j3 != null) {
bundle.putString("expired_event_name", c1915j3.f17714a);
C1913H c1913h3 = c1915j3.f17715b;
if (c1913h3 != null) {
bundle.putBundle("expired_event_params", c1913h3.o());
}
}
arrayList.add(bundle);
}
return arrayList;
}
public static boolean j0(Context context) {
ActivityInfo receiverInfo;
AbstractC0725o.k(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 void k0(C2046p5 c2046p5, Bundle bundle, boolean z6) {
if (bundle != null && c2046p5 != null) {
if (!bundle.containsKey("_sc") || z6) {
String str = c2046p5.f18503a;
if (str != null) {
bundle.putString("_sn", str);
} else {
bundle.remove("_sn");
}
String str2 = c2046p5.f18504b;
if (str2 != null) {
bundle.putString("_sc", str2);
} else {
bundle.remove("_sc");
}
bundle.putLong("_si", c2046p5.f18505c);
return;
}
z6 = false;
}
if (bundle != null && c2046p5 == null && z6) {
bundle.remove("_sn");
bundle.remove("_sc");
bundle.remove("_si");
}
}
public static final boolean m0(Bundle bundle, int i6) {
if (bundle == null || bundle.getLong("_err") != 0) {
return false;
}
bundle.putLong("_err", i6);
return true;
}
public static boolean r0(String str) {
AbstractC0725o.e(str);
return str.charAt(0) != '_' || str.equals("_ep");
}
public final void A(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());
return;
}
if (obj instanceof Bundle[]) {
bundle.putParcelableArray(str, (Bundle[]) obj);
} else if (str != null) {
String simpleName = obj != null ? obj.getClass().getSimpleName() : null;
C2052q3 c2052q3 = this.f17959a;
c2052q3.a().t().c("Not putting event parameter. Invalid value type. name, type", c2052q3.D().b(str), simpleName);
}
}
public final int A0(String str) {
if (!u0("event param", str)) {
return 3;
}
if (!v0("event param", null, null, str)) {
return 14;
}
this.f17959a.w();
return !w0("event param", 40, str) ? 3 : 0;
}
public final void B(n7 n7Var, String str, int i6, String str2, String str3, int i7) {
Bundle bundle = new Bundle();
m0(bundle, i6);
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
bundle.putString(str2, str3);
}
if (i6 == 6 || i6 == 7 || i6 == 2) {
bundle.putLong("_el", i7);
}
n7Var.a(str, "_err", bundle);
}
public final boolean B0(Object obj) {
return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
}
public final boolean C0(String str, String str2, int i6, 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 obj2 = obj.toString();
if (obj2.codePointCount(0, obj2.length()) > i6) {
this.f17959a.a().t().d("Value is too long; discarded. Value kind, name, value length", str, str2, Integer.valueOf(obj2.length()));
return false;
}
}
return true;
}
public final void D0(String str, String str2, String str3, Bundle bundle, List list, boolean z6) {
int z02;
int i6;
char c7;
String str4;
int i7;
int r6;
if (bundle == null) {
return;
}
C2052q3 c2052q3 = this.f17959a;
char c8 = 20064;
int i8 = true != c2052q3.w().f17959a.C().V(231100000, true) ? 0 : 35;
int i9 = 0;
boolean z7 = false;
for (String str5 : new TreeSet(bundle.keySet())) {
if (list == null || !list.contains(str5)) {
z02 = !z6 ? z0(str5) : 0;
if (z02 == 0) {
z02 = A0(str5);
}
} else {
z02 = 0;
}
if (z02 != 0) {
x(bundle, z02, str5, z02 == 3 ? str5 : null);
bundle.remove(str5);
i6 = i8;
c7 = c8;
} else {
if (B0(bundle.get(str5))) {
c2052q3.a().t().d("Nested Bundle parameters are not allowed; discarded. event name, param name, child param name", str2, str3, str5);
r6 = 22;
str4 = str5;
i7 = i8;
} else {
str4 = str5;
i7 = i8;
r6 = r(str, str2, str5, bundle.get(str5), bundle, list, z6, false);
}
if (r6 != 0 && !"_ev".equals(str4)) {
x(bundle, r6, str4, bundle.get(str4));
bundle.remove(str4);
} else if (r0(str4) && !O(str4, AbstractC1941c4.f18086d)) {
int i10 = i9 + 1;
c7 = 20064;
if (V(231100000, true)) {
i6 = i7;
if (i10 > i6) {
if (!c2052q3.w().H(null, AbstractC1963f2.f18265g1) || !z7) {
A2 q6 = c2052q3.a().q();
StringBuilder sb = new StringBuilder(String.valueOf(i6).length() + 55);
sb.append("Item can't contain more than ");
sb.append(i6);
sb.append(" item-scoped custom params");
q6.c(sb.toString(), c2052q3.D().a(str2), c2052q3.D().e(bundle));
}
m0(bundle, 28);
bundle.remove(str4);
i9 = i10;
c8 = 20064;
i8 = i6;
z7 = true;
}
} else {
c2052q3.a().q().c("Item array not supported on client's version of Google Play Services (Android Only)", c2052q3.D().a(str2), c2052q3.D().e(bundle));
m0(bundle, 23);
bundle.remove(str4);
i6 = i7;
}
i9 = i10;
}
i6 = i7;
c7 = 20064;
}
c8 = c7;
i8 = i6;
}
}
public final boolean G() {
h();
return J() == 1;
}
public final B0.a H() {
if (this.f18495f == null) {
this.f18495f = B0.a.a(this.f17959a.e());
}
return this.f18495f;
}
public final int I() {
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 final long J() {
int extensionVersion;
long j6;
h();
if (!L(this.f17959a.L().q())) {
return 0L;
}
if (Build.VERSION.SDK_INT < 30) {
j6 = 4;
} else {
extensionVersion = SdkExtensions.getExtensionVersion(30);
if (extensionVersion < 4) {
j6 = 8;
} else {
C2052q3 c2052q3 = this.f17959a;
int I6 = I();
c2052q3.w();
j6 = I6 < ((Integer) AbstractC1963f2.f18281m0.b(null)).intValue() ? 16L : 0L;
}
}
if (!M("android.permission.ACCESS_ADSERVICES_ATTRIBUTION")) {
j6 |= 2;
}
if (j6 == 0 && !K()) {
j6 = 64;
}
if (j6 == 0) {
return 1L;
}
return j6;
}
public final boolean K() {
Object e7;
Integer num;
if (this.f18496g == null) {
B0.a H6 = H();
boolean z6 = false;
if (H6 == null) {
return false;
}
try {
num = (Integer) H6.b().get(10000L, TimeUnit.MILLISECONDS);
if (num != null) {
try {
if (num.intValue() == 1) {
z6 = true;
}
} catch (InterruptedException e8) {
e7 = e8;
this.f17959a.a().r().b("Measurement manager api exception", e7);
this.f18496g = Boolean.FALSE;
this.f17959a.a().w().b("Measurement manager api status result", num);
return this.f18496g.booleanValue();
} catch (CancellationException e9) {
e7 = e9;
this.f17959a.a().r().b("Measurement manager api exception", e7);
this.f18496g = Boolean.FALSE;
this.f17959a.a().w().b("Measurement manager api status result", num);
return this.f18496g.booleanValue();
} catch (ExecutionException e10) {
e7 = e10;
this.f17959a.a().r().b("Measurement manager api exception", e7);
this.f18496g = Boolean.FALSE;
this.f17959a.a().w().b("Measurement manager api status result", num);
return this.f18496g.booleanValue();
} catch (TimeoutException e11) {
e7 = e11;
this.f17959a.a().r().b("Measurement manager api exception", e7);
this.f18496g = Boolean.FALSE;
this.f17959a.a().w().b("Measurement manager api status result", num);
return this.f18496g.booleanValue();
}
}
this.f18496g = Boolean.valueOf(z6);
} catch (InterruptedException | CancellationException | ExecutionException | TimeoutException e12) {
e7 = e12;
num = null;
}
this.f17959a.a().w().b("Measurement manager api status result", num);
}
return this.f18496g.booleanValue();
}
public final boolean L(String str) {
String str2 = (String) AbstractC1963f2.f18293s0.b(null);
return str2.equals("*") || Arrays.asList(str2.split(",")).contains(str);
}
public final boolean M(String str) {
h();
C2052q3 c2052q3 = this.f17959a;
if (Y1.d.a(c2052q3.e()).a(str) == 0) {
return true;
}
c2052q3.a().v().b("Permission not granted", str);
return false;
}
public final boolean P(String str, String str2) {
if (!TextUtils.isEmpty(str2)) {
return true;
}
if (TextUtils.isEmpty(str)) {
return false;
}
C2052q3 c2052q3 = this.f17959a;
String i6 = c2052q3.w().i();
c2052q3.c();
return i6.equals(str);
}
public final Bundle Q(Bundle bundle, String str) {
Bundle bundle2 = new Bundle();
if (bundle != null) {
for (String str2 : bundle.keySet()) {
Object s6 = s(str2, bundle.get(str2));
if (s6 == null) {
C2052q3 c2052q3 = this.f17959a;
c2052q3.a().t().b("Param value can't be null", c2052q3.D().b(str2));
} else {
A(bundle2, str2, s6);
}
}
}
return bundle2;
}
public final C1915J R(String str, String str2, Bundle bundle, String str3, long j6, boolean z6, boolean z7) {
if (TextUtils.isEmpty(str2)) {
return null;
}
if (x0(str2) != 0) {
C2052q3 c2052q3 = this.f17959a;
c2052q3.a().o().b("Invalid conditional property event name", c2052q3.D().c(str2));
throw new IllegalArgumentException();
}
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
bundle2.putString("_o", str3);
Bundle t6 = t(str, str2, bundle2, W1.e.a("_o"), true);
if (z6) {
t6 = Q(t6, str);
}
AbstractC0725o.k(t6);
return new C1915J(str2, new C1913H(t6), str3, j6);
}
public final boolean S(Context context, String str) {
Signature[] signatureArr;
X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
try {
PackageInfo e7 = Y1.d.a(context).e(str, 64);
if (e7 == null || (signatureArr = e7.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 e8) {
this.f17959a.a().o().b("Package name not found", e8);
return true;
} catch (CertificateException e9) {
this.f17959a.a().o().b("Error obtaining certificate", e9);
return true;
}
}
public final byte[] T(Parcelable parcelable) {
if (parcelable == null) {
return null;
}
Parcel obtain = Parcel.obtain();
try {
parcelable.writeToParcel(obtain, 0);
return obtain.marshall();
} finally {
obtain.recycle();
}
}
public final boolean V(int i6, boolean z6) {
Boolean x6 = this.f17959a.J().x();
if (W() < i6 / 1000) {
return (x6 == null || x6.booleanValue()) ? false : true;
}
return true;
}
public final int W() {
if (this.f18497h == null) {
this.f18497h = Integer.valueOf(C0655g.f().a(this.f17959a.e()) / 1000);
}
return this.f18497h.intValue();
}
public final int X(int i6) {
return C0655g.f().h(this.f17959a.e(), AbstractC0657i.f4334a);
}
public final long Y(long j6, long j7) {
return (j6 + (j7 * 60000)) / 86400000;
}
public final void Z(Bundle bundle, long j6) {
long j7 = bundle.getLong("_et");
if (j7 != 0) {
this.f17959a.a().r().b("Params already contained engagement", Long.valueOf(j7));
} else {
j7 = 0;
}
bundle.putLong("_et", j6 + j7);
}
public final void a0(InterfaceC1308z0 interfaceC1308z0, String str) {
Bundle bundle = new Bundle();
bundle.putString("r", str);
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning string value to wrapper", e7);
}
}
public final void b0(InterfaceC1308z0 interfaceC1308z0, long j6) {
Bundle bundle = new Bundle();
bundle.putLong("r", j6);
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning long value to wrapper", e7);
}
}
public final void c0(InterfaceC1308z0 interfaceC1308z0, int i6) {
Bundle bundle = new Bundle();
bundle.putInt("r", i6);
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning int value to wrapper", e7);
}
}
public final void d0(InterfaceC1308z0 interfaceC1308z0, byte[] bArr) {
Bundle bundle = new Bundle();
bundle.putByteArray("r", bArr);
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning byte array to wrapper", e7);
}
}
public final void e0(InterfaceC1308z0 interfaceC1308z0, boolean z6) {
Bundle bundle = new Bundle();
bundle.putBoolean("r", z6);
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning boolean value to wrapper", e7);
}
}
public final void f0(InterfaceC1308z0 interfaceC1308z0, Bundle bundle) {
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning bundle value to wrapper", e7);
}
}
public final void g0(InterfaceC1308z0 interfaceC1308z0, ArrayList arrayList) {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("r", arrayList);
try {
interfaceC1308z0.h(bundle);
} catch (RemoteException e7) {
this.f17959a.a().r().b("Error returning bundle list to wrapper", e7);
}
}
@Override
public final boolean i() {
return true;
}
public final URL i0(long j6, String str, String str2, long j7, String str3) {
try {
AbstractC0725o.e(str2);
AbstractC0725o.e(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", 130000L, Integer.valueOf(W())), str2, str, Long.valueOf(j7));
if (str.equals(this.f17959a.w().j())) {
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 e7) {
e = e7;
this.f17959a.a().o().b("Failed to create BOW URL for Deferred Deep Link. exception", e.getMessage());
return null;
} catch (MalformedURLException e8) {
e = e8;
this.f17959a.a().o().b("Failed to create BOW URL for Deferred Deep Link. exception", e.getMessage());
return null;
}
}
@Override
public final void j() {
h();
SecureRandom secureRandom = new SecureRandom();
long nextLong = secureRandom.nextLong();
if (nextLong == 0) {
nextLong = secureRandom.nextLong();
if (nextLong == 0) {
this.f17959a.a().r().a("Utils falling back to Random for random id");
}
}
this.f18493d.set(nextLong);
}
public final String l0() {
byte[] bArr = new byte[16];
q0().nextBytes(bArr);
return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
}
public final Object n0(int i6, Object obj, boolean z6, boolean z7, String str) {
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(true != ((Boolean) obj).booleanValue() ? 0L : 1L);
}
if (obj instanceof Float) {
return Double.valueOf(((Float) obj).doubleValue());
}
if ((obj instanceof String) || (obj instanceof Character) || (obj instanceof CharSequence)) {
return q(obj.toString(), i6, z6);
}
if (!z7 || (!(obj instanceof Bundle[]) && !(obj instanceof Parcelable[]))) {
return null;
}
ArrayList arrayList = new ArrayList();
for (Parcelable parcelable : (Parcelable[]) obj) {
if (parcelable instanceof Bundle) {
Bundle Q6 = Q((Bundle) parcelable, null);
if (!Q6.isEmpty()) {
arrayList.add(Q6);
}
}
}
return arrayList.toArray(new Bundle[arrayList.size()]);
}
public final boolean o(String str) {
if (TextUtils.isEmpty(str)) {
this.f17959a.a().q().a("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
return false;
}
AbstractC0725o.k(str);
if (str.matches("^1:\\d+:android:[a-f0-9]+$")) {
return true;
}
this.f17959a.a().q().b("Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id", C2.x(str));
return false;
}
public final int o0(String str) {
if ("_ldl".equals(str)) {
this.f17959a.w();
return 2048;
}
if ("_id".equals(str)) {
this.f17959a.w();
return 256;
}
if ("_lgclid".equals(str)) {
this.f17959a.w();
return 100;
}
this.f17959a.w();
return 36;
}
public final boolean p(String str, String str2) {
boolean isEmpty = TextUtils.isEmpty(str);
boolean isEmpty2 = TextUtils.isEmpty(str2);
if (!isEmpty && !isEmpty2) {
AbstractC0725o.k(str);
if (!str.equals(str2)) {
return true;
}
}
return false;
}
public final long p0() {
long andIncrement;
long j6;
AtomicLong atomicLong = this.f18493d;
if (atomicLong.get() != 0) {
AtomicLong atomicLong2 = this.f18493d;
synchronized (atomicLong2) {
atomicLong2.compareAndSet(-1L, 1L);
andIncrement = atomicLong2.getAndIncrement();
}
return andIncrement;
}
synchronized (atomicLong) {
long nextLong = new Random(System.nanoTime() ^ this.f17959a.f().a()).nextLong();
int i6 = this.f18494e + 1;
this.f18494e = i6;
j6 = nextLong + i6;
}
return j6;
}
public final String q(String str, int i6, boolean z6) {
if (str == null) {
return null;
}
if (str.codePointCount(0, str.length()) <= i6) {
return str;
}
if (z6) {
return String.valueOf(str.substring(0, str.offsetByCodePoints(0, i6))).concat("...");
}
return null;
}
public final SecureRandom q0() {
h();
if (this.f18492c == null) {
this.f18492c = new SecureRandom();
}
return this.f18492c;
}
public final int r(java.lang.String r14, java.lang.String r15, java.lang.String r16, java.lang.Object r17, android.os.Bundle r18, java.util.List r19, boolean r20, boolean r21) {
throw new UnsupportedOperationException("Method not decompiled: m2.o7.r(java.lang.String, java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
}
public final Object s(String str, Object obj) {
if ("_ev".equals(str)) {
return n0(this.f17959a.w().y(null, false), obj, true, true, null);
}
return n0(N(str) ? this.f17959a.w().y(null, false) : this.f17959a.w().x(null, false), obj, false, true, null);
}
public final Bundle s0(Uri uri) {
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 = uri.getQueryParameter("gbraid");
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) && 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("source", str2);
}
if (!TextUtils.isEmpty(str3)) {
bundle.putString("medium", str3);
}
if (!TextUtils.isEmpty(str4)) {
bundle.putString("gclid", str4);
}
if (!TextUtils.isEmpty(str5)) {
bundle.putString("gbraid", str5);
}
String queryParameter = uri.getQueryParameter("gad_source");
if (!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("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);
}
for (String str11 : uri.getQueryParameterNames()) {
if (str11.startsWith("gad_")) {
String queryParameter10 = uri.getQueryParameter(str11);
if (!TextUtils.isEmpty(queryParameter10)) {
bundle.putString(str11, queryParameter10);
}
}
}
return bundle;
} catch (UnsupportedOperationException e7) {
this.f17959a.a().r().b("Install referrer url isn't a hierarchical URI", e7);
return null;
}
}
public final Bundle t(String str, String str2, Bundle bundle, List list, boolean z6) {
int z02;
int i6;
C2052q3 c2052q3;
List list2 = list;
boolean O6 = O(str2, AbstractC1933b4.f18066d);
if (bundle == null) {
return null;
}
Bundle bundle2 = new Bundle(bundle);
C2052q3 c2052q32 = this.f17959a;
int v6 = c2052q32.w().v();
int i7 = 0;
boolean z7 = false;
for (String str3 : new TreeSet(bundle.keySet())) {
if (list2 == null || !list2.contains(str3)) {
z02 = !z6 ? z0(str3) : 0;
if (z02 == 0) {
z02 = A0(str3);
}
} else {
z02 = 0;
}
if (z02 != 0) {
x(bundle2, z02, str3, z02 == 3 ? str3 : null);
bundle2.remove(str3);
i6 = v6;
c2052q3 = c2052q32;
} else {
i6 = v6;
c2052q3 = c2052q32;
int r6 = r(str, str2, str3, bundle.get(str3), bundle2, list, z6, O6);
if (r6 == 17) {
x(bundle2, 17, str3, Boolean.FALSE);
} else if (r6 != 0 && !"_ev".equals(str3)) {
x(bundle2, r6, r6 == 21 ? str2 : str3, bundle.get(str3));
bundle2.remove(str3);
}
if (r0(str3)) {
int i8 = i7 + 1;
if (i8 > i6) {
if (!c2052q3.w().H(null, AbstractC1963f2.f18265g1) || !z7) {
StringBuilder sb = new StringBuilder(String.valueOf(i6).length() + 37);
sb.append("Event can't contain more than ");
sb.append(i6);
sb.append(" params");
c2052q3.a().q().c(sb.toString(), c2052q3.D().a(str2), c2052q3.D().e(bundle));
}
m0(bundle2, 5);
bundle2.remove(str3);
z7 = true;
}
i7 = i8;
v6 = i6;
c2052q32 = c2052q3;
list2 = list;
}
}
v6 = i6;
c2052q32 = c2052q3;
list2 = list;
}
return bundle2;
}
public final boolean t0(String str, String str2) {
if (str2 == null) {
this.f17959a.a().q().b("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
this.f17959a.a().q().b("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
this.f17959a.a().q().c("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)) {
this.f17959a.a().q().c("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final void u(D2 d22, int i6) {
Bundle bundle = d22.f17617d;
int i7 = 0;
boolean z6 = false;
for (String str : new TreeSet(bundle.keySet())) {
if (r0(str) && (i7 = i7 + 1) > i6) {
C2052q3 c2052q3 = this.f17959a;
if (!c2052q3.w().H(null, AbstractC1963f2.f18265g1) || !z6) {
StringBuilder sb = new StringBuilder(String.valueOf(i6).length() + 37);
sb.append("Event can't contain more than ");
sb.append(i6);
sb.append(" params");
c2052q3.a().q().c(sb.toString(), c2052q3.D().a(d22.f17614a), c2052q3.D().e(bundle));
m0(bundle, 5);
}
bundle.remove(str);
z6 = true;
}
}
}
public final boolean u0(String str, String str2) {
if (str2 == null) {
this.f17959a.a().q().b("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
this.f17959a.a().q().b("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
if (codePointAt != 95) {
this.f17959a.a().q().c("Name must start with a letter or _ (underscore). Type, name", str, str2);
return false;
}
codePointAt = 95;
}
int length = str2.length();
int charCount = Character.charCount(codePointAt);
while (charCount < length) {
int codePointAt2 = str2.codePointAt(charCount);
if (codePointAt2 != 95 && !Character.isLetterOrDigit(codePointAt2)) {
this.f17959a.a().q().c("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final void v(Parcelable[] parcelableArr, int i6) {
AbstractC0725o.k(parcelableArr);
for (Parcelable parcelable : parcelableArr) {
Bundle bundle = (Bundle) parcelable;
int i7 = 0;
boolean z6 = false;
for (String str : new TreeSet(bundle.keySet())) {
if (r0(str) && !O(str, AbstractC1941c4.f18086d) && (i7 = i7 + 1) > i6) {
C2052q3 c2052q3 = this.f17959a;
if (!c2052q3.w().H(null, AbstractC1963f2.f18265g1) || !z6) {
A2 q6 = c2052q3.a().q();
StringBuilder sb = new StringBuilder(String.valueOf(i6).length() + 60);
sb.append("Param can't contain more than ");
sb.append(i6);
sb.append(" item-scoped custom parameters");
q6.c(sb.toString(), c2052q3.D().b(str), c2052q3.D().e(bundle));
}
m0(bundle, 28);
bundle.remove(str);
z6 = true;
}
}
}
}
public final boolean v0(String str, String[] strArr, String[] strArr2, String str2) {
if (str2 == null) {
this.f17959a.a().q().b("Name is required and can't be null. Type", str);
return false;
}
AbstractC0725o.k(str2);
String[] strArr3 = f18490i;
for (int i6 = 0; i6 < 3; i6++) {
if (str2.startsWith(strArr3[i6])) {
this.f17959a.a().q().c("Name starts with reserved prefix. Type, name", str, str2);
return false;
}
}
if (strArr == null || !O(str2, strArr)) {
return true;
}
if (strArr2 != null && O(str2, strArr2)) {
return true;
}
this.f17959a.a().q().c("Name is reserved. Type, name", str, str2);
return false;
}
public final void w(Bundle bundle, Bundle bundle2) {
if (bundle2 == null) {
return;
}
for (String str : bundle2.keySet()) {
if (!bundle.containsKey(str)) {
this.f17959a.C().A(bundle, str, bundle2.get(str));
}
}
}
public final boolean w0(String str, int i6, String str2) {
if (str2 == null) {
this.f17959a.a().q().b("Name is required and can't be null. Type", str);
return false;
}
if (str2.codePointCount(0, str2.length()) <= i6) {
return true;
}
this.f17959a.a().q().d("Name is too long. Type, maximum supported length, name", str, Integer.valueOf(i6), str2);
return false;
}
public final void x(Bundle bundle, int i6, String str, Object obj) {
if (m0(bundle, i6)) {
this.f17959a.w();
bundle.putString("_ev", q(str, 40, true));
if (obj != null) {
AbstractC0725o.k(bundle);
if ((obj instanceof String) || (obj instanceof CharSequence)) {
bundle.putLong("_el", obj.toString().length());
}
}
}
}
public final int x0(String str) {
if (!u0("event", str)) {
return 2;
}
if (!v0("event", AbstractC1933b4.f18063a, AbstractC1933b4.f18064b, str)) {
return 13;
}
this.f17959a.w();
return !w0("event", 40, str) ? 2 : 0;
}
public final int y(String str, Object obj) {
return "_ldl".equals(str) ? C0("user property referrer", str, o0(str), obj) : C0("user property", str, o0(str), obj) ? 0 : 7;
}
public final int y0(String str) {
if (!u0("user property", str)) {
return 6;
}
if (!v0("user property", AbstractC1949d4.f18107a, null, str)) {
return 15;
}
this.f17959a.w();
return !w0("user property", 24, str) ? 6 : 0;
}
public final Object z(String str, Object obj) {
return "_ldl".equals(str) ? n0(o0(str), obj, true, false, null) : n0(o0(str), obj, false, false, null);
}
public final int z0(String str) {
if (!t0("event param", str)) {
return 3;
}
if (!v0("event param", null, null, str)) {
return 14;
}
this.f17959a.w();
return !w0("event param", 40, str) ? 3 : 0;
}
}