Files
adif-api-reverse-engineering/apk_decompiled/sources/com/google/android/gms/measurement/AppMeasurement.java

414 lines
14 KiB
Java

package com.google.android.gms.measurement;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Keep;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.ShowFirstParty;
import com.google.android.gms.internal.measurement.zzcl;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.android.gms.measurement.internal.zzgd;
import com.google.android.gms.measurement.internal.zzgz;
import com.google.android.gms.measurement.internal.zzhf;
import com.google.android.gms.measurement.internal.zzhg;
import com.google.android.gms.measurement.internal.zzil;
import com.google.android.gms.measurement.internal.zziq;
import com.google.firebase.analytics.FirebaseAnalytics;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@ShowFirstParty
@KeepForSdk
@Deprecated
/* loaded from: classes3.dex */
public class AppMeasurement {
@ShowFirstParty
@KeepForSdk
public static final String CRASH_ORIGIN = "crash";
@ShowFirstParty
@KeepForSdk
public static final String FCM_ORIGIN = "fcm";
@ShowFirstParty
@KeepForSdk
public static final String FIAM_ORIGIN = "fiam";
private static volatile AppMeasurement zza;
private final zzd zzb;
@ShowFirstParty
@KeepForSdk
/* loaded from: classes3.dex */
public static class ConditionalUserProperty {
@ShowFirstParty
@Keep
@KeepForSdk
public boolean mActive;
@ShowFirstParty
@Keep
@KeepForSdk
public String mAppId;
@ShowFirstParty
@Keep
@KeepForSdk
public long mCreationTimestamp;
@Keep
public String mExpiredEventName;
@Keep
public Bundle mExpiredEventParams;
@ShowFirstParty
@Keep
@KeepForSdk
public String mName;
@ShowFirstParty
@Keep
@KeepForSdk
public String mOrigin;
@ShowFirstParty
@Keep
@KeepForSdk
public long mTimeToLive;
@Keep
public String mTimedOutEventName;
@Keep
public Bundle mTimedOutEventParams;
@ShowFirstParty
@Keep
@KeepForSdk
public String mTriggerEventName;
@ShowFirstParty
@Keep
@KeepForSdk
public long mTriggerTimeout;
@Keep
public String mTriggeredEventName;
@Keep
public Bundle mTriggeredEventParams;
@ShowFirstParty
@Keep
@KeepForSdk
public long mTriggeredTimestamp;
@ShowFirstParty
@Keep
@KeepForSdk
public Object mValue;
@KeepForSdk
public ConditionalUserProperty() {
}
public ConditionalUserProperty(Bundle bundle) {
Preconditions.checkNotNull(bundle);
this.mAppId = (String) zzgz.zza(bundle, "app_id", String.class, null);
this.mOrigin = (String) zzgz.zza(bundle, "origin", String.class, null);
this.mName = (String) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.NAME, String.class, null);
this.mValue = zzgz.zza(bundle, "value", Object.class, null);
this.mTriggerEventName = (String) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TRIGGER_EVENT_NAME, String.class, null);
this.mTriggerTimeout = ((Long) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TRIGGER_TIMEOUT, Long.class, 0L)).longValue();
this.mTimedOutEventName = (String) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TIMED_OUT_EVENT_NAME, String.class, null);
this.mTimedOutEventParams = (Bundle) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TIMED_OUT_EVENT_PARAMS, Bundle.class, null);
this.mTriggeredEventName = (String) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_EVENT_NAME, String.class, null);
this.mTriggeredEventParams = (Bundle) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_EVENT_PARAMS, Bundle.class, null);
this.mTimeToLive = ((Long) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TIME_TO_LIVE, Long.class, 0L)).longValue();
this.mExpiredEventName = (String) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.EXPIRED_EVENT_NAME, String.class, null);
this.mExpiredEventParams = (Bundle) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.EXPIRED_EVENT_PARAMS, Bundle.class, null);
this.mActive = ((Boolean) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.ACTIVE, Boolean.class, Boolean.FALSE)).booleanValue();
this.mCreationTimestamp = ((Long) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.CREATION_TIMESTAMP, Long.class, 0L)).longValue();
this.mTriggeredTimestamp = ((Long) zzgz.zza(bundle, AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_TIMESTAMP, Long.class, 0L)).longValue();
}
@KeepForSdk
public ConditionalUserProperty(ConditionalUserProperty conditionalUserProperty) {
Preconditions.checkNotNull(conditionalUserProperty);
this.mAppId = conditionalUserProperty.mAppId;
this.mOrigin = conditionalUserProperty.mOrigin;
this.mCreationTimestamp = conditionalUserProperty.mCreationTimestamp;
this.mName = conditionalUserProperty.mName;
Object obj = conditionalUserProperty.mValue;
if (obj != null) {
Object zza = zziq.zza(obj);
this.mValue = zza;
if (zza == null) {
this.mValue = conditionalUserProperty.mValue;
}
}
this.mActive = conditionalUserProperty.mActive;
this.mTriggerEventName = conditionalUserProperty.mTriggerEventName;
this.mTriggerTimeout = conditionalUserProperty.mTriggerTimeout;
this.mTimedOutEventName = conditionalUserProperty.mTimedOutEventName;
Bundle bundle = conditionalUserProperty.mTimedOutEventParams;
if (bundle != null) {
this.mTimedOutEventParams = new Bundle(bundle);
}
this.mTriggeredEventName = conditionalUserProperty.mTriggeredEventName;
Bundle bundle2 = conditionalUserProperty.mTriggeredEventParams;
if (bundle2 != null) {
this.mTriggeredEventParams = new Bundle(bundle2);
}
this.mTriggeredTimestamp = conditionalUserProperty.mTriggeredTimestamp;
this.mTimeToLive = conditionalUserProperty.mTimeToLive;
this.mExpiredEventName = conditionalUserProperty.mExpiredEventName;
Bundle bundle3 = conditionalUserProperty.mExpiredEventParams;
if (bundle3 != null) {
this.mExpiredEventParams = new Bundle(bundle3);
}
}
}
@ShowFirstParty
@KeepForSdk
/* loaded from: classes3.dex */
public interface EventInterceptor extends zzhf {
@Override // com.google.android.gms.measurement.internal.zzhf
@ShowFirstParty
@KeepForSdk
void interceptEvent(String str, String str2, Bundle bundle, long j4);
}
@ShowFirstParty
@KeepForSdk
/* loaded from: classes3.dex */
public interface OnEventListener extends zzhg {
@Override // com.google.android.gms.measurement.internal.zzhg
@ShowFirstParty
@KeepForSdk
void onEvent(String str, String str2, Bundle bundle, long j4);
}
public AppMeasurement(zzgd zzgdVar) {
this.zzb = new zza(zzgdVar);
}
/* JADX WARN: Unreachable blocks removed: 1, instructions: 1 */
@Keep
@Deprecated
@ShowFirstParty
@KeepForSdk
public static AppMeasurement getInstance(Context context) {
if (zza == null) {
synchronized (AppMeasurement.class) {
if (zza == null) {
zzil zzilVar = (zzil) FirebaseAnalytics.class.getDeclaredMethod("getScionFrontendApiImplementation", Context.class, Bundle.class).invoke(null, context, null);
if (zzilVar != null) {
zza = new AppMeasurement(zzilVar);
} else {
zza = new AppMeasurement(zzgd.zzp(context, new zzcl(0L, 0L, true, null, null, null, null, null), null));
}
}
}
}
return zza;
}
@Keep
public void beginAdUnitExposure(String str) {
this.zzb.zzp(str);
}
@ShowFirstParty
@Keep
@KeepForSdk
public void clearConditionalUserProperty(String str, String str2, Bundle bundle) {
this.zzb.zzq(str, str2, bundle);
}
@Keep
public void endAdUnitExposure(String str) {
this.zzb.zzr(str);
}
@Keep
public long generateEventId() {
return this.zzb.zzb();
}
@Keep
public String getAppInstanceId() {
return this.zzb.zzh();
}
@KeepForSdk
public Boolean getBoolean() {
return this.zzb.zzc();
}
@ShowFirstParty
@Keep
@KeepForSdk
public List<ConditionalUserProperty> getConditionalUserProperties(String str, String str2) {
List zzm = this.zzb.zzm(str, str2);
ArrayList arrayList = new ArrayList(zzm == null ? 0 : zzm.size());
Iterator it = zzm.iterator();
while (it.hasNext()) {
arrayList.add(new ConditionalUserProperty((Bundle) it.next()));
}
return arrayList;
}
@Keep
public String getCurrentScreenClass() {
return this.zzb.zzi();
}
@Keep
public String getCurrentScreenName() {
return this.zzb.zzj();
}
@KeepForSdk
public Double getDouble() {
return this.zzb.zzd();
}
@Keep
public String getGmpAppId() {
return this.zzb.zzk();
}
@KeepForSdk
public Integer getInteger() {
return this.zzb.zze();
}
@KeepForSdk
public Long getLong() {
return this.zzb.zzf();
}
@ShowFirstParty
@Keep
@KeepForSdk
public int getMaxUserProperties(String str) {
return this.zzb.zza(str);
}
@KeepForSdk
public String getString() {
return this.zzb.zzl();
}
@Keep
public Map<String, Object> getUserProperties(String str, String str2, boolean z3) {
return this.zzb.zzo(str, str2, z3);
}
@ShowFirstParty
@Keep
public void logEventInternal(String str, String str2, Bundle bundle) {
this.zzb.zzs(str, str2, bundle);
}
@ShowFirstParty
@KeepForSdk
public void logEventInternalNoInterceptor(String str, String str2, Bundle bundle, long j4) {
this.zzb.zzt(str, str2, bundle, j4);
}
@ShowFirstParty
@KeepForSdk
public void registerOnMeasurementEventListener(OnEventListener onEventListener) {
this.zzb.zzu(onEventListener);
}
@ShowFirstParty
@Keep
@KeepForSdk
public void setConditionalUserProperty(ConditionalUserProperty conditionalUserProperty) {
Preconditions.checkNotNull(conditionalUserProperty);
zzd zzdVar = this.zzb;
Bundle bundle = new Bundle();
String str = conditionalUserProperty.mAppId;
if (str != null) {
bundle.putString("app_id", str);
}
String str2 = conditionalUserProperty.mOrigin;
if (str2 != null) {
bundle.putString("origin", str2);
}
String str3 = conditionalUserProperty.mName;
if (str3 != null) {
bundle.putString(AppMeasurementSdk.ConditionalUserProperty.NAME, str3);
}
Object obj = conditionalUserProperty.mValue;
if (obj != null) {
zzgz.zzb(bundle, obj);
}
String str4 = conditionalUserProperty.mTriggerEventName;
if (str4 != null) {
bundle.putString(AppMeasurementSdk.ConditionalUserProperty.TRIGGER_EVENT_NAME, str4);
}
bundle.putLong(AppMeasurementSdk.ConditionalUserProperty.TRIGGER_TIMEOUT, conditionalUserProperty.mTriggerTimeout);
String str5 = conditionalUserProperty.mTimedOutEventName;
if (str5 != null) {
bundle.putString(AppMeasurementSdk.ConditionalUserProperty.TIMED_OUT_EVENT_NAME, str5);
}
Bundle bundle2 = conditionalUserProperty.mTimedOutEventParams;
if (bundle2 != null) {
bundle.putBundle(AppMeasurementSdk.ConditionalUserProperty.TIMED_OUT_EVENT_PARAMS, bundle2);
}
String str6 = conditionalUserProperty.mTriggeredEventName;
if (str6 != null) {
bundle.putString(AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_EVENT_NAME, str6);
}
Bundle bundle3 = conditionalUserProperty.mTriggeredEventParams;
if (bundle3 != null) {
bundle.putBundle(AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_EVENT_PARAMS, bundle3);
}
bundle.putLong(AppMeasurementSdk.ConditionalUserProperty.TIME_TO_LIVE, conditionalUserProperty.mTimeToLive);
String str7 = conditionalUserProperty.mExpiredEventName;
if (str7 != null) {
bundle.putString(AppMeasurementSdk.ConditionalUserProperty.EXPIRED_EVENT_NAME, str7);
}
Bundle bundle4 = conditionalUserProperty.mExpiredEventParams;
if (bundle4 != null) {
bundle.putBundle(AppMeasurementSdk.ConditionalUserProperty.EXPIRED_EVENT_PARAMS, bundle4);
}
bundle.putLong(AppMeasurementSdk.ConditionalUserProperty.CREATION_TIMESTAMP, conditionalUserProperty.mCreationTimestamp);
bundle.putBoolean(AppMeasurementSdk.ConditionalUserProperty.ACTIVE, conditionalUserProperty.mActive);
bundle.putLong(AppMeasurementSdk.ConditionalUserProperty.TRIGGERED_TIMESTAMP, conditionalUserProperty.mTriggeredTimestamp);
zzdVar.zzv(bundle);
}
@ShowFirstParty
@KeepForSdk
public void setEventInterceptor(EventInterceptor eventInterceptor) {
this.zzb.zzw(eventInterceptor);
}
@ShowFirstParty
@KeepForSdk
public void unregisterOnMeasurementEventListener(OnEventListener onEventListener) {
this.zzb.zzx(onEventListener);
}
public AppMeasurement(zzil zzilVar) {
this.zzb = new zzb(zzilVar);
}
@ShowFirstParty
@KeepForSdk
public Map<String, Object> getUserProperties(boolean z3) {
return this.zzb.zzn(z3);
}
}