正在查看: Starpresta v4.0.3 应用的 b6.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Starpresta v4.0.3 应用的 b6.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package i00IiIiI;
import IiiIi00.IiiI;
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.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.text.TextUtils;
import com.google.android.gms.measurement.internal.zzag;
import com.google.android.gms.measurement.internal.zzbg;
import com.google.android.gms.measurement.internal.zzbl;
import com.google.android.gms.measurement.internal.zzpm;
import i0000III.IiiI00i;
import i00I0iII.i0Ii0ii;
import i00II0i0.IiiIII;
import i00II0i0.IiiIII0;
import i00II0iI.IiiII0I;
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 b6 extends a0 {
public static final String[] IiiI = {"firebase_", "google_", "ga_"};
public static final String[] IiiII0 = {"_err"};
public SecureRandom IiiI0II;
public final AtomicLong IiiI0Ii;
public IiiI00i IiiI0i;
public int IiiI0i0;
public Boolean IiiI0iI;
public Integer IiiI0ii;
public b6(iIi0i00 iii0i00) {
super(iii0i00);
this.IiiI0ii = null;
this.IiiI0Ii = new AtomicLong(0L);
}
public static long IiiIiI0(long j, long j2) {
return (j + (j2 * 60000)) / 86400000;
}
public static long IiiIiII(zzbg zzbgVar) {
long j = 0;
if (zzbgVar == null) {
return 0L;
}
Iterator<String> it = zzbgVar.iterator();
while (it.hasNext()) {
if (zzbgVar.i0000Iii(it.next()) instanceof Parcelable[]) {
j += ((Parcelable[]) r3).length;
}
}
return j;
}
public static long IiiIii0(byte[] bArr) {
i00I0ii.i000I00.IiiII0i(bArr);
int i = 0;
i00I0ii.i000I00.IiiIIIi(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 Bundle IiiIiiI(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 Bundle Iiii00I(List list) {
Bundle bundle = new Bundle();
if (list == null) {
return bundle;
}
Iterator it = list.iterator();
while (it.hasNext()) {
zzpm zzpmVar = (zzpm) it.next();
String str = zzpmVar.IiiIiiI;
if (str != null) {
bundle.putString(zzpmVar.IiiIiII, str);
} else {
Long l = zzpmVar.IiiIii;
if (l != null) {
bundle.putLong(zzpmVar.IiiIiII, l.longValue());
} else {
Double d = zzpmVar.Iiii000;
if (d != null) {
bundle.putDouble(zzpmVar.IiiIiII, d.doubleValue());
}
}
}
}
return bundle;
}
public static String Iiii0I0(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 void Iiii0i0(Bundle bundle, int i, String str, Object obj) {
if (i0iiIIi(bundle, i)) {
bundle.putString("_ev", Iiii0I0(str, 40, true));
if (obj != null) {
i00I0ii.i000I00.IiiII0i(bundle);
if ((obj instanceof String) || (obj instanceof CharSequence)) {
bundle.putLong("_el", String.valueOf(obj).length());
}
}
}
}
public static void IiiiIIi(q2 q2Var, Bundle bundle, boolean z) {
if (bundle == null || q2Var == null || (bundle.containsKey("_sc") && !z)) {
if (bundle != null && q2Var == null && z) {
bundle.remove("_sn");
bundle.remove("_sc");
bundle.remove("_si");
return;
}
return;
}
String str = q2Var.IiiI00i;
if (str != null) {
bundle.putString("_sn", str);
} else {
bundle.remove("_sn");
}
String str2 = q2Var.IiiI0I0;
if (str2 != null) {
bundle.putString("_sc", str2);
} else {
bundle.remove("_sc");
}
bundle.putLong("_si", q2Var.IiiI0II);
}
public static void IiiiIi0(d6 d6Var, int i, String str, String str2, int i2) {
IiiiIiI(d6Var, null, i, str, str2, i2);
}
public static void IiiiIiI(d6 d6Var, String str, int i, String str2, String str3, int i2) {
Bundle bundle = new Bundle();
i0iiIIi(bundle, i);
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
bundle.putString(str2, str3);
}
if (i == 6 || i == 7 || i == 2) {
bundle.putLong("_el", i2);
}
d6Var.IiiI00i(str, "_err", bundle);
}
public static boolean IiiiiI0(Context context) {
ActivityInfo receiverInfo;
i00I0ii.i000I00.IiiII0i(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 IiiiiII(Context context, boolean z) {
i00I0ii.i000I00.IiiII0i(context);
return Build.VERSION.SDK_INT >= 24 ? i0iiII0(context, "com.google.android.gms.measurement.AppMeasurementJobService") : i0iiII0(context, "com.google.android.gms.measurement.AppMeasurementService");
}
public static boolean IiiiiIi(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 Iiiiii(Object obj) {
return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
}
public static boolean Iiiiii0(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 i00000(String str) {
return !TextUtils.isEmpty(str) && str.startsWith("_");
}
public static boolean i000000(String str) {
String str2 = (String) i00I0II.i00I0I.IiiI00i(null);
return str2.equals("*") || Arrays.asList(str2.split(",")).contains(str);
}
public static boolean i00000I(String str) {
i00I0ii.i000I00.IiiI0i(str);
return str.charAt(0) != '_' || str.equals("_ep");
}
public static boolean i00000II(String str) {
for (String str2 : IiiII0) {
if (str2.equals(str)) {
return false;
}
}
return true;
}
private static boolean i00000iI(String str) {
i00I0ii.i000I00.IiiII0i(str);
return str.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$");
}
private final boolean i0000I() {
Integer num;
if (this.IiiI0iI == null) {
IiiI00i i0000I00 = i0000I00();
boolean z = false;
if (i0000I00 == null) {
return false;
}
Integer num2 = null;
try {
num = (Integer) i0000I00.IiiI0I0().get(10000L, TimeUnit.MILLISECONDS);
if (num != null) {
try {
if (num.intValue() == 1) {
z = true;
}
} catch (InterruptedException e) {
e = e;
num2 = num;
IiiI().Iiii0i0().IiiI0I0("Measurement manager api exception", e);
this.IiiI0iI = Boolean.FALSE;
num = num2;
IiiI().Iiii0II().IiiI0I0("Measurement manager api status result", num);
return this.IiiI0iI.booleanValue();
} catch (CancellationException e2) {
e = e2;
num2 = num;
IiiI().Iiii0i0().IiiI0I0("Measurement manager api exception", e);
this.IiiI0iI = Boolean.FALSE;
num = num2;
IiiI().Iiii0II().IiiI0I0("Measurement manager api status result", num);
return this.IiiI0iI.booleanValue();
} catch (ExecutionException e3) {
e = e3;
num2 = num;
IiiI().Iiii0i0().IiiI0I0("Measurement manager api exception", e);
this.IiiI0iI = Boolean.FALSE;
num = num2;
IiiI().Iiii0II().IiiI0I0("Measurement manager api status result", num);
return this.IiiI0iI.booleanValue();
} catch (TimeoutException e4) {
e = e4;
num2 = num;
IiiI().Iiii0i0().IiiI0I0("Measurement manager api exception", e);
this.IiiI0iI = Boolean.FALSE;
num = num2;
IiiI().Iiii0II().IiiI0I0("Measurement manager api status result", num);
return this.IiiI0iI.booleanValue();
}
}
this.IiiI0iI = Boolean.valueOf(z);
} catch (InterruptedException e5) {
e = e5;
} catch (CancellationException e6) {
e = e6;
} catch (ExecutionException e7) {
e = e7;
} catch (TimeoutException e8) {
e = e8;
}
IiiI().Iiii0II().IiiI0I0("Measurement manager api status result", num);
}
return this.IiiI0iI.booleanValue();
}
public static int i0000Iii(String str) {
if ("_ldl".equals(str)) {
return 2048;
}
if ("_id".equals(str)) {
return 256;
}
return "_lgclid".equals(str) ? 100 : 36;
}
public static MessageDigest i0000iI() {
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 boolean i00I0I(String str, String str2, String str3, String str4) {
boolean isEmpty = TextUtils.isEmpty(str);
boolean isEmpty2 = TextUtils.isEmpty(str2);
if (!isEmpty && !isEmpty2) {
i00I0ii.i000I00.IiiII0i(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 i00Ii0(String str, String[] strArr) {
i00I0ii.i000I00.IiiII0i(strArr);
for (String str2 : strArr) {
if (Objects.equals(str, str2)) {
return true;
}
}
return false;
}
public static ArrayList i00iI0I(List list) {
if (list == null) {
return new ArrayList(0);
}
ArrayList arrayList = new ArrayList(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
zzag zzagVar = (zzag) it.next();
Bundle bundle = new Bundle();
bundle.putString("app_id", zzagVar.IiiIiI);
bundle.putString("origin", zzagVar.IiiIiII);
bundle.putLong("creation_timestamp", zzagVar.IiiIii);
bundle.putString("name", zzagVar.IiiIii0.IiiIiII);
b0.IiiI0I0(bundle, i00I0ii.i000I00.IiiII0i(zzagVar.IiiIii0.IiiIIi()));
bundle.putBoolean("active", zzagVar.IiiIiiI);
String str = zzagVar.IiiIiii;
if (str != null) {
bundle.putString("trigger_event_name", str);
}
zzbl zzblVar = zzagVar.Iiii000;
if (zzblVar != null) {
bundle.putString("timed_out_event_name", zzblVar.IiiIiI);
zzbg zzbgVar = zzblVar.IiiIiII;
if (zzbgVar != null) {
bundle.putBundle("timed_out_event_params", zzbgVar.Iiii0());
}
}
bundle.putLong("trigger_timeout", zzagVar.Iiii00I);
zzbl zzblVar2 = zzagVar.Iiii00i;
if (zzblVar2 != null) {
bundle.putString("triggered_event_name", zzblVar2.IiiIiI);
zzbg zzbgVar2 = zzblVar2.IiiIiII;
if (zzbgVar2 != null) {
bundle.putBundle("triggered_event_params", zzbgVar2.Iiii0());
}
}
bundle.putLong("triggered_timestamp", zzagVar.IiiIii0.IiiIii0);
bundle.putLong("time_to_live", zzagVar.Iiii0);
zzbl zzblVar3 = zzagVar.Iiii0I0;
if (zzblVar3 != null) {
bundle.putString("expired_event_name", zzblVar3.IiiIiI);
zzbg zzbgVar3 = zzblVar3.IiiIiII;
if (zzbgVar3 != null) {
bundle.putBundle("expired_event_params", zzbgVar3.Iiii0());
}
}
arrayList.add(bundle);
}
return arrayList;
}
public static byte[] i00iii(Parcelable parcelable) {
if (parcelable == null) {
return null;
}
Parcel obtain = Parcel.obtain();
try {
parcelable.writeToParcel(obtain, 0);
return obtain.marshall();
} finally {
obtain.recycle();
}
}
public static Bundle[] i0III0i(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 i0Ii0ii() {
if (Build.VERSION.SDK_INT < 30 || IiiI.IiiI00i(30) <= 3) {
return 0;
}
return IiiI.IiiI00i(1000000);
}
public static boolean i0iiII0(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 i0iiIIi(Bundle bundle, int i) {
if (bundle == null || bundle.getLong("_err") != 0) {
return false;
}
bundle.putLong("_err", i);
return true;
}
@Override
public final iii0i IiiI() {
return super.IiiI();
}
@Override
public final IiiIII0 IiiI00i() {
return super.IiiI00i();
}
@Override
public final i000I00 IiiI0II() {
return super.IiiI0II();
}
@Override
public final i00I0 IiiI0Ii() {
return super.IiiI0Ii();
}
@Override
public final iIi0iiiI IiiI0i() {
return super.IiiI0i();
}
@Override
public final i000I0i IiiI0i0() {
return super.IiiI0i0();
}
@Override
public final iII00I0 IiiI0iI() {
return super.IiiI0iI();
}
@Override
public final k2 IiiI0ii() {
return super.IiiI0ii();
}
@Override
public final b6 IiiII0() {
return super.IiiII0();
}
@Override
public final iIII0I0i IiiII0I() {
return super.IiiII0I();
}
@Override
public final void IiiII0i() {
super.IiiII0i();
}
@Override
public final void IiiIII() {
super.IiiIII();
}
@Override
public final void IiiIII0() {
super.IiiIII0();
}
@Override
public final void IiiIIII() {
IiiIII();
SecureRandom secureRandom = new SecureRandom();
long nextLong = secureRandom.nextLong();
if (nextLong == 0) {
nextLong = secureRandom.nextLong();
if (nextLong == 0) {
IiiI().Iiii0i0().IiiI00i("Utils falling back to Random for random id");
}
}
this.IiiI0Ii.set(nextLong);
}
public final int IiiIi(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: i00IiIiI.b6.IiiIi(java.lang.String, java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
}
public final int IiiIi0(int i) {
return i0Ii0ii.IiiI0i().IiiI0ii(zza(), 12451000);
}
@Override
public final boolean IiiIi00() {
return true;
}
public final int IiiIi0I(String str) {
if (!i0iiIiI("event", str)) {
return 2;
}
if (i00i0I("event", e0.IiiI00i, e0.IiiI0I0, str)) {
return !Iiiiiii("event", 40, str) ? 2 : 0;
}
return 13;
}
public final int IiiIi0i(String str, Object obj) {
return "_ldl".equals(str) ? iiII("user property referrer", str, i0000Iii(str), obj) : iiII("user property", str, i0000Iii(str), obj) ? 0 : 7;
}
public final long IiiIiI(Context context, String str) {
IiiIII();
i00I0ii.i000I00.IiiII0i(context);
i00I0ii.i000I00.IiiI0i(str);
PackageManager packageManager = context.getPackageManager();
MessageDigest i0000iI = i0000iI();
long j = -1;
if (i0000iI == null) {
IiiI().Iiii00I().IiiI00i("Could not get MD5 instance");
} else {
if (packageManager != null) {
try {
} catch (PackageManager.NameNotFoundException e) {
IiiI().Iiii00I().IiiI0I0("Package name not found", e);
}
if (!i0I0I00(context, str)) {
Signature[] signatureArr = IiiII0I.IiiI00i(context).IiiI0i(zza().getPackageName(), 64).signatures;
if (signatureArr == null || signatureArr.length <= 0) {
IiiI().Iiii0i0().IiiI00i("Could not get signatures");
} else {
j = IiiIii0(i0000iI.digest(signatureArr[0].toByteArray()));
}
}
}
j = 0;
}
return j;
}
public final Bundle IiiIii(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);
}
return bundle;
} catch (UnsupportedOperationException e) {
IiiI().Iiii0i0().IiiI0I0("Install referrer url isn't a hierarchical URI", e);
return null;
}
}
public final Bundle IiiIiii(Bundle bundle, String str) {
Bundle bundle2 = new Bundle();
if (bundle != null) {
for (String str2 : bundle.keySet()) {
Object i00iI0i = i00iI0i(str2, bundle.get(str2));
if (i00iI0i == null) {
IiiI().Iiii0i().IiiI0I0("Param value can't be null", IiiI0i().IiiI0i(str2));
} else {
Iiii0ii(bundle2, str2, i00iI0i);
}
}
}
return bundle2;
}
public final void Iiii(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, int i) {
Bundle bundle = new Bundle();
bundle.putInt("r", i);
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning int value to wrapper", e);
}
}
public final Object Iiii0(int i, Object obj, boolean z, boolean z2, String str) {
Bundle IiiIiii;
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 Iiii0I0(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) && (IiiIiii = IiiIiii((Bundle) parcelable, null)) != null && !IiiIiii.isEmpty()) {
arrayList.add(IiiIiii);
}
}
return arrayList.toArray(new Bundle[arrayList.size()]);
}
public final Bundle Iiii000(String str, String str2, Bundle bundle, List list, boolean z) {
int i00000i0;
int i;
b6 b6Var = this;
boolean i00Ii0 = i00Ii0(str2, e0.IiiI0Ii);
if (bundle == null) {
return null;
}
Bundle bundle2 = new Bundle(bundle);
int IiiIiII = IiiI0II().IiiIiII();
int i2 = 0;
for (String str3 : new TreeSet(bundle.keySet())) {
if (list == null || !list.contains(str3)) {
i00000i0 = !z ? b6Var.i00000i0(str3) : 0;
if (i00000i0 == 0) {
i00000i0 = b6Var.i00000Ii(str3);
}
} else {
i00000i0 = 0;
}
if (i00000i0 != 0) {
Iiii0i0(bundle2, i00000i0, str3, i00000i0 == 3 ? str3 : null);
bundle2.remove(str3);
i = IiiIiII;
} else {
i = IiiIiII;
int IiiIi = IiiIi(str, str2, str3, bundle.get(str3), bundle2, list, z, i00Ii0);
if (IiiIi == 17) {
Iiii0i0(bundle2, IiiIi, str3, Boolean.FALSE);
} else if (IiiIi != 0 && !"_ev".equals(str3)) {
Iiii0i0(bundle2, IiiIi, IiiIi == 21 ? str2 : str3, bundle.get(str3));
bundle2.remove(str3);
}
if (i00000I(str3)) {
int i3 = i2 + 1;
if (i3 > i) {
IiiI().Iiii00i().IiiI0II("Event can't contain more than " + i + " params", IiiI0i().IiiI0II(str2), IiiI0i().IiiI00i(bundle));
i0iiIIi(bundle2, 5);
bundle2.remove(str3);
}
i2 = i3;
}
}
IiiIiII = i;
b6Var = this;
}
return bundle2;
}
public final zzbl Iiii00i(String str, String str2, Bundle bundle, String str3, long j, boolean z, boolean z2) {
if (TextUtils.isEmpty(str2)) {
return null;
}
if (IiiIi0I(str2) != 0) {
IiiI().Iiii00I().IiiI0I0("Invalid conditional property event name", IiiI0i().IiiI0iI(str2));
throw new IllegalArgumentException();
}
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
bundle2.putString("_o", str3);
Bundle Iiii000 = Iiii000(str, str2, bundle2, IiiIII.IiiI00i("_o"), true);
if (z) {
Iiii000 = IiiIiii(Iiii000, str);
}
i00I0ii.i000I00.IiiII0i(Iiii000);
return new zzbl(str2, new zzbg(Iiii000), str3, j);
}
public final URL Iiii0II(long j, String str, String str2, long j2, String str3) {
try {
i00I0ii.i000I00.IiiI0i(str2);
i00I0ii.i000I00.IiiI0i(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(i00000I0())), str2, str, Long.valueOf(j2));
if (str.equals(IiiI0II().IiiiII0())) {
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 e) {
e = e;
IiiI().Iiii00I().IiiI0I0("Failed to create BOW URL for Deferred Deep Link. exception", e.getMessage());
return null;
} catch (MalformedURLException e2) {
e = e2;
IiiI().Iiii00I().IiiI0I0("Failed to create BOW URL for Deferred Deep Link. exception", e.getMessage());
return null;
}
}
public final void Iiii0i(Bundle bundle, long j) {
long j2 = bundle.getLong("_et");
if (j2 != 0) {
IiiI().Iiii0i0().IiiI0I0("Params already contained engagement", Long.valueOf(j2));
}
bundle.putLong("_et", j + j2);
}
public final void Iiii0iI(Bundle bundle, Bundle bundle2) {
if (bundle2 == null) {
return;
}
for (String str : bundle2.keySet()) {
if (!bundle.containsKey(str)) {
IiiII0().Iiii0ii(bundle, str, bundle2.get(str));
}
}
}
public final void Iiii0ii(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) {
IiiI().Iiii0i().IiiI0II("Not putting event parameter. Invalid value type. name, type", IiiI0i().IiiI0i(str), obj != null ? obj.getClass().getSimpleName() : null);
}
}
public final void IiiiI(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, ArrayList arrayList) {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("r", arrayList);
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning bundle list to wrapper", e);
}
}
public final void IiiiI0(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, Bundle bundle) {
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning bundle value to wrapper", e);
}
}
public final void IiiiI00(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, long j) {
Bundle bundle = new Bundle();
bundle.putLong("r", j);
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning long value to wrapper", e);
}
}
public final void IiiiI0I(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, String str) {
Bundle bundle = new Bundle();
bundle.putString("r", str);
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning string value to wrapper", e);
}
}
public final void IiiiII0(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, boolean z) {
Bundle bundle = new Bundle();
bundle.putBoolean("r", z);
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning boolean value to wrapper", e);
}
}
public final void IiiiIII(iI0i0000 ii0i0000, int i) {
int i2 = 0;
for (String str : new TreeSet(ii0i0000.IiiI0Ii.keySet())) {
if (i00000I(str) && (i2 = i2 + 1) > i) {
IiiI().Iiii00i().IiiI0II("Event can't contain more than " + i + " params", IiiI0i().IiiI0II(ii0i0000.IiiI00i), IiiI0i().IiiI00i(ii0i0000.IiiI0Ii));
i0iiIIi(ii0i0000.IiiI0Ii, 5);
ii0i0000.IiiI0Ii.remove(str);
}
}
}
public final void IiiiIii(String str, String str2, String str3, Bundle bundle, List list, boolean z) {
int i00000i0;
int i;
String str4;
int IiiIi;
int i2;
if (bundle == null) {
return;
}
int i3 = IiiI0II().IiiII0().Iiiii0i(231100000, true) ? 35 : 0;
int i4 = 0;
for (String str5 : new TreeSet(bundle.keySet())) {
if (list == null || !list.contains(str5)) {
i00000i0 = !z ? i00000i0(str5) : 0;
if (i00000i0 == 0) {
i00000i0 = i00000Ii(str5);
}
} else {
i00000i0 = 0;
}
if (i00000i0 != 0) {
Iiii0i0(bundle, i00000i0, str5, i00000i0 == 3 ? str5 : null);
bundle.remove(str5);
i = i3;
} else {
if (Iiiiii(bundle.get(str5))) {
IiiI().Iiii0i().IiiI0Ii("Nested Bundle parameters are not allowed; discarded. event name, param name, child param name", str2, str3, str5);
IiiIi = 22;
str4 = str5;
i = i3;
} else {
str4 = str5;
i = i3;
IiiIi = IiiIi(str, str2, str5, bundle.get(str5), bundle, list, z, false);
}
if (IiiIi == 0 || "_ev".equals(str4)) {
if (!i00000I(str4) || i00Ii0(str4, d0.IiiI0Ii)) {
i2 = i;
} else {
int i5 = i4 + 1;
if (Iiiii0i(231100000, true)) {
i2 = i;
if (i5 > i2) {
IiiI().Iiii00i().IiiI0II("Item can't contain more than " + i2 + " item-scoped custom params", IiiI0i().IiiI0II(str2), IiiI0i().IiiI00i(bundle));
i0iiIIi(bundle, 28);
bundle.remove(str4);
}
} else {
IiiI().Iiii00i().IiiI0II("Item array not supported on client's version of Google Play Services (Android Only)", IiiI0i().IiiI0II(str2), IiiI0i().IiiI00i(bundle));
i0iiIIi(bundle, 23);
bundle.remove(str4);
i2 = i;
}
i4 = i5;
}
i3 = i2;
} else {
Iiii0i0(bundle, IiiIi, str4, bundle.get(str4));
bundle.remove(str4);
}
}
i3 = i;
}
}
public final void Iiiii00(Parcelable[] parcelableArr, int i) {
i00I0ii.i000I00.IiiII0i(parcelableArr);
for (Parcelable parcelable : parcelableArr) {
Bundle bundle = (Bundle) parcelable;
int i2 = 0;
for (String str : new TreeSet(bundle.keySet())) {
if (i00000I(str) && !i00Ii0(str, d0.IiiI0Ii) && (i2 = i2 + 1) > i) {
IiiI().Iiii00i().IiiI0II("Param can't contain more than " + i + " item-scoped custom parameters", IiiI0i().IiiI0i(str), IiiI0i().IiiI00i(bundle));
i0iiIIi(bundle, 28);
bundle.remove(str);
}
}
}
}
public final boolean Iiiii0i(int i, boolean z) {
Boolean Iiiii0i = this.IiiI00i.Iiii0i().Iiiii0i();
if (i00000I0() < i / 1000) {
return (Iiiii0i == null || Iiiii0i.booleanValue()) ? false : true;
}
return true;
}
public final boolean IiiiiiI(String str, double d) {
try {
SharedPreferences.Editor edit = zza().getSharedPreferences("google.analytics.deferred.deeplink.prefs", 0).edit();
edit.putString("deeplink", str);
edit.putLong("timestamp", Double.doubleToRawLongBits(d));
return edit.commit();
} catch (RuntimeException e) {
IiiI().Iiii00I().IiiI0I0("Failed to persist Deferred Deep Link. exception", e);
return false;
}
}
public final boolean Iiiiiii(String str, int i, String str2) {
if (str2 == null) {
IiiI().Iiii00i().IiiI0I0("Name is required and can't be null. Type", str);
return false;
}
if (str2.codePointCount(0, str2.length()) <= i) {
return true;
}
IiiI().Iiii00i().IiiI0Ii("Name is too long. Type, maximum supported length, name", str, Integer.valueOf(i), str2);
return false;
}
public final long i0000() {
long andIncrement;
long j;
if (this.IiiI0Ii.get() != 0) {
synchronized (this.IiiI0Ii) {
this.IiiI0Ii.compareAndSet(-1L, 1L);
andIncrement = this.IiiI0Ii.getAndIncrement();
}
return andIncrement;
}
synchronized (this.IiiI0Ii) {
long nextLong = new Random(System.nanoTime() ^ IiiI00i().IiiI00i()).nextLong();
int i = this.IiiI0i0 + 1;
this.IiiI0i0 = i;
j = nextLong + i;
}
return j;
}
public final boolean i000000I(String str, String str2) {
if (!TextUtils.isEmpty(str2)) {
return true;
}
if (TextUtils.isEmpty(str)) {
return false;
}
return IiiI0II().IiiiI().equals(str);
}
public final boolean i000000i(String str) {
IiiIII();
if (IiiII0I.IiiI00i(zza()).IiiI00i(str) == 0) {
return true;
}
IiiI().Iiii000().IiiI0I0("Permission not granted", str);
return false;
}
public final int i00000I0() {
if (this.IiiI0ii == null) {
this.IiiI0ii = Integer.valueOf(i0Ii0ii.IiiI0i().IiiI00i(zza()) / 1000);
}
return this.IiiI0ii.intValue();
}
public final int i00000Ii(String str) {
if (!i0iiIiI("event param", str)) {
return 3;
}
if (i00Iii("event param", null, str)) {
return !Iiiiiii("event param", 40, str) ? 3 : 0;
}
return 14;
}
public final int i00000i0(String str) {
if (!i000IIi("event param", str)) {
return 3;
}
if (i00Iii("event param", null, str)) {
return !Iiiiiii("event param", 40, str) ? 3 : 0;
}
return 14;
}
public final long i00000ii() {
IiiIII();
if (!i000000(this.IiiI00i.IiiIii().Iiii00I())) {
return 0L;
}
long j = Build.VERSION.SDK_INT < 30 ? 4L : IiiI.IiiI00i(30) < 4 ? 8L : i0Ii0ii() < ((Integer) i00I0II.Iiiiii0.IiiI00i(null)).intValue() ? 16L : 0L;
if (!i000000i("android.permission.ACCESS_ADSERVICES_ATTRIBUTION")) {
j |= 2;
}
if (j == 0 && !i0000I()) {
j |= 64;
}
if (j == 0) {
return 1L;
}
return j;
}
public final SecureRandom i0000I0() {
IiiIII();
if (this.IiiI0II == null) {
this.IiiI0II = new SecureRandom();
}
return this.IiiI0II;
}
public final IiiI00i i0000I00() {
if (this.IiiI0i == null) {
this.IiiI0i = IiiI00i.IiiI00i(zza());
}
return this.IiiI0i;
}
public final boolean i0000I0I() {
IiiIII();
return i00000ii() == 1;
}
public final String i0000ii() {
byte[] bArr = new byte[16];
i0000I0().nextBytes(bArr);
return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
}
public final boolean i000II() {
try {
zza().getClassLoader().loadClass("com.google.firebase.remoteconfig.FirebaseRemoteConfig");
return true;
} catch (ClassNotFoundException unused) {
return false;
}
}
public final boolean i000IIi(String str, String str2) {
if (str2 == null) {
IiiI().Iiii00i().IiiI0I0("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
IiiI().Iiii00i().IiiI0I0("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
IiiI().Iiii00i().IiiI0II("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)) {
IiiI().Iiii00i().IiiI0II("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final void i000iIiI(com.google.android.gms.internal.measurement.i00IIIIi i00iiiii2, byte[] bArr) {
Bundle bundle = new Bundle();
bundle.putByteArray("r", bArr);
try {
i00iiiii2.i0IiIi0(bundle);
} catch (RemoteException e) {
this.IiiI00i.IiiI().Iiii0i0().IiiI0I0("Error returning byte array to wrapper", e);
}
}
public final boolean i00Iii(String str, String[] strArr, String str2) {
return i00i0I(str, strArr, null, str2);
}
public final boolean i00i0I(String str, String[] strArr, String[] strArr2, String str2) {
if (str2 == null) {
IiiI().Iiii00i().IiiI0I0("Name is required and can't be null. Type", str);
return false;
}
i00I0ii.i000I00.IiiII0i(str2);
for (String str3 : IiiI) {
if (str2.startsWith(str3)) {
IiiI().Iiii00i().IiiI0II("Name starts with reserved prefix. Type, name", str, str2);
return false;
}
}
if (strArr == null || !i00Ii0(str2, strArr)) {
return true;
}
if (strArr2 != null && i00Ii0(str2, strArr2)) {
return true;
}
IiiI().Iiii00i().IiiI0II("Name is reserved. Type, name", str, str2);
return false;
}
public final Object i00iI0i(String str, Object obj) {
if ("_ev".equals(str)) {
return Iiii0(IiiI0II().IiiIiI(null, false), obj, true, true, null);
}
return Iiii0(i00000(str) ? IiiI0II().IiiIiI(null, false) : IiiI0II().IiiIIi(null, false), obj, false, true, null);
}
public final boolean i0I0I00(Context context, String str) {
Signature[] signatureArr;
X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
try {
PackageInfo IiiI0i = IiiII0I.IiiI00i(context).IiiI0i(str, 64);
if (IiiI0i == null || (signatureArr = IiiI0i.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) {
IiiI().Iiii00I().IiiI0I0("Package name not found", e);
return true;
} catch (CertificateException e2) {
IiiI().Iiii00I().IiiI0I0("Error obtaining certificate", e2);
return true;
}
}
public final long i0II00I(String str) {
if (zza().getPackageManager() == null) {
return 0L;
}
int i = 0;
try {
ApplicationInfo IiiI0II = IiiII0I.IiiI00i(zza()).IiiI0II(str, 0);
if (IiiI0II != null) {
i = IiiI0II.targetSdkVersion;
}
} catch (PackageManager.NameNotFoundException unused) {
IiiI().Iiii0I0().IiiI0I0("PackageManager failed to find running app: app_id", str);
}
return i;
}
public final boolean i0IiIi0(String str, String str2) {
if (!TextUtils.isEmpty(str)) {
if (i00000iI(str)) {
return true;
}
if (this.IiiI00i.IiiIi00()) {
IiiI().Iiii00i().IiiI0I0("Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id", iii0i.IiiIi0I(str));
}
return false;
}
if (TextUtils.isEmpty(str2)) {
if (this.IiiI00i.IiiIi00()) {
IiiI().Iiii00i().IiiI00i("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
}
return false;
}
if (i00000iI(str2)) {
return true;
}
IiiI().Iiii00i().IiiI0I0("Invalid admob_app_id. Analytics disabled.", iii0i.IiiIi0I(str2));
return false;
}
public final boolean i0iiIiI(String str, String str2) {
if (str2 == null) {
IiiI().Iiii00i().IiiI0I0("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
IiiI().Iiii00i().IiiI0I0("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt) && codePointAt != 95) {
IiiI().Iiii00i().IiiI0II("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)) {
IiiI().Iiii00i().IiiI0II("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final int ii000i(String str) {
if (!i0iiIiI("user property", str)) {
return 6;
}
if (i00Iii("user property", g0.IiiI00i, str)) {
return !Iiiiiii("user property", 24, str) ? 6 : 0;
}
return 15;
}
public final Object ii0i0Ii(String str, Object obj) {
return "_ldl".equals(str) ? Iiii0(i0000Iii(str), obj, true, false, null) : Iiii0(i0000Iii(str), obj, false, false, null);
}
public final boolean iiII(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) {
IiiI().Iiii0i().IiiI0Ii("Value is too long; discarded. Value kind, name, value length", str, str2, Integer.valueOf(valueOf.length()));
return false;
}
}
return true;
}
@Override
public final Context zza() {
return super.zza();
}
}