Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.

This commit is contained in:
2025-12-04 13:59:54 +01:00
parent f2fd1c3bf5
commit e0133d2ca2
10432 changed files with 1019085 additions and 1 deletions

View File

@@ -0,0 +1,149 @@
package com.google.firebase.sessions;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\u0012\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0080\b\u0018\u00002\u00020\u0001B;\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0003\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\b0\n¢\u0006\u0002\u0010\u000bJ\t\u0010\u0015\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0016\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0017\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0018\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0019\u001a\u00020\bHÆ\u0003J\u000f\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\b0\nHÆ\u0003JK\u0010\u001b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00032\b\b\u0002\u0010\u0006\u001a\u00020\u00032\b\b\u0002\u0010\u0007\u001a\u00020\b2\u000e\b\u0002\u0010\t\u001a\b\u0012\u0004\u0012\u00020\b0\nHÆ\u0001J\u0013\u0010\u001c\u001a\u00020\u001d2\b\u0010\u001e\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u001f\u001a\u00020 HÖ\u0001J\t\u0010!\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u0005\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0017\u0010\t\u001a\b\u0012\u0004\u0012\u00020\b0\n¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0011\u0010\u0006\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\rR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\rR\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\r¨\u0006\""}, d2 = {"Lcom/google/firebase/sessions/AndroidApplicationInfo;", "", RemoteConfigConstants.RequestFieldKey.PACKAGE_NAME, "", "versionName", "appBuildVersion", "deviceManufacturer", "currentProcessDetails", "Lcom/google/firebase/sessions/ProcessDetails;", "appProcessDetails", "", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/firebase/sessions/ProcessDetails;Ljava/util/List;)V", "getAppBuildVersion", "()Ljava/lang/String;", "getAppProcessDetails", "()Ljava/util/List;", "getCurrentProcessDetails", "()Lcom/google/firebase/sessions/ProcessDetails;", "getDeviceManufacturer", "getPackageName", "getVersionName", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "equals", "", "other", "hashCode", "", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class AndroidApplicationInfo {
private final String appBuildVersion;
private final List<ProcessDetails> appProcessDetails;
private final ProcessDetails currentProcessDetails;
private final String deviceManufacturer;
private final String packageName;
private final String versionName;
public AndroidApplicationInfo(String packageName, String versionName, String appBuildVersion, String deviceManufacturer, ProcessDetails currentProcessDetails, List<ProcessDetails> appProcessDetails) {
Intrinsics.checkNotNullParameter(packageName, "packageName");
Intrinsics.checkNotNullParameter(versionName, "versionName");
Intrinsics.checkNotNullParameter(appBuildVersion, "appBuildVersion");
Intrinsics.checkNotNullParameter(deviceManufacturer, "deviceManufacturer");
Intrinsics.checkNotNullParameter(currentProcessDetails, "currentProcessDetails");
Intrinsics.checkNotNullParameter(appProcessDetails, "appProcessDetails");
this.packageName = packageName;
this.versionName = versionName;
this.appBuildVersion = appBuildVersion;
this.deviceManufacturer = deviceManufacturer;
this.currentProcessDetails = currentProcessDetails;
this.appProcessDetails = appProcessDetails;
}
public static /* synthetic */ AndroidApplicationInfo copy$default(AndroidApplicationInfo androidApplicationInfo, String str, String str2, String str3, String str4, ProcessDetails processDetails, List list, int i, Object obj) {
if ((i & 1) != 0) {
str = androidApplicationInfo.packageName;
}
if ((i & 2) != 0) {
str2 = androidApplicationInfo.versionName;
}
if ((i & 4) != 0) {
str3 = androidApplicationInfo.appBuildVersion;
}
if ((i & 8) != 0) {
str4 = androidApplicationInfo.deviceManufacturer;
}
if ((i & 16) != 0) {
processDetails = androidApplicationInfo.currentProcessDetails;
}
if ((i & 32) != 0) {
list = androidApplicationInfo.appProcessDetails;
}
ProcessDetails processDetails2 = processDetails;
List list2 = list;
return androidApplicationInfo.copy(str, str2, str3, str4, processDetails2, list2);
}
/* renamed from: component1, reason: from getter */
public final String getPackageName() {
return this.packageName;
}
/* renamed from: component2, reason: from getter */
public final String getVersionName() {
return this.versionName;
}
/* renamed from: component3, reason: from getter */
public final String getAppBuildVersion() {
return this.appBuildVersion;
}
/* renamed from: component4, reason: from getter */
public final String getDeviceManufacturer() {
return this.deviceManufacturer;
}
/* renamed from: component5, reason: from getter */
public final ProcessDetails getCurrentProcessDetails() {
return this.currentProcessDetails;
}
public final List<ProcessDetails> component6() {
return this.appProcessDetails;
}
public final AndroidApplicationInfo copy(String packageName, String versionName, String appBuildVersion, String deviceManufacturer, ProcessDetails currentProcessDetails, List<ProcessDetails> appProcessDetails) {
Intrinsics.checkNotNullParameter(packageName, "packageName");
Intrinsics.checkNotNullParameter(versionName, "versionName");
Intrinsics.checkNotNullParameter(appBuildVersion, "appBuildVersion");
Intrinsics.checkNotNullParameter(deviceManufacturer, "deviceManufacturer");
Intrinsics.checkNotNullParameter(currentProcessDetails, "currentProcessDetails");
Intrinsics.checkNotNullParameter(appProcessDetails, "appProcessDetails");
return new AndroidApplicationInfo(packageName, versionName, appBuildVersion, deviceManufacturer, currentProcessDetails, appProcessDetails);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof AndroidApplicationInfo)) {
return false;
}
AndroidApplicationInfo androidApplicationInfo = (AndroidApplicationInfo) other;
return Intrinsics.areEqual(this.packageName, androidApplicationInfo.packageName) && Intrinsics.areEqual(this.versionName, androidApplicationInfo.versionName) && Intrinsics.areEqual(this.appBuildVersion, androidApplicationInfo.appBuildVersion) && Intrinsics.areEqual(this.deviceManufacturer, androidApplicationInfo.deviceManufacturer) && Intrinsics.areEqual(this.currentProcessDetails, androidApplicationInfo.currentProcessDetails) && Intrinsics.areEqual(this.appProcessDetails, androidApplicationInfo.appProcessDetails);
}
public final String getAppBuildVersion() {
return this.appBuildVersion;
}
public final List<ProcessDetails> getAppProcessDetails() {
return this.appProcessDetails;
}
public final ProcessDetails getCurrentProcessDetails() {
return this.currentProcessDetails;
}
public final String getDeviceManufacturer() {
return this.deviceManufacturer;
}
public final String getPackageName() {
return this.packageName;
}
public final String getVersionName() {
return this.versionName;
}
public int hashCode() {
return this.appProcessDetails.hashCode() + ((this.currentProcessDetails.hashCode() + com.google.android.gms.measurement.internal.a.d(this.deviceManufacturer, com.google.android.gms.measurement.internal.a.d(this.appBuildVersion, com.google.android.gms.measurement.internal.a.d(this.versionName, this.packageName.hashCode() * 31, 31), 31), 31)) * 31);
}
public String toString() {
StringBuilder sb = new StringBuilder("AndroidApplicationInfo(packageName=");
sb.append(this.packageName);
sb.append(", versionName=");
sb.append(this.versionName);
sb.append(", appBuildVersion=");
sb.append(this.appBuildVersion);
sb.append(", deviceManufacturer=");
sb.append(this.deviceManufacturer);
sb.append(", currentProcessDetails=");
sb.append(this.currentProcessDetails);
sb.append(", appProcessDetails=");
return com.google.android.gms.measurement.internal.a.o(sb, this.appProcessDetails, ')');
}
}

View File

@@ -0,0 +1,138 @@
package com.google.firebase.sessions;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0012\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0080\b\u0018\u00002\u00020\u0001B5\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0003\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\n¢\u0006\u0002\u0010\u000bJ\t\u0010\u0015\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0016\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0017\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0018\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0019\u001a\u00020\bHÆ\u0003J\t\u0010\u001a\u001a\u00020\nHÆ\u0003JE\u0010\u001b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00032\b\b\u0002\u0010\u0006\u001a\u00020\u00032\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\nHÆ\u0001J\u0013\u0010\u001c\u001a\u00020\u001d2\b\u0010\u001e\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u001f\u001a\u00020 HÖ\u0001J\t\u0010!\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\t\u001a\u00020\n¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u000fR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u0011\u0010\u0006\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u000fR\u0011\u0010\u0005\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u000f¨\u0006\""}, d2 = {"Lcom/google/firebase/sessions/ApplicationInfo;", "", RemoteConfigConstants.RequestFieldKey.APP_ID, "", "deviceModel", "sessionSdkVersion", "osVersion", "logEnvironment", "Lcom/google/firebase/sessions/LogEnvironment;", "androidAppInfo", "Lcom/google/firebase/sessions/AndroidApplicationInfo;", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/firebase/sessions/LogEnvironment;Lcom/google/firebase/sessions/AndroidApplicationInfo;)V", "getAndroidAppInfo", "()Lcom/google/firebase/sessions/AndroidApplicationInfo;", "getAppId", "()Ljava/lang/String;", "getDeviceModel", "getLogEnvironment", "()Lcom/google/firebase/sessions/LogEnvironment;", "getOsVersion", "getSessionSdkVersion", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "equals", "", "other", "hashCode", "", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class ApplicationInfo {
private final AndroidApplicationInfo androidAppInfo;
private final String appId;
private final String deviceModel;
private final LogEnvironment logEnvironment;
private final String osVersion;
private final String sessionSdkVersion;
public ApplicationInfo(String appId, String deviceModel, String sessionSdkVersion, String osVersion, LogEnvironment logEnvironment, AndroidApplicationInfo androidAppInfo) {
Intrinsics.checkNotNullParameter(appId, "appId");
Intrinsics.checkNotNullParameter(deviceModel, "deviceModel");
Intrinsics.checkNotNullParameter(sessionSdkVersion, "sessionSdkVersion");
Intrinsics.checkNotNullParameter(osVersion, "osVersion");
Intrinsics.checkNotNullParameter(logEnvironment, "logEnvironment");
Intrinsics.checkNotNullParameter(androidAppInfo, "androidAppInfo");
this.appId = appId;
this.deviceModel = deviceModel;
this.sessionSdkVersion = sessionSdkVersion;
this.osVersion = osVersion;
this.logEnvironment = logEnvironment;
this.androidAppInfo = androidAppInfo;
}
public static /* synthetic */ ApplicationInfo copy$default(ApplicationInfo applicationInfo, String str, String str2, String str3, String str4, LogEnvironment logEnvironment, AndroidApplicationInfo androidApplicationInfo, int i, Object obj) {
if ((i & 1) != 0) {
str = applicationInfo.appId;
}
if ((i & 2) != 0) {
str2 = applicationInfo.deviceModel;
}
if ((i & 4) != 0) {
str3 = applicationInfo.sessionSdkVersion;
}
if ((i & 8) != 0) {
str4 = applicationInfo.osVersion;
}
if ((i & 16) != 0) {
logEnvironment = applicationInfo.logEnvironment;
}
if ((i & 32) != 0) {
androidApplicationInfo = applicationInfo.androidAppInfo;
}
LogEnvironment logEnvironment2 = logEnvironment;
AndroidApplicationInfo androidApplicationInfo2 = androidApplicationInfo;
return applicationInfo.copy(str, str2, str3, str4, logEnvironment2, androidApplicationInfo2);
}
/* renamed from: component1, reason: from getter */
public final String getAppId() {
return this.appId;
}
/* renamed from: component2, reason: from getter */
public final String getDeviceModel() {
return this.deviceModel;
}
/* renamed from: component3, reason: from getter */
public final String getSessionSdkVersion() {
return this.sessionSdkVersion;
}
/* renamed from: component4, reason: from getter */
public final String getOsVersion() {
return this.osVersion;
}
/* renamed from: component5, reason: from getter */
public final LogEnvironment getLogEnvironment() {
return this.logEnvironment;
}
/* renamed from: component6, reason: from getter */
public final AndroidApplicationInfo getAndroidAppInfo() {
return this.androidAppInfo;
}
public final ApplicationInfo copy(String appId, String deviceModel, String sessionSdkVersion, String osVersion, LogEnvironment logEnvironment, AndroidApplicationInfo androidAppInfo) {
Intrinsics.checkNotNullParameter(appId, "appId");
Intrinsics.checkNotNullParameter(deviceModel, "deviceModel");
Intrinsics.checkNotNullParameter(sessionSdkVersion, "sessionSdkVersion");
Intrinsics.checkNotNullParameter(osVersion, "osVersion");
Intrinsics.checkNotNullParameter(logEnvironment, "logEnvironment");
Intrinsics.checkNotNullParameter(androidAppInfo, "androidAppInfo");
return new ApplicationInfo(appId, deviceModel, sessionSdkVersion, osVersion, logEnvironment, androidAppInfo);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof ApplicationInfo)) {
return false;
}
ApplicationInfo applicationInfo = (ApplicationInfo) other;
return Intrinsics.areEqual(this.appId, applicationInfo.appId) && Intrinsics.areEqual(this.deviceModel, applicationInfo.deviceModel) && Intrinsics.areEqual(this.sessionSdkVersion, applicationInfo.sessionSdkVersion) && Intrinsics.areEqual(this.osVersion, applicationInfo.osVersion) && this.logEnvironment == applicationInfo.logEnvironment && Intrinsics.areEqual(this.androidAppInfo, applicationInfo.androidAppInfo);
}
public final AndroidApplicationInfo getAndroidAppInfo() {
return this.androidAppInfo;
}
public final String getAppId() {
return this.appId;
}
public final String getDeviceModel() {
return this.deviceModel;
}
public final LogEnvironment getLogEnvironment() {
return this.logEnvironment;
}
public final String getOsVersion() {
return this.osVersion;
}
public final String getSessionSdkVersion() {
return this.sessionSdkVersion;
}
public int hashCode() {
return this.androidAppInfo.hashCode() + ((this.logEnvironment.hashCode() + com.google.android.gms.measurement.internal.a.d(this.osVersion, com.google.android.gms.measurement.internal.a.d(this.sessionSdkVersion, com.google.android.gms.measurement.internal.a.d(this.deviceModel, this.appId.hashCode() * 31, 31), 31), 31)) * 31);
}
public String toString() {
return "ApplicationInfo(appId=" + this.appId + ", deviceModel=" + this.deviceModel + ", sessionSdkVersion=" + this.sessionSdkVersion + ", osVersion=" + this.osVersion + ", logEnvironment=" + this.logEnvironment + ", androidAppInfo=" + this.androidAppInfo + ')';
}
}

View File

@@ -0,0 +1,156 @@
package com.google.firebase.sessions;
import com.google.firebase.encoders.FieldDescriptor;
import com.google.firebase.encoders.ObjectEncoder;
import com.google.firebase.encoders.ObjectEncoderContext;
import com.google.firebase.encoders.config.Configurator;
import com.google.firebase.encoders.config.EncoderConfig;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.io.IOException;
/* loaded from: classes3.dex */
public final class AutoSessionEventEncoder implements Configurator {
public static final int CODEGEN_VERSION = 2;
public static final Configurator CONFIG = new AutoSessionEventEncoder();
/* loaded from: classes3.dex */
public static final class AndroidApplicationInfoEncoder implements ObjectEncoder<AndroidApplicationInfo> {
static final AndroidApplicationInfoEncoder INSTANCE = new AndroidApplicationInfoEncoder();
private static final FieldDescriptor PACKAGENAME_DESCRIPTOR = FieldDescriptor.of(RemoteConfigConstants.RequestFieldKey.PACKAGE_NAME);
private static final FieldDescriptor VERSIONNAME_DESCRIPTOR = FieldDescriptor.of("versionName");
private static final FieldDescriptor APPBUILDVERSION_DESCRIPTOR = FieldDescriptor.of("appBuildVersion");
private static final FieldDescriptor DEVICEMANUFACTURER_DESCRIPTOR = FieldDescriptor.of("deviceManufacturer");
private static final FieldDescriptor CURRENTPROCESSDETAILS_DESCRIPTOR = FieldDescriptor.of("currentProcessDetails");
private static final FieldDescriptor APPPROCESSDETAILS_DESCRIPTOR = FieldDescriptor.of("appProcessDetails");
private AndroidApplicationInfoEncoder() {
}
@Override // com.google.firebase.encoders.Encoder
public void encode(AndroidApplicationInfo androidApplicationInfo, ObjectEncoderContext objectEncoderContext) throws IOException {
objectEncoderContext.add(PACKAGENAME_DESCRIPTOR, androidApplicationInfo.getPackageName());
objectEncoderContext.add(VERSIONNAME_DESCRIPTOR, androidApplicationInfo.getVersionName());
objectEncoderContext.add(APPBUILDVERSION_DESCRIPTOR, androidApplicationInfo.getAppBuildVersion());
objectEncoderContext.add(DEVICEMANUFACTURER_DESCRIPTOR, androidApplicationInfo.getDeviceManufacturer());
objectEncoderContext.add(CURRENTPROCESSDETAILS_DESCRIPTOR, androidApplicationInfo.getCurrentProcessDetails());
objectEncoderContext.add(APPPROCESSDETAILS_DESCRIPTOR, androidApplicationInfo.getAppProcessDetails());
}
}
/* loaded from: classes3.dex */
public static final class ApplicationInfoEncoder implements ObjectEncoder<ApplicationInfo> {
static final ApplicationInfoEncoder INSTANCE = new ApplicationInfoEncoder();
private static final FieldDescriptor APPID_DESCRIPTOR = FieldDescriptor.of(RemoteConfigConstants.RequestFieldKey.APP_ID);
private static final FieldDescriptor DEVICEMODEL_DESCRIPTOR = FieldDescriptor.of("deviceModel");
private static final FieldDescriptor SESSIONSDKVERSION_DESCRIPTOR = FieldDescriptor.of("sessionSdkVersion");
private static final FieldDescriptor OSVERSION_DESCRIPTOR = FieldDescriptor.of("osVersion");
private static final FieldDescriptor LOGENVIRONMENT_DESCRIPTOR = FieldDescriptor.of("logEnvironment");
private static final FieldDescriptor ANDROIDAPPINFO_DESCRIPTOR = FieldDescriptor.of("androidAppInfo");
private ApplicationInfoEncoder() {
}
@Override // com.google.firebase.encoders.Encoder
public void encode(ApplicationInfo applicationInfo, ObjectEncoderContext objectEncoderContext) throws IOException {
objectEncoderContext.add(APPID_DESCRIPTOR, applicationInfo.getAppId());
objectEncoderContext.add(DEVICEMODEL_DESCRIPTOR, applicationInfo.getDeviceModel());
objectEncoderContext.add(SESSIONSDKVERSION_DESCRIPTOR, applicationInfo.getSessionSdkVersion());
objectEncoderContext.add(OSVERSION_DESCRIPTOR, applicationInfo.getOsVersion());
objectEncoderContext.add(LOGENVIRONMENT_DESCRIPTOR, applicationInfo.getLogEnvironment());
objectEncoderContext.add(ANDROIDAPPINFO_DESCRIPTOR, applicationInfo.getAndroidAppInfo());
}
}
/* loaded from: classes3.dex */
public static final class DataCollectionStatusEncoder implements ObjectEncoder<DataCollectionStatus> {
static final DataCollectionStatusEncoder INSTANCE = new DataCollectionStatusEncoder();
private static final FieldDescriptor PERFORMANCE_DESCRIPTOR = FieldDescriptor.of("performance");
private static final FieldDescriptor CRASHLYTICS_DESCRIPTOR = FieldDescriptor.of("crashlytics");
private static final FieldDescriptor SESSIONSAMPLINGRATE_DESCRIPTOR = FieldDescriptor.of("sessionSamplingRate");
private DataCollectionStatusEncoder() {
}
@Override // com.google.firebase.encoders.Encoder
public void encode(DataCollectionStatus dataCollectionStatus, ObjectEncoderContext objectEncoderContext) throws IOException {
objectEncoderContext.add(PERFORMANCE_DESCRIPTOR, dataCollectionStatus.getPerformance());
objectEncoderContext.add(CRASHLYTICS_DESCRIPTOR, dataCollectionStatus.getCrashlytics());
objectEncoderContext.add(SESSIONSAMPLINGRATE_DESCRIPTOR, dataCollectionStatus.getSessionSamplingRate());
}
}
/* loaded from: classes3.dex */
public static final class ProcessDetailsEncoder implements ObjectEncoder<ProcessDetails> {
static final ProcessDetailsEncoder INSTANCE = new ProcessDetailsEncoder();
private static final FieldDescriptor PROCESSNAME_DESCRIPTOR = FieldDescriptor.of("processName");
private static final FieldDescriptor PID_DESCRIPTOR = FieldDescriptor.of("pid");
private static final FieldDescriptor IMPORTANCE_DESCRIPTOR = FieldDescriptor.of("importance");
private static final FieldDescriptor DEFAULTPROCESS_DESCRIPTOR = FieldDescriptor.of("defaultProcess");
private ProcessDetailsEncoder() {
}
@Override // com.google.firebase.encoders.Encoder
public void encode(ProcessDetails processDetails, ObjectEncoderContext objectEncoderContext) throws IOException {
objectEncoderContext.add(PROCESSNAME_DESCRIPTOR, processDetails.getProcessName());
objectEncoderContext.add(PID_DESCRIPTOR, processDetails.getPid());
objectEncoderContext.add(IMPORTANCE_DESCRIPTOR, processDetails.getImportance());
objectEncoderContext.add(DEFAULTPROCESS_DESCRIPTOR, processDetails.isDefaultProcess());
}
}
/* loaded from: classes3.dex */
public static final class SessionEventEncoder implements ObjectEncoder<SessionEvent> {
static final SessionEventEncoder INSTANCE = new SessionEventEncoder();
private static final FieldDescriptor EVENTTYPE_DESCRIPTOR = FieldDescriptor.of("eventType");
private static final FieldDescriptor SESSIONDATA_DESCRIPTOR = FieldDescriptor.of("sessionData");
private static final FieldDescriptor APPLICATIONINFO_DESCRIPTOR = FieldDescriptor.of("applicationInfo");
private SessionEventEncoder() {
}
@Override // com.google.firebase.encoders.Encoder
public void encode(SessionEvent sessionEvent, ObjectEncoderContext objectEncoderContext) throws IOException {
objectEncoderContext.add(EVENTTYPE_DESCRIPTOR, sessionEvent.getEventType());
objectEncoderContext.add(SESSIONDATA_DESCRIPTOR, sessionEvent.getSessionData());
objectEncoderContext.add(APPLICATIONINFO_DESCRIPTOR, sessionEvent.getApplicationInfo());
}
}
/* loaded from: classes3.dex */
public static final class SessionInfoEncoder implements ObjectEncoder<SessionInfo> {
static final SessionInfoEncoder INSTANCE = new SessionInfoEncoder();
private static final FieldDescriptor SESSIONID_DESCRIPTOR = FieldDescriptor.of("sessionId");
private static final FieldDescriptor FIRSTSESSIONID_DESCRIPTOR = FieldDescriptor.of("firstSessionId");
private static final FieldDescriptor SESSIONINDEX_DESCRIPTOR = FieldDescriptor.of("sessionIndex");
private static final FieldDescriptor EVENTTIMESTAMPUS_DESCRIPTOR = FieldDescriptor.of("eventTimestampUs");
private static final FieldDescriptor DATACOLLECTIONSTATUS_DESCRIPTOR = FieldDescriptor.of("dataCollectionStatus");
private static final FieldDescriptor FIREBASEINSTALLATIONID_DESCRIPTOR = FieldDescriptor.of("firebaseInstallationId");
private SessionInfoEncoder() {
}
@Override // com.google.firebase.encoders.Encoder
public void encode(SessionInfo sessionInfo, ObjectEncoderContext objectEncoderContext) throws IOException {
objectEncoderContext.add(SESSIONID_DESCRIPTOR, sessionInfo.getSessionId());
objectEncoderContext.add(FIRSTSESSIONID_DESCRIPTOR, sessionInfo.getFirstSessionId());
objectEncoderContext.add(SESSIONINDEX_DESCRIPTOR, sessionInfo.getSessionIndex());
objectEncoderContext.add(EVENTTIMESTAMPUS_DESCRIPTOR, sessionInfo.getEventTimestampUs());
objectEncoderContext.add(DATACOLLECTIONSTATUS_DESCRIPTOR, sessionInfo.getDataCollectionStatus());
objectEncoderContext.add(FIREBASEINSTALLATIONID_DESCRIPTOR, sessionInfo.getFirebaseInstallationId());
}
}
private AutoSessionEventEncoder() {
}
@Override // com.google.firebase.encoders.config.Configurator
public void configure(EncoderConfig<?> encoderConfig) {
encoderConfig.registerEncoder(SessionEvent.class, SessionEventEncoder.INSTANCE);
encoderConfig.registerEncoder(SessionInfo.class, SessionInfoEncoder.INSTANCE);
encoderConfig.registerEncoder(DataCollectionStatus.class, DataCollectionStatusEncoder.INSTANCE);
encoderConfig.registerEncoder(ApplicationInfo.class, ApplicationInfoEncoder.INSTANCE);
encoderConfig.registerEncoder(AndroidApplicationInfo.class, AndroidApplicationInfoEncoder.INSTANCE);
encoderConfig.registerEncoder(ProcessDetails.class, ProcessDetailsEncoder.INSTANCE);
}
}

View File

@@ -0,0 +1,9 @@
package com.google.firebase.sessions;
/* loaded from: classes3.dex */
public final class BuildConfig {
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String LIBRARY_PACKAGE_NAME = "com.google.firebase.sessions";
public static final String VERSION_NAME = "1.2.0";
}

View File

@@ -0,0 +1,26 @@
package com.google.firebase.sessions;
import com.google.firebase.encoders.json.NumberedEnum;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\n\b\u0080\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u00012\u00020\u0002B\u000f\b\u0002\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005R\u0014\u0010\u0003\u001a\u00020\u0004X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007j\u0002\b\bj\u0002\b\tj\u0002\b\nj\u0002\b\u000bj\u0002\b\fj\u0002\b\r¨\u0006\u000e"}, d2 = {"Lcom/google/firebase/sessions/DataCollectionState;", "", "Lcom/google/firebase/encoders/json/NumberedEnum;", "number", "", "(Ljava/lang/String;II)V", "getNumber", "()I", "COLLECTION_UNKNOWN", "COLLECTION_SDK_NOT_INSTALLED", "COLLECTION_ENABLED", "COLLECTION_DISABLED", "COLLECTION_DISABLED_REMOTE", "COLLECTION_SAMPLED", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public enum DataCollectionState implements NumberedEnum {
COLLECTION_UNKNOWN(0),
COLLECTION_SDK_NOT_INSTALLED(1),
COLLECTION_ENABLED(2),
COLLECTION_DISABLED(3),
COLLECTION_DISABLED_REMOTE(4),
COLLECTION_SAMPLED(5);
private final int number;
DataCollectionState(int i) {
this.number = i;
}
@Override // com.google.firebase.encoders.json.NumberedEnum
public int getNumber() {
return this.number;
}
}

View File

@@ -0,0 +1,95 @@
package com.google.firebase.sessions;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0006\n\u0002\b\u000b\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0080\b\u0018\u00002\u00020\u0001B#\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\t\u0010\r\u001a\u00020\u0003HÆ\u0003J\t\u0010\u000e\u001a\u00020\u0003HÆ\u0003J\t\u0010\u000f\u001a\u00020\u0006HÆ\u0003J'\u0010\u0010\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u0006HÆ\u0001J\u0013\u0010\u0011\u001a\u00020\u00122\b\u0010\u0013\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0014\u001a\u00020\u0015HÖ\u0001J\t\u0010\u0016\u001a\u00020\u0017HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\tR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\f¨\u0006\u0018"}, d2 = {"Lcom/google/firebase/sessions/DataCollectionStatus;", "", "performance", "Lcom/google/firebase/sessions/DataCollectionState;", "crashlytics", "sessionSamplingRate", "", "(Lcom/google/firebase/sessions/DataCollectionState;Lcom/google/firebase/sessions/DataCollectionState;D)V", "getCrashlytics", "()Lcom/google/firebase/sessions/DataCollectionState;", "getPerformance", "getSessionSamplingRate", "()D", "component1", "component2", "component3", "copy", "equals", "", "other", "hashCode", "", "toString", "", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class DataCollectionStatus {
private final DataCollectionState crashlytics;
private final DataCollectionState performance;
private final double sessionSamplingRate;
public DataCollectionStatus() {
this(null, null, FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE, 7, null);
}
public static /* synthetic */ DataCollectionStatus copy$default(DataCollectionStatus dataCollectionStatus, DataCollectionState dataCollectionState, DataCollectionState dataCollectionState2, double d4, int i, Object obj) {
if ((i & 1) != 0) {
dataCollectionState = dataCollectionStatus.performance;
}
if ((i & 2) != 0) {
dataCollectionState2 = dataCollectionStatus.crashlytics;
}
if ((i & 4) != 0) {
d4 = dataCollectionStatus.sessionSamplingRate;
}
return dataCollectionStatus.copy(dataCollectionState, dataCollectionState2, d4);
}
/* renamed from: component1, reason: from getter */
public final DataCollectionState getPerformance() {
return this.performance;
}
/* renamed from: component2, reason: from getter */
public final DataCollectionState getCrashlytics() {
return this.crashlytics;
}
/* renamed from: component3, reason: from getter */
public final double getSessionSamplingRate() {
return this.sessionSamplingRate;
}
public final DataCollectionStatus copy(DataCollectionState performance, DataCollectionState crashlytics, double sessionSamplingRate) {
Intrinsics.checkNotNullParameter(performance, "performance");
Intrinsics.checkNotNullParameter(crashlytics, "crashlytics");
return new DataCollectionStatus(performance, crashlytics, sessionSamplingRate);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof DataCollectionStatus)) {
return false;
}
DataCollectionStatus dataCollectionStatus = (DataCollectionStatus) other;
return this.performance == dataCollectionStatus.performance && this.crashlytics == dataCollectionStatus.crashlytics && Intrinsics.areEqual((Object) Double.valueOf(this.sessionSamplingRate), (Object) Double.valueOf(dataCollectionStatus.sessionSamplingRate));
}
public final DataCollectionState getCrashlytics() {
return this.crashlytics;
}
public final DataCollectionState getPerformance() {
return this.performance;
}
public final double getSessionSamplingRate() {
return this.sessionSamplingRate;
}
public int hashCode() {
return Double.hashCode(this.sessionSamplingRate) + ((this.crashlytics.hashCode() + (this.performance.hashCode() * 31)) * 31);
}
public String toString() {
return "DataCollectionStatus(performance=" + this.performance + ", crashlytics=" + this.crashlytics + ", sessionSamplingRate=" + this.sessionSamplingRate + ')';
}
public DataCollectionStatus(DataCollectionState performance, DataCollectionState crashlytics, double d4) {
Intrinsics.checkNotNullParameter(performance, "performance");
Intrinsics.checkNotNullParameter(crashlytics, "crashlytics");
this.performance = performance;
this.crashlytics = crashlytics;
this.sessionSamplingRate = d4;
}
public /* synthetic */ DataCollectionStatus(DataCollectionState dataCollectionState, DataCollectionState dataCollectionState2, double d4, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? DataCollectionState.COLLECTION_SDK_NOT_INSTALLED : dataCollectionState, (i & 2) != 0 ? DataCollectionState.COLLECTION_SDK_NOT_INSTALLED : dataCollectionState2, (i & 4) != 0 ? 1.0d : d4);
}
}

View File

@@ -0,0 +1,41 @@
package com.google.firebase.sessions;
import B0.w;
import I2.k;
import T1.c;
import T1.d;
import T1.g;
import W1.r;
import android.util.Log;
import com.google.firebase.inject.Provider;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0005\b\u0000\u0018\u0000 \u00112\u00020\u0001:\u0001\u0011B\u0015\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002¢\u0006\u0004\b\u0005\u0010\u0006J\u0017\u0010\n\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\u0007H\u0002¢\u0006\u0004\b\n\u0010\u000bJ\u0017\u0010\u000e\u001a\u00020\r2\u0006\u0010\f\u001a\u00020\u0007H\u0016¢\u0006\u0004\b\u000e\u0010\u000fR\u001a\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0004\u0010\u0010¨\u0006\u0012"}, d2 = {"Lcom/google/firebase/sessions/EventGDTLogger;", "Lcom/google/firebase/sessions/EventGDTLoggerInterface;", "Lcom/google/firebase/inject/Provider;", "LT1/g;", "transportFactoryProvider", "<init>", "(Lcom/google/firebase/inject/Provider;)V", "Lcom/google/firebase/sessions/SessionEvent;", "value", "", "encode", "(Lcom/google/firebase/sessions/SessionEvent;)[B", "sessionEvent", "", "log", "(Lcom/google/firebase/sessions/SessionEvent;)V", "Lcom/google/firebase/inject/Provider;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class EventGDTLogger implements EventGDTLoggerInterface {
private static final String AQS_LOG_SOURCE = "FIREBASE_APPQUALITY_SESSION";
private static final String TAG = "EventGDTLogger";
private final Provider<g> transportFactoryProvider;
public EventGDTLogger(Provider<g> transportFactoryProvider) {
Intrinsics.checkNotNullParameter(transportFactoryProvider, "transportFactoryProvider");
this.transportFactoryProvider = transportFactoryProvider;
}
public final byte[] encode(SessionEvent value) {
String encode = SessionEvents.INSTANCE.getSESSION_EVENT_ENCODER$com_google_firebase_firebase_sessions().encode(value);
Intrinsics.checkNotNullExpressionValue(encode, "SessionEvents.SESSION_EVENT_ENCODER.encode(value)");
Log.d(TAG, "Session Event: " + encode);
byte[] bytes = encode.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
return bytes;
}
@Override // com.google.firebase.sessions.EventGDTLoggerInterface
public void log(SessionEvent sessionEvent) {
Intrinsics.checkNotNullParameter(sessionEvent, "sessionEvent");
((r) this.transportFactoryProvider.get()).a(AQS_LOG_SOURCE, new c("json"), new k(this, 21)).a(new T1.a(sessionEvent, d.f1658a, null), new w(8));
}
}

View File

@@ -0,0 +1,9 @@
package com.google.firebase.sessions;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\bà\u0080\u0001\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H&¨\u0006\u0006"}, d2 = {"Lcom/google/firebase/sessions/EventGDTLoggerInterface;", "", "log", "", "sessionEvent", "Lcom/google/firebase/sessions/SessionEvent;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface EventGDTLoggerInterface {
void log(SessionEvent sessionEvent);
}

View File

@@ -0,0 +1,22 @@
package com.google.firebase.sessions;
import com.google.firebase.encoders.json.NumberedEnum;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0006\b\u0080\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u00012\u00020\u0002B\u000f\b\u0002\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005R\u0014\u0010\u0003\u001a\u00020\u0004X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007j\u0002\b\bj\u0002\b\t¨\u0006\n"}, d2 = {"Lcom/google/firebase/sessions/EventType;", "", "Lcom/google/firebase/encoders/json/NumberedEnum;", "number", "", "(Ljava/lang/String;II)V", "getNumber", "()I", "EVENT_TYPE_UNKNOWN", "SESSION_START", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public enum EventType implements NumberedEnum {
EVENT_TYPE_UNKNOWN(0),
SESSION_START(1);
private final int number;
EventType(int i) {
this.number = i;
}
@Override // com.google.firebase.encoders.json.NumberedEnum
public int getNumber() {
return this.number;
}
}

View File

@@ -0,0 +1,203 @@
package com.google.firebase.sessions;
import android.app.Application;
import android.content.Context;
import android.util.Log;
import com.google.firebase.Firebase;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseKt;
import com.google.firebase.FirebaseOptions;
import com.google.firebase.sessions.settings.SessionsSettings;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0000\u0018\u0000 \t2\u00020\u0001:\u0001\tB\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/google/firebase/sessions/FirebaseSessions;", "", "firebaseApp", "Lcom/google/firebase/FirebaseApp;", "settings", "Lcom/google/firebase/sessions/settings/SessionsSettings;", "backgroundDispatcher", "Lkotlin/coroutines/CoroutineContext;", "(Lcom/google/firebase/FirebaseApp;Lcom/google/firebase/sessions/settings/SessionsSettings;Lkotlin/coroutines/CoroutineContext;)V", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class FirebaseSessions {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private static final String TAG = "FirebaseSessions";
private final FirebaseApp firebaseApp;
private final SessionsSettings settings;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.FirebaseSessions$1", f = "FirebaseSessions.kt", i = {}, l = {44, 48}, m = "invokeSuspend", n = {}, s = {})
/* renamed from: com.google.firebase.sessions.FirebaseSessions$1, reason: invalid class name */
/* loaded from: classes3.dex */
public static final class AnonymousClass1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ CoroutineContext $backgroundDispatcher;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnonymousClass1(CoroutineContext coroutineContext, Continuation<? super AnonymousClass1> continuation) {
super(2, continuation);
this.$backgroundDispatcher = coroutineContext;
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: invokeSuspend$lambda-1, reason: not valid java name */
public static final void m96invokeSuspend$lambda1(String str, FirebaseOptions firebaseOptions) {
Log.w(FirebaseSessions.TAG, "FirebaseApp instance deleted. Sessions library will stop collecting data.");
SessionsActivityLifecycleCallbacks.INSTANCE.setLifecycleClient(null);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new AnonymousClass1(this.$backgroundDispatcher, continuation);
}
/* JADX WARN: Code restructure failed: missing block: B:28:0x0066, code lost:
if (r6.updateSettings(r5) == r0) goto L25;
*/
/* JADX WARN: Code restructure failed: missing block: B:29:0x0068, code lost:
return r0;
*/
/* JADX WARN: Code restructure failed: missing block: B:33:0x002b, code lost:
if (r6 == r0) goto L25;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r6v15, types: [com.google.firebase.FirebaseAppLifecycleListener, java.lang.Object] */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r6) {
/*
r5 = this;
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r1 = r5.label
java.lang.String r2 = "FirebaseSessions"
r3 = 2
r4 = 1
if (r1 == 0) goto L20
if (r1 == r4) goto L1c
if (r1 != r3) goto L14
kotlin.ResultKt.throwOnFailure(r6)
goto L69
L14:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L1c:
kotlin.ResultKt.throwOnFailure(r6)
goto L2e
L20:
kotlin.ResultKt.throwOnFailure(r6)
com.google.firebase.sessions.api.FirebaseSessionsDependencies r6 = com.google.firebase.sessions.api.FirebaseSessionsDependencies.INSTANCE
r5.label = r4
java.lang.Object r6 = r6.getRegisteredSubscribers$com_google_firebase_firebase_sessions(r5)
if (r6 != r0) goto L2e
goto L68
L2e:
java.util.Map r6 = (java.util.Map) r6
java.util.Collection r6 = r6.values()
java.lang.Iterable r6 = (java.lang.Iterable) r6
boolean r1 = r6 instanceof java.util.Collection
if (r1 == 0) goto L44
r1 = r6
java.util.Collection r1 = (java.util.Collection) r1
boolean r1 = r1.isEmpty()
if (r1 == 0) goto L44
goto L99
L44:
java.util.Iterator r6 = r6.iterator()
L48:
boolean r1 = r6.hasNext()
if (r1 == 0) goto L99
java.lang.Object r1 = r6.next()
com.google.firebase.sessions.api.SessionSubscriber r1 = (com.google.firebase.sessions.api.SessionSubscriber) r1
boolean r1 = r1.isDataCollectionEnabled()
if (r1 == 0) goto L48
com.google.firebase.sessions.FirebaseSessions r6 = com.google.firebase.sessions.FirebaseSessions.this
com.google.firebase.sessions.settings.SessionsSettings r6 = com.google.firebase.sessions.FirebaseSessions.access$getSettings$p(r6)
r5.label = r3
java.lang.Object r6 = r6.updateSettings(r5)
if (r6 != r0) goto L69
L68:
return r0
L69:
com.google.firebase.sessions.FirebaseSessions r6 = com.google.firebase.sessions.FirebaseSessions.this
com.google.firebase.sessions.settings.SessionsSettings r6 = com.google.firebase.sessions.FirebaseSessions.access$getSettings$p(r6)
boolean r6 = r6.getSessionsEnabled()
if (r6 != 0) goto L7b
java.lang.String r5 = "Sessions SDK disabled. Not listening to lifecycle events."
android.util.Log.d(r2, r5)
goto L9e
L7b:
com.google.firebase.sessions.SessionLifecycleClient r6 = new com.google.firebase.sessions.SessionLifecycleClient
kotlin.coroutines.CoroutineContext r0 = r5.$backgroundDispatcher
r6.<init>(r0)
r6.bindToService()
com.google.firebase.sessions.SessionsActivityLifecycleCallbacks r0 = com.google.firebase.sessions.SessionsActivityLifecycleCallbacks.INSTANCE
r0.setLifecycleClient(r6)
com.google.firebase.sessions.FirebaseSessions r5 = com.google.firebase.sessions.FirebaseSessions.this
com.google.firebase.FirebaseApp r5 = com.google.firebase.sessions.FirebaseSessions.access$getFirebaseApp$p(r5)
com.google.firebase.sessions.a r6 = new com.google.firebase.sessions.a
r6.<init>()
r5.addLifecycleEventListener(r6)
goto L9e
L99:
java.lang.String r5 = "No Sessions subscribers. Not listening to lifecycle events."
android.util.Log.d(r2, r5)
L9e:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.FirebaseSessions.AnonymousClass1.invokeSuspend(java.lang.Object):java.lang.Object");
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u0011\u0010\u0005\u001a\u00020\u00068F¢\u0006\u0006\u001a\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/google/firebase/sessions/FirebaseSessions$Companion;", "", "()V", "TAG", "", "instance", "Lcom/google/firebase/sessions/FirebaseSessions;", "getInstance", "()Lcom/google/firebase/sessions/FirebaseSessions;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final FirebaseSessions getInstance() {
Object obj = FirebaseKt.getApp(Firebase.INSTANCE).get(FirebaseSessions.class);
Intrinsics.checkNotNullExpressionValue(obj, "Firebase.app[FirebaseSessions::class.java]");
return (FirebaseSessions) obj;
}
private Companion() {
}
}
public FirebaseSessions(FirebaseApp firebaseApp, SessionsSettings settings, CoroutineContext backgroundDispatcher) {
Intrinsics.checkNotNullParameter(firebaseApp, "firebaseApp");
Intrinsics.checkNotNullParameter(settings, "settings");
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
this.firebaseApp = firebaseApp;
this.settings = settings;
Log.d(TAG, "Initializing Firebase Sessions SDK.");
Context applicationContext = firebaseApp.getApplicationContext().getApplicationContext();
if (applicationContext instanceof Application) {
((Application) applicationContext).registerActivityLifecycleCallbacks(SessionsActivityLifecycleCallbacks.INSTANCE);
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(backgroundDispatcher), null, null, new AnonymousClass1(backgroundDispatcher, null), 3, null);
} else {
Log.e(TAG, "Failed to register lifecycle callbacks, unexpected context " + applicationContext.getClass() + '.');
}
}
}

View File

@@ -0,0 +1,53 @@
package com.google.firebase.sessions;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0080\b\u0018\u00002\u00020\u0001B\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0004J\u000b\u0010\u0007\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u0015\u0010\b\u001a\u00020\u00002\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u0003HÆ\u0001J\u0013\u0010\t\u001a\u00020\n2\b\u0010\u000b\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\f\u001a\u00020\rHÖ\u0001J\t\u0010\u000e\u001a\u00020\u0003HÖ\u0001R\u0013\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u000f"}, d2 = {"Lcom/google/firebase/sessions/FirebaseSessionsData;", "", "sessionId", "", "(Ljava/lang/String;)V", "getSessionId", "()Ljava/lang/String;", "component1", "copy", "equals", "", "other", "hashCode", "", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class FirebaseSessionsData {
private final String sessionId;
public FirebaseSessionsData(String str) {
this.sessionId = str;
}
public static /* synthetic */ FirebaseSessionsData copy$default(FirebaseSessionsData firebaseSessionsData, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = firebaseSessionsData.sessionId;
}
return firebaseSessionsData.copy(str);
}
/* renamed from: component1, reason: from getter */
public final String getSessionId() {
return this.sessionId;
}
public final FirebaseSessionsData copy(String sessionId) {
return new FirebaseSessionsData(sessionId);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
return (other instanceof FirebaseSessionsData) && Intrinsics.areEqual(this.sessionId, ((FirebaseSessionsData) other).sessionId);
}
public final String getSessionId() {
return this.sessionId;
}
public int hashCode() {
String str = this.sessionId;
if (str == null) {
return 0;
}
return str.hashCode();
}
public String toString() {
return com.google.android.gms.measurement.internal.a.n(new StringBuilder("FirebaseSessionsData(sessionId="), this.sessionId, ')');
}
}

View File

@@ -0,0 +1,341 @@
package com.google.firebase.sessions;
import T1.g;
import android.content.Context;
import androidx.annotation.Keep;
import com.google.firebase.FirebaseApp;
import com.google.firebase.annotations.concurrent.Background;
import com.google.firebase.annotations.concurrent.Blocking;
import com.google.firebase.components.Component;
import com.google.firebase.components.ComponentContainer;
import com.google.firebase.components.ComponentFactory;
import com.google.firebase.components.ComponentRegistrar;
import com.google.firebase.components.Dependency;
import com.google.firebase.components.Qualified;
import com.google.firebase.inject.Provider;
import com.google.firebase.installations.FirebaseInstallationsApi;
import com.google.firebase.platforminfo.LibraryVersionComponent;
import com.google.firebase.sessions.settings.SessionsSettings;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineDispatcher;
@Keep
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0001\u0018\u0000 \b2\u00020\u0001:\u0001\bB\u0005¢\u0006\u0002\u0010\u0002J6\u0010\u0003\u001a0\u0012,\u0012*\u0012\u000e\b\u0001\u0012\n \u0007*\u0004\u0018\u00010\u00060\u0006 \u0007*\u0014\u0012\u000e\b\u0001\u0012\n \u0007*\u0004\u0018\u00010\u00060\u0006\u0018\u00010\u00050\u00050\u0004H\u0016¨\u0006\t"}, d2 = {"Lcom/google/firebase/sessions/FirebaseSessionsRegistrar;", "Lcom/google/firebase/components/ComponentRegistrar;", "()V", "getComponents", "", "Lcom/google/firebase/components/Component;", "", "kotlin.jvm.PlatformType", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class FirebaseSessionsRegistrar implements ComponentRegistrar {
@Deprecated
private static final String LIBRARY_NAME = "fire-sessions";
private static final Companion Companion = new Companion(null);
@Deprecated
private static final Qualified<FirebaseApp> firebaseApp = Qualified.unqualified(FirebaseApp.class);
@Deprecated
private static final Qualified<FirebaseInstallationsApi> firebaseInstallationsApi = Qualified.unqualified(FirebaseInstallationsApi.class);
@Deprecated
private static final Qualified<CoroutineDispatcher> backgroundDispatcher = Qualified.qualified(Background.class, CoroutineDispatcher.class);
@Deprecated
private static final Qualified<CoroutineDispatcher> blockingDispatcher = Qualified.qualified(Blocking.class, CoroutineDispatcher.class);
@Deprecated
private static final Qualified<g> transportFactory = Qualified.unqualified(g.class);
@Deprecated
private static final Qualified<SessionFirelogPublisher> sessionFirelogPublisher = Qualified.unqualified(SessionFirelogPublisher.class);
@Deprecated
private static final Qualified<SessionGenerator> sessionGenerator = Qualified.unqualified(SessionGenerator.class);
@Deprecated
private static final Qualified<SessionsSettings> sessionsSettings = Qualified.unqualified(SessionsSettings.class);
@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0082\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u0014\u0010\u0005\u001a\u00020\u00048\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0005\u0010\u0006R8\u0010\n\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\b0\b \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\b0\b\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\n\u0010\u000bR8\u0010\f\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\b0\b \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\b0\b\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\f\u0010\u000bR8\u0010\u000e\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\r0\r \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\r0\r\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000e\u0010\u000bR8\u0010\u0010\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\u000f0\u000f \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\u000f0\u000f\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0010\u0010\u000bR8\u0010\u0012\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00110\u0011 \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00110\u0011\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0012\u0010\u000bR8\u0010\u0014\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00130\u0013 \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00130\u0013\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0014\u0010\u000bR8\u0010\u0016\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00150\u0015 \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00150\u0015\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0016\u0010\u000bR8\u0010\u0018\u001a&\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00170\u0017 \t*\u0012\u0012\f\u0012\n \t*\u0004\u0018\u00010\u00170\u0017\u0018\u00010\u00070\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0018\u0010\u000b¨\u0006\u0019"}, d2 = {"Lcom/google/firebase/sessions/FirebaseSessionsRegistrar$Companion;", "", "<init>", "()V", "", "LIBRARY_NAME", "Ljava/lang/String;", "Lcom/google/firebase/components/Qualified;", "Lkotlinx/coroutines/CoroutineDispatcher;", "kotlin.jvm.PlatformType", "backgroundDispatcher", "Lcom/google/firebase/components/Qualified;", "blockingDispatcher", "Lcom/google/firebase/FirebaseApp;", "firebaseApp", "Lcom/google/firebase/installations/FirebaseInstallationsApi;", "firebaseInstallationsApi", "Lcom/google/firebase/sessions/SessionFirelogPublisher;", "sessionFirelogPublisher", "Lcom/google/firebase/sessions/SessionGenerator;", "sessionGenerator", "Lcom/google/firebase/sessions/settings/SessionsSettings;", "sessionsSettings", "LT1/g;", "transportFactory", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getComponents$lambda-0, reason: not valid java name */
public static final FirebaseSessions m97getComponents$lambda0(ComponentContainer componentContainer) {
Object obj = componentContainer.get(firebaseApp);
Intrinsics.checkNotNullExpressionValue(obj, "container[firebaseApp]");
Object obj2 = componentContainer.get(sessionsSettings);
Intrinsics.checkNotNullExpressionValue(obj2, "container[sessionsSettings]");
Object obj3 = componentContainer.get(backgroundDispatcher);
Intrinsics.checkNotNullExpressionValue(obj3, "container[backgroundDispatcher]");
return new FirebaseSessions((FirebaseApp) obj, (SessionsSettings) obj2, (CoroutineContext) obj3);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getComponents$lambda-1, reason: not valid java name */
public static final SessionGenerator m98getComponents$lambda1(ComponentContainer componentContainer) {
return new SessionGenerator(WallClock.INSTANCE, null, 2, null);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getComponents$lambda-2, reason: not valid java name */
public static final SessionFirelogPublisher m99getComponents$lambda2(ComponentContainer componentContainer) {
Object obj = componentContainer.get(firebaseApp);
Intrinsics.checkNotNullExpressionValue(obj, "container[firebaseApp]");
Object obj2 = componentContainer.get(firebaseInstallationsApi);
Intrinsics.checkNotNullExpressionValue(obj2, "container[firebaseInstallationsApi]");
Object obj3 = componentContainer.get(sessionsSettings);
Intrinsics.checkNotNullExpressionValue(obj3, "container[sessionsSettings]");
Provider provider = componentContainer.getProvider(transportFactory);
Intrinsics.checkNotNullExpressionValue(provider, "container.getProvider(transportFactory)");
EventGDTLogger eventGDTLogger = new EventGDTLogger(provider);
Object obj4 = componentContainer.get(backgroundDispatcher);
Intrinsics.checkNotNullExpressionValue(obj4, "container[backgroundDispatcher]");
return new SessionFirelogPublisherImpl((FirebaseApp) obj, (FirebaseInstallationsApi) obj2, (SessionsSettings) obj3, eventGDTLogger, (CoroutineContext) obj4);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getComponents$lambda-3, reason: not valid java name */
public static final SessionsSettings m100getComponents$lambda3(ComponentContainer componentContainer) {
Object obj = componentContainer.get(firebaseApp);
Intrinsics.checkNotNullExpressionValue(obj, "container[firebaseApp]");
Object obj2 = componentContainer.get(blockingDispatcher);
Intrinsics.checkNotNullExpressionValue(obj2, "container[blockingDispatcher]");
Object obj3 = componentContainer.get(backgroundDispatcher);
Intrinsics.checkNotNullExpressionValue(obj3, "container[backgroundDispatcher]");
Object obj4 = componentContainer.get(firebaseInstallationsApi);
Intrinsics.checkNotNullExpressionValue(obj4, "container[firebaseInstallationsApi]");
return new SessionsSettings((FirebaseApp) obj, (CoroutineContext) obj2, (CoroutineContext) obj3, (FirebaseInstallationsApi) obj4);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getComponents$lambda-4, reason: not valid java name */
public static final SessionDatastore m101getComponents$lambda4(ComponentContainer componentContainer) {
Context applicationContext = ((FirebaseApp) componentContainer.get(firebaseApp)).getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "container[firebaseApp].applicationContext");
Object obj = componentContainer.get(backgroundDispatcher);
Intrinsics.checkNotNullExpressionValue(obj, "container[backgroundDispatcher]");
return new SessionDatastoreImpl(applicationContext, (CoroutineContext) obj);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getComponents$lambda-5, reason: not valid java name */
public static final SessionLifecycleServiceBinder m102getComponents$lambda5(ComponentContainer componentContainer) {
Object obj = componentContainer.get(firebaseApp);
Intrinsics.checkNotNullExpressionValue(obj, "container[firebaseApp]");
return new SessionLifecycleServiceBinderImpl((FirebaseApp) obj);
}
@Override // com.google.firebase.components.ComponentRegistrar
public List<Component<? extends Object>> getComponents() {
Component.Builder name = Component.builder(FirebaseSessions.class).name(LIBRARY_NAME);
Qualified<FirebaseApp> qualified = firebaseApp;
Component.Builder add = name.add(Dependency.required(qualified));
Qualified<SessionsSettings> qualified2 = sessionsSettings;
Component.Builder add2 = add.add(Dependency.required(qualified2));
Qualified<CoroutineDispatcher> qualified3 = backgroundDispatcher;
final int i = 0;
Component build = add2.add(Dependency.required(qualified3)).factory(new ComponentFactory() { // from class: com.google.firebase.sessions.b
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseSessions m97getComponents$lambda0;
SessionGenerator m98getComponents$lambda1;
SessionFirelogPublisher m99getComponents$lambda2;
SessionsSettings m100getComponents$lambda3;
SessionDatastore m101getComponents$lambda4;
SessionLifecycleServiceBinder m102getComponents$lambda5;
switch (i) {
case 0:
m97getComponents$lambda0 = FirebaseSessionsRegistrar.m97getComponents$lambda0(componentContainer);
return m97getComponents$lambda0;
case 1:
m98getComponents$lambda1 = FirebaseSessionsRegistrar.m98getComponents$lambda1(componentContainer);
return m98getComponents$lambda1;
case 2:
m99getComponents$lambda2 = FirebaseSessionsRegistrar.m99getComponents$lambda2(componentContainer);
return m99getComponents$lambda2;
case 3:
m100getComponents$lambda3 = FirebaseSessionsRegistrar.m100getComponents$lambda3(componentContainer);
return m100getComponents$lambda3;
case 4:
m101getComponents$lambda4 = FirebaseSessionsRegistrar.m101getComponents$lambda4(componentContainer);
return m101getComponents$lambda4;
default:
m102getComponents$lambda5 = FirebaseSessionsRegistrar.m102getComponents$lambda5(componentContainer);
return m102getComponents$lambda5;
}
}
}).eagerInDefaultApp().build();
final int i4 = 1;
Component build2 = Component.builder(SessionGenerator.class).name("session-generator").factory(new ComponentFactory() { // from class: com.google.firebase.sessions.b
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseSessions m97getComponents$lambda0;
SessionGenerator m98getComponents$lambda1;
SessionFirelogPublisher m99getComponents$lambda2;
SessionsSettings m100getComponents$lambda3;
SessionDatastore m101getComponents$lambda4;
SessionLifecycleServiceBinder m102getComponents$lambda5;
switch (i4) {
case 0:
m97getComponents$lambda0 = FirebaseSessionsRegistrar.m97getComponents$lambda0(componentContainer);
return m97getComponents$lambda0;
case 1:
m98getComponents$lambda1 = FirebaseSessionsRegistrar.m98getComponents$lambda1(componentContainer);
return m98getComponents$lambda1;
case 2:
m99getComponents$lambda2 = FirebaseSessionsRegistrar.m99getComponents$lambda2(componentContainer);
return m99getComponents$lambda2;
case 3:
m100getComponents$lambda3 = FirebaseSessionsRegistrar.m100getComponents$lambda3(componentContainer);
return m100getComponents$lambda3;
case 4:
m101getComponents$lambda4 = FirebaseSessionsRegistrar.m101getComponents$lambda4(componentContainer);
return m101getComponents$lambda4;
default:
m102getComponents$lambda5 = FirebaseSessionsRegistrar.m102getComponents$lambda5(componentContainer);
return m102getComponents$lambda5;
}
}
}).build();
Component.Builder add3 = Component.builder(SessionFirelogPublisher.class).name("session-publisher").add(Dependency.required(qualified));
Qualified<FirebaseInstallationsApi> qualified4 = firebaseInstallationsApi;
final int i5 = 2;
Component build3 = add3.add(Dependency.required(qualified4)).add(Dependency.required(qualified2)).add(Dependency.requiredProvider(transportFactory)).add(Dependency.required(qualified3)).factory(new ComponentFactory() { // from class: com.google.firebase.sessions.b
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseSessions m97getComponents$lambda0;
SessionGenerator m98getComponents$lambda1;
SessionFirelogPublisher m99getComponents$lambda2;
SessionsSettings m100getComponents$lambda3;
SessionDatastore m101getComponents$lambda4;
SessionLifecycleServiceBinder m102getComponents$lambda5;
switch (i5) {
case 0:
m97getComponents$lambda0 = FirebaseSessionsRegistrar.m97getComponents$lambda0(componentContainer);
return m97getComponents$lambda0;
case 1:
m98getComponents$lambda1 = FirebaseSessionsRegistrar.m98getComponents$lambda1(componentContainer);
return m98getComponents$lambda1;
case 2:
m99getComponents$lambda2 = FirebaseSessionsRegistrar.m99getComponents$lambda2(componentContainer);
return m99getComponents$lambda2;
case 3:
m100getComponents$lambda3 = FirebaseSessionsRegistrar.m100getComponents$lambda3(componentContainer);
return m100getComponents$lambda3;
case 4:
m101getComponents$lambda4 = FirebaseSessionsRegistrar.m101getComponents$lambda4(componentContainer);
return m101getComponents$lambda4;
default:
m102getComponents$lambda5 = FirebaseSessionsRegistrar.m102getComponents$lambda5(componentContainer);
return m102getComponents$lambda5;
}
}
}).build();
final int i6 = 3;
Component build4 = Component.builder(SessionsSettings.class).name("sessions-settings").add(Dependency.required(qualified)).add(Dependency.required(blockingDispatcher)).add(Dependency.required(qualified3)).add(Dependency.required(qualified4)).factory(new ComponentFactory() { // from class: com.google.firebase.sessions.b
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseSessions m97getComponents$lambda0;
SessionGenerator m98getComponents$lambda1;
SessionFirelogPublisher m99getComponents$lambda2;
SessionsSettings m100getComponents$lambda3;
SessionDatastore m101getComponents$lambda4;
SessionLifecycleServiceBinder m102getComponents$lambda5;
switch (i6) {
case 0:
m97getComponents$lambda0 = FirebaseSessionsRegistrar.m97getComponents$lambda0(componentContainer);
return m97getComponents$lambda0;
case 1:
m98getComponents$lambda1 = FirebaseSessionsRegistrar.m98getComponents$lambda1(componentContainer);
return m98getComponents$lambda1;
case 2:
m99getComponents$lambda2 = FirebaseSessionsRegistrar.m99getComponents$lambda2(componentContainer);
return m99getComponents$lambda2;
case 3:
m100getComponents$lambda3 = FirebaseSessionsRegistrar.m100getComponents$lambda3(componentContainer);
return m100getComponents$lambda3;
case 4:
m101getComponents$lambda4 = FirebaseSessionsRegistrar.m101getComponents$lambda4(componentContainer);
return m101getComponents$lambda4;
default:
m102getComponents$lambda5 = FirebaseSessionsRegistrar.m102getComponents$lambda5(componentContainer);
return m102getComponents$lambda5;
}
}
}).build();
final int i7 = 4;
Component build5 = Component.builder(SessionDatastore.class).name("sessions-datastore").add(Dependency.required(qualified)).add(Dependency.required(qualified3)).factory(new ComponentFactory() { // from class: com.google.firebase.sessions.b
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseSessions m97getComponents$lambda0;
SessionGenerator m98getComponents$lambda1;
SessionFirelogPublisher m99getComponents$lambda2;
SessionsSettings m100getComponents$lambda3;
SessionDatastore m101getComponents$lambda4;
SessionLifecycleServiceBinder m102getComponents$lambda5;
switch (i7) {
case 0:
m97getComponents$lambda0 = FirebaseSessionsRegistrar.m97getComponents$lambda0(componentContainer);
return m97getComponents$lambda0;
case 1:
m98getComponents$lambda1 = FirebaseSessionsRegistrar.m98getComponents$lambda1(componentContainer);
return m98getComponents$lambda1;
case 2:
m99getComponents$lambda2 = FirebaseSessionsRegistrar.m99getComponents$lambda2(componentContainer);
return m99getComponents$lambda2;
case 3:
m100getComponents$lambda3 = FirebaseSessionsRegistrar.m100getComponents$lambda3(componentContainer);
return m100getComponents$lambda3;
case 4:
m101getComponents$lambda4 = FirebaseSessionsRegistrar.m101getComponents$lambda4(componentContainer);
return m101getComponents$lambda4;
default:
m102getComponents$lambda5 = FirebaseSessionsRegistrar.m102getComponents$lambda5(componentContainer);
return m102getComponents$lambda5;
}
}
}).build();
final int i8 = 5;
return CollectionsKt.listOf((Object[]) new Component[]{build, build2, build3, build4, build5, Component.builder(SessionLifecycleServiceBinder.class).name("sessions-service-binder").add(Dependency.required(qualified)).factory(new ComponentFactory() { // from class: com.google.firebase.sessions.b
@Override // com.google.firebase.components.ComponentFactory
public final Object create(ComponentContainer componentContainer) {
FirebaseSessions m97getComponents$lambda0;
SessionGenerator m98getComponents$lambda1;
SessionFirelogPublisher m99getComponents$lambda2;
SessionsSettings m100getComponents$lambda3;
SessionDatastore m101getComponents$lambda4;
SessionLifecycleServiceBinder m102getComponents$lambda5;
switch (i8) {
case 0:
m97getComponents$lambda0 = FirebaseSessionsRegistrar.m97getComponents$lambda0(componentContainer);
return m97getComponents$lambda0;
case 1:
m98getComponents$lambda1 = FirebaseSessionsRegistrar.m98getComponents$lambda1(componentContainer);
return m98getComponents$lambda1;
case 2:
m99getComponents$lambda2 = FirebaseSessionsRegistrar.m99getComponents$lambda2(componentContainer);
return m99getComponents$lambda2;
case 3:
m100getComponents$lambda3 = FirebaseSessionsRegistrar.m100getComponents$lambda3(componentContainer);
return m100getComponents$lambda3;
case 4:
m101getComponents$lambda4 = FirebaseSessionsRegistrar.m101getComponents$lambda4(componentContainer);
return m101getComponents$lambda4;
default:
m102getComponents$lambda5 = FirebaseSessionsRegistrar.m102getComponents$lambda5(componentContainer);
return m102getComponents$lambda5;
}
}
}).build(), LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME)});
}
}

View File

@@ -0,0 +1,24 @@
package com.google.firebase.sessions;
import com.google.firebase.encoders.json.NumberedEnum;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\b\b\u0080\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u00012\u00020\u0002B\u000f\b\u0002\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005R\u0014\u0010\u0003\u001a\u00020\u0004X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007j\u0002\b\bj\u0002\b\tj\u0002\b\nj\u0002\b\u000b¨\u0006\f"}, d2 = {"Lcom/google/firebase/sessions/LogEnvironment;", "", "Lcom/google/firebase/encoders/json/NumberedEnum;", "number", "", "(Ljava/lang/String;II)V", "getNumber", "()I", "LOG_ENVIRONMENT_UNKNOWN", "LOG_ENVIRONMENT_AUTOPUSH", "LOG_ENVIRONMENT_STAGING", "LOG_ENVIRONMENT_PROD", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public enum LogEnvironment implements NumberedEnum {
LOG_ENVIRONMENT_UNKNOWN(0),
LOG_ENVIRONMENT_AUTOPUSH(1),
LOG_ENVIRONMENT_STAGING(2),
LOG_ENVIRONMENT_PROD(3);
private final int number;
LogEnvironment(int i) {
this.number = i;
}
@Override // com.google.firebase.encoders.json.NumberedEnum
public int getNumber() {
return this.number;
}
}

View File

@@ -0,0 +1,105 @@
package com.google.firebase.sessions;
import C.w;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0011\b\u0080\b\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b¢\u0006\u0002\u0010\tJ\t\u0010\u0010\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0011\u001a\u00020\u0005HÆ\u0003J\t\u0010\u0012\u001a\u00020\u0005HÆ\u0003J\t\u0010\u0013\u001a\u00020\bHÆ\u0003J1\u0010\u0014\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00052\b\b\u0002\u0010\u0007\u001a\u00020\bHÆ\u0001J\u0013\u0010\u0015\u001a\u00020\b2\b\u0010\u0016\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0017\u001a\u00020\u0005HÖ\u0001J\t\u0010\u0018\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u0006\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\fR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000bR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000f¨\u0006\u0019"}, d2 = {"Lcom/google/firebase/sessions/ProcessDetails;", "", "processName", "", "pid", "", "importance", "isDefaultProcess", "", "(Ljava/lang/String;IIZ)V", "getImportance", "()I", "()Z", "getPid", "getProcessName", "()Ljava/lang/String;", "component1", "component2", "component3", "component4", "copy", "equals", "other", "hashCode", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class ProcessDetails {
private final int importance;
private final boolean isDefaultProcess;
private final int pid;
private final String processName;
public ProcessDetails(String processName, int i, int i4, boolean z3) {
Intrinsics.checkNotNullParameter(processName, "processName");
this.processName = processName;
this.pid = i;
this.importance = i4;
this.isDefaultProcess = z3;
}
public static /* synthetic */ ProcessDetails copy$default(ProcessDetails processDetails, String str, int i, int i4, boolean z3, int i5, Object obj) {
if ((i5 & 1) != 0) {
str = processDetails.processName;
}
if ((i5 & 2) != 0) {
i = processDetails.pid;
}
if ((i5 & 4) != 0) {
i4 = processDetails.importance;
}
if ((i5 & 8) != 0) {
z3 = processDetails.isDefaultProcess;
}
return processDetails.copy(str, i, i4, z3);
}
/* renamed from: component1, reason: from getter */
public final String getProcessName() {
return this.processName;
}
/* renamed from: component2, reason: from getter */
public final int getPid() {
return this.pid;
}
/* renamed from: component3, reason: from getter */
public final int getImportance() {
return this.importance;
}
/* renamed from: component4, reason: from getter */
public final boolean getIsDefaultProcess() {
return this.isDefaultProcess;
}
public final ProcessDetails copy(String processName, int pid, int importance, boolean isDefaultProcess) {
Intrinsics.checkNotNullParameter(processName, "processName");
return new ProcessDetails(processName, pid, importance, isDefaultProcess);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof ProcessDetails)) {
return false;
}
ProcessDetails processDetails = (ProcessDetails) other;
return Intrinsics.areEqual(this.processName, processDetails.processName) && this.pid == processDetails.pid && this.importance == processDetails.importance && this.isDefaultProcess == processDetails.isDefaultProcess;
}
public final int getImportance() {
return this.importance;
}
public final int getPid() {
return this.pid;
}
public final String getProcessName() {
return this.processName;
}
/* JADX WARN: Multi-variable type inference failed */
public int hashCode() {
int x3 = w.x(this.importance, w.x(this.pid, this.processName.hashCode() * 31, 31), 31);
boolean z3 = this.isDefaultProcess;
int i = z3;
if (z3 != 0) {
i = 1;
}
return x3 + i;
}
public final boolean isDefaultProcess() {
return this.isDefaultProcess;
}
public String toString() {
return "ProcessDetails(processName=" + this.processName + ", pid=" + this.pid + ", importance=" + this.importance + ", isDefaultProcess=" + this.isDefaultProcess + ')';
}
}

View File

@@ -0,0 +1,105 @@
package com.google.firebase.sessions;
import android.app.ActivityManager;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.os.Process;
import com.google.android.gms.common.util.ProcessUtils;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010 \n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J.\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\b2\b\b\u0002\u0010\n\u001a\u00020\u000bH\u0002J\u0014\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u00040\r2\u0006\u0010\u000e\u001a\u00020\u000fJ\u000e\u0010\u0010\u001a\u00020\u00042\u0006\u0010\u000e\u001a\u00020\u000fJ\r\u0010\u0011\u001a\u00020\u0006H\u0000¢\u0006\u0002\b\u0012¨\u0006\u0013"}, d2 = {"Lcom/google/firebase/sessions/ProcessDetailsProvider;", "", "()V", "buildProcessDetails", "Lcom/google/firebase/sessions/ProcessDetails;", "processName", "", "pid", "", "importance", "isDefaultProcess", "", "getAppProcessDetails", "", "context", "Landroid/content/Context;", "getCurrentProcessDetails", "getProcessName", "getProcessName$com_google_firebase_firebase_sessions", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class ProcessDetailsProvider {
public static final ProcessDetailsProvider INSTANCE = new ProcessDetailsProvider();
private ProcessDetailsProvider() {
}
private final ProcessDetails buildProcessDetails(String processName, int pid, int importance, boolean isDefaultProcess) {
return new ProcessDetails(processName, pid, importance, isDefaultProcess);
}
public static /* synthetic */ ProcessDetails buildProcessDetails$default(ProcessDetailsProvider processDetailsProvider, String str, int i, int i4, boolean z3, int i5, Object obj) {
if ((i5 & 2) != 0) {
i = 0;
}
if ((i5 & 4) != 0) {
i4 = 0;
}
if ((i5 & 8) != 0) {
z3 = false;
}
return processDetailsProvider.buildProcessDetails(str, i, i4, z3);
}
public final List<ProcessDetails> getAppProcessDetails(Context context) {
int collectionSizeOrDefault;
Intrinsics.checkNotNullParameter(context, "context");
int i = context.getApplicationInfo().uid;
String str = context.getApplicationInfo().processName;
Object systemService = context.getSystemService("activity");
ActivityManager activityManager = systemService instanceof ActivityManager ? (ActivityManager) systemService : null;
List<ActivityManager.RunningAppProcessInfo> runningAppProcesses = activityManager != null ? activityManager.getRunningAppProcesses() : null;
if (runningAppProcesses == null) {
runningAppProcesses = CollectionsKt.emptyList();
}
List filterNotNull = CollectionsKt.filterNotNull(runningAppProcesses);
ArrayList arrayList = new ArrayList();
for (Object obj : filterNotNull) {
if (((ActivityManager.RunningAppProcessInfo) obj).uid == i) {
arrayList.add(obj);
}
}
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList, 10);
ArrayList arrayList2 = new ArrayList(collectionSizeOrDefault);
Iterator it = arrayList.iterator();
while (it.hasNext()) {
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = (ActivityManager.RunningAppProcessInfo) it.next();
String str2 = runningAppProcessInfo.processName;
Intrinsics.checkNotNullExpressionValue(str2, "runningAppProcessInfo.processName");
arrayList2.add(new ProcessDetails(str2, runningAppProcessInfo.pid, runningAppProcessInfo.importance, Intrinsics.areEqual(runningAppProcessInfo.processName, str)));
}
return arrayList2;
}
public final ProcessDetails getCurrentProcessDetails(Context context) {
Object obj;
Intrinsics.checkNotNullParameter(context, "context");
int myPid = Process.myPid();
Iterator<T> it = getAppProcessDetails(context).iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
}
obj = it.next();
if (((ProcessDetails) obj).getPid() == myPid) {
break;
}
}
ProcessDetails processDetails = (ProcessDetails) obj;
return processDetails == null ? buildProcessDetails$default(this, getProcessName$com_google_firebase_firebase_sessions(), myPid, 0, false, 12, null) : processDetails;
}
public final String getProcessName$com_google_firebase_firebase_sessions() {
String myProcessName;
if (Build.VERSION.SDK_INT >= 33) {
myProcessName = Process.myProcessName();
Intrinsics.checkNotNullExpressionValue(myProcessName, "myProcessName()");
return myProcessName;
}
String processName = Application.getProcessName();
if (processName != null) {
return processName;
}
String myProcessName2 = ProcessUtils.getMyProcessName();
return myProcessName2 != null ? myProcessName2 : "";
}
}

View File

@@ -0,0 +1,290 @@
package com.google.firebase.sessions;
/* loaded from: classes3.dex */
public final class R {
/* loaded from: classes3.dex */
public static final class attr {
public static final int alpha = 0x7f030031;
public static final int coordinatorLayoutStyle = 0x7f03016c;
public static final int font = 0x7f03022d;
public static final int fontProviderAuthority = 0x7f03022f;
public static final int fontProviderCerts = 0x7f030230;
public static final int fontProviderFetchStrategy = 0x7f030231;
public static final int fontProviderFetchTimeout = 0x7f030232;
public static final int fontProviderPackage = 0x7f030233;
public static final int fontProviderQuery = 0x7f030234;
public static final int fontStyle = 0x7f030236;
public static final int fontVariationSettings = 0x7f030237;
public static final int fontWeight = 0x7f030238;
public static final int keylines = 0x7f0302b5;
public static final int layout_anchor = 0x7f0302c6;
public static final int layout_anchorGravity = 0x7f0302c7;
public static final int layout_behavior = 0x7f0302c9;
public static final int layout_dodgeInsetEdges = 0x7f0302fa;
public static final int layout_insetEdge = 0x7f030305;
public static final int layout_keyline = 0x7f030306;
public static final int statusBarBackground = 0x7f030488;
public static final int ttcIndex = 0x7f030559;
private attr() {
}
}
/* loaded from: classes3.dex */
public static final class color {
public static final int notification_action_color_filter = 0x7f050315;
public static final int notification_icon_bg_color = 0x7f050316;
public static final int ripple_material_light = 0x7f050322;
public static final int secondary_text_default_material_light = 0x7f050324;
private color() {
}
}
/* loaded from: classes3.dex */
public static final class dimen {
public static final int compat_button_inset_horizontal_material = 0x7f06006d;
public static final int compat_button_inset_vertical_material = 0x7f06006e;
public static final int compat_button_padding_horizontal_material = 0x7f06006f;
public static final int compat_button_padding_vertical_material = 0x7f060070;
public static final int compat_control_corner_material = 0x7f060071;
public static final int compat_notification_large_icon_max_height = 0x7f060072;
public static final int compat_notification_large_icon_max_width = 0x7f060073;
public static final int notification_action_icon_size = 0x7f060385;
public static final int notification_action_text_size = 0x7f060386;
public static final int notification_big_circle_margin = 0x7f060387;
public static final int notification_content_margin_start = 0x7f060388;
public static final int notification_large_icon_height = 0x7f06038d;
public static final int notification_large_icon_width = 0x7f06038e;
public static final int notification_main_column_padding_top = 0x7f06038f;
public static final int notification_media_narrow_margin = 0x7f060391;
public static final int notification_right_icon_size = 0x7f060393;
public static final int notification_right_side_padding_top = 0x7f060394;
public static final int notification_small_icon_background_padding = 0x7f060395;
public static final int notification_small_icon_size_as_large = 0x7f060396;
public static final int notification_subtext_size = 0x7f060397;
public static final int notification_top_pad = 0x7f06039b;
public static final int notification_top_pad_large_text = 0x7f06039c;
private dimen() {
}
}
/* loaded from: classes3.dex */
public static final class drawable {
public static final int notification_action_background = 0x7f070181;
public static final int notification_bg = 0x7f070182;
public static final int notification_bg_low = 0x7f070183;
public static final int notification_bg_low_normal = 0x7f070184;
public static final int notification_bg_low_pressed = 0x7f070185;
public static final int notification_bg_normal = 0x7f070186;
public static final int notification_bg_normal_pressed = 0x7f070187;
public static final int notification_icon_background = 0x7f070188;
public static final int notification_template_icon_bg = 0x7f07018a;
public static final int notification_template_icon_low_bg = 0x7f07018b;
public static final int notification_tile_bg = 0x7f07018c;
public static final int notify_panel_notification_icon_bg = 0x7f07018d;
private drawable() {
}
}
/* loaded from: classes3.dex */
public static final class id {
public static final int accessibility_action_clickable_span = 0x7f090013;
public static final int accessibility_custom_action_0 = 0x7f090014;
public static final int accessibility_custom_action_1 = 0x7f090015;
public static final int accessibility_custom_action_10 = 0x7f090016;
public static final int accessibility_custom_action_11 = 0x7f090017;
public static final int accessibility_custom_action_12 = 0x7f090018;
public static final int accessibility_custom_action_13 = 0x7f090019;
public static final int accessibility_custom_action_14 = 0x7f09001a;
public static final int accessibility_custom_action_15 = 0x7f09001b;
public static final int accessibility_custom_action_16 = 0x7f09001c;
public static final int accessibility_custom_action_17 = 0x7f09001d;
public static final int accessibility_custom_action_18 = 0x7f09001e;
public static final int accessibility_custom_action_19 = 0x7f09001f;
public static final int accessibility_custom_action_2 = 0x7f090020;
public static final int accessibility_custom_action_20 = 0x7f090021;
public static final int accessibility_custom_action_21 = 0x7f090022;
public static final int accessibility_custom_action_22 = 0x7f090023;
public static final int accessibility_custom_action_23 = 0x7f090024;
public static final int accessibility_custom_action_24 = 0x7f090025;
public static final int accessibility_custom_action_25 = 0x7f090026;
public static final int accessibility_custom_action_26 = 0x7f090027;
public static final int accessibility_custom_action_27 = 0x7f090028;
public static final int accessibility_custom_action_28 = 0x7f090029;
public static final int accessibility_custom_action_29 = 0x7f09002a;
public static final int accessibility_custom_action_3 = 0x7f09002b;
public static final int accessibility_custom_action_30 = 0x7f09002c;
public static final int accessibility_custom_action_31 = 0x7f09002d;
public static final int accessibility_custom_action_4 = 0x7f09002e;
public static final int accessibility_custom_action_5 = 0x7f09002f;
public static final int accessibility_custom_action_6 = 0x7f090030;
public static final int accessibility_custom_action_7 = 0x7f090031;
public static final int accessibility_custom_action_8 = 0x7f090032;
public static final int accessibility_custom_action_9 = 0x7f090033;
public static final int action_container = 0x7f090045;
public static final int action_divider = 0x7f090048;
public static final int action_image = 0x7f09004a;
public static final int action_text = 0x7f090051;
public static final int actions = 0x7f090052;
public static final int async = 0x7f090071;
public static final int blocking = 0x7f090082;
public static final int bottom = 0x7f090083;
public static final int chronometer = 0x7f0900a9;
public static final int dialog_button = 0x7f09010b;
public static final int end = 0x7f090133;
public static final int forever = 0x7f090152;
public static final int icon = 0x7f090195;
public static final int icon_group = 0x7f090196;
public static final int info = 0x7f0901a9;
public static final int italic = 0x7f0901be;
public static final int left = 0x7f0901e2;
public static final int line1 = 0x7f0901e9;
public static final int line3 = 0x7f0901ea;
public static final int none = 0x7f090264;
public static final int normal = 0x7f090265;
public static final int notification_background = 0x7f090269;
public static final int notification_main_column = 0x7f09026a;
public static final int notification_main_column_container = 0x7f09026b;
public static final int right = 0x7f0902cd;
public static final int right_icon = 0x7f0902cf;
public static final int right_side = 0x7f0902d0;
public static final int start = 0x7f090322;
public static final int tag_accessibility_actions = 0x7f09035c;
public static final int tag_accessibility_clickable_spans = 0x7f09035d;
public static final int tag_accessibility_heading = 0x7f09035e;
public static final int tag_accessibility_pane_title = 0x7f09035f;
public static final int tag_screen_reader_focusable = 0x7f090363;
public static final int tag_transition_group = 0x7f090365;
public static final int tag_unhandled_key_event_manager = 0x7f090366;
public static final int tag_unhandled_key_listeners = 0x7f090367;
public static final int text = 0x7f09036d;
public static final int text2 = 0x7f09036e;
public static final int time = 0x7f09038e;
public static final int title = 0x7f090393;
public static final int top = 0x7f0903ac;
private id() {
}
}
/* loaded from: classes3.dex */
public static final class integer {
public static final int google_play_services_version = 0x7f0a0009;
public static final int status_bar_notification_info_maxnum = 0x7f0a0045;
private integer() {
}
}
/* loaded from: classes3.dex */
public static final class layout {
public static final int custom_dialog = 0x7f0c0026;
public static final int notification_action = 0x7f0c00a8;
public static final int notification_action_tombstone = 0x7f0c00a9;
public static final int notification_template_custom_big = 0x7f0c00aa;
public static final int notification_template_icon_group = 0x7f0c00ab;
public static final int notification_template_part_chronometer = 0x7f0c00ac;
public static final int notification_template_part_time = 0x7f0c00ad;
private layout() {
}
}
/* loaded from: classes3.dex */
public static final class raw {
public static final int firebase_common_keep = 0x7f120000;
private raw() {
}
}
/* loaded from: classes3.dex */
public static final class string {
public static final int common_google_play_services_unknown_issue = 0x7f1300bc;
public static final int status_bar_notification_info_overflow = 0x7f13023b;
private string() {
}
}
/* loaded from: classes3.dex */
public static final class style {
public static final int TextAppearance_Compat_Notification = 0x7f1401fb;
public static final int TextAppearance_Compat_Notification_Info = 0x7f1401fc;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f1401fd;
public static final int TextAppearance_Compat_Notification_Time = 0x7f1401fe;
public static final int TextAppearance_Compat_Notification_Title = 0x7f1401ff;
public static final int Widget_Compat_NotificationActionContainer = 0x7f1403a1;
public static final int Widget_Compat_NotificationActionText = 0x7f1403a2;
public static final int Widget_Support_CoordinatorLayout = 0x7f1404d7;
private style() {
}
}
/* loaded from: classes3.dex */
public static final class styleable {
public static final int ColorStateListItem_alpha = 0x00000003;
public static final int ColorStateListItem_android_alpha = 0x00000001;
public static final int ColorStateListItem_android_color = 0x00000000;
public static final int ColorStateListItem_android_lStar = 0x00000002;
public static final int ColorStateListItem_lStar = 0x00000004;
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0x00000000;
public static final int CoordinatorLayout_Layout_layout_anchor = 0x00000001;
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 0x00000002;
public static final int CoordinatorLayout_Layout_layout_behavior = 0x00000003;
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 0x00000004;
public static final int CoordinatorLayout_Layout_layout_insetEdge = 0x00000005;
public static final int CoordinatorLayout_Layout_layout_keyline = 0x00000006;
public static final int CoordinatorLayout_keylines = 0x00000000;
public static final int CoordinatorLayout_statusBarBackground = 0x00000001;
public static final int FontFamilyFont_android_font = 0x00000000;
public static final int FontFamilyFont_android_fontStyle = 0x00000002;
public static final int FontFamilyFont_android_fontVariationSettings = 0x00000004;
public static final int FontFamilyFont_android_fontWeight = 0x00000001;
public static final int FontFamilyFont_android_ttcIndex = 0x00000003;
public static final int FontFamilyFont_font = 0x00000005;
public static final int FontFamilyFont_fontStyle = 0x00000006;
public static final int FontFamilyFont_fontVariationSettings = 0x00000007;
public static final int FontFamilyFont_fontWeight = 0x00000008;
public static final int FontFamilyFont_ttcIndex = 0x00000009;
public static final int FontFamily_fontProviderAuthority = 0x00000000;
public static final int FontFamily_fontProviderCerts = 0x00000001;
public static final int FontFamily_fontProviderFetchStrategy = 0x00000002;
public static final int FontFamily_fontProviderFetchTimeout = 0x00000003;
public static final int FontFamily_fontProviderPackage = 0x00000004;
public static final int FontFamily_fontProviderQuery = 0x00000005;
public static final int FontFamily_fontProviderSystemFontFamily = 0x00000006;
public static final int GradientColorItem_android_color = 0x00000000;
public static final int GradientColorItem_android_offset = 0x00000001;
public static final int GradientColor_android_centerColor = 0x00000007;
public static final int GradientColor_android_centerX = 0x00000003;
public static final int GradientColor_android_centerY = 0x00000004;
public static final int GradientColor_android_endColor = 0x00000001;
public static final int GradientColor_android_endX = 0x0000000a;
public static final int GradientColor_android_endY = 0x0000000b;
public static final int GradientColor_android_gradientRadius = 0x00000005;
public static final int GradientColor_android_startColor = 0x00000000;
public static final int GradientColor_android_startX = 0x00000008;
public static final int GradientColor_android_startY = 0x00000009;
public static final int GradientColor_android_tileMode = 0x00000006;
public static final int GradientColor_android_type = 0x00000002;
public static final int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, 16844359, com.adif.elcanomovil.R.attr.alpha, com.adif.elcanomovil.R.attr.lStar};
public static final int[] CoordinatorLayout = {com.adif.elcanomovil.R.attr.keylines, com.adif.elcanomovil.R.attr.statusBarBackground};
public static final int[] CoordinatorLayout_Layout = {android.R.attr.layout_gravity, com.adif.elcanomovil.R.attr.layout_anchor, com.adif.elcanomovil.R.attr.layout_anchorGravity, com.adif.elcanomovil.R.attr.layout_behavior, com.adif.elcanomovil.R.attr.layout_dodgeInsetEdges, com.adif.elcanomovil.R.attr.layout_insetEdge, com.adif.elcanomovil.R.attr.layout_keyline};
public static final int[] FontFamily = {com.adif.elcanomovil.R.attr.fontProviderAuthority, com.adif.elcanomovil.R.attr.fontProviderCerts, com.adif.elcanomovil.R.attr.fontProviderFetchStrategy, com.adif.elcanomovil.R.attr.fontProviderFetchTimeout, com.adif.elcanomovil.R.attr.fontProviderPackage, com.adif.elcanomovil.R.attr.fontProviderQuery, com.adif.elcanomovil.R.attr.fontProviderSystemFontFamily};
public static final int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, com.adif.elcanomovil.R.attr.font, com.adif.elcanomovil.R.attr.fontStyle, com.adif.elcanomovil.R.attr.fontVariationSettings, com.adif.elcanomovil.R.attr.fontWeight, com.adif.elcanomovil.R.attr.ttcIndex};
public static final int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static final int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
private styleable() {
}
}
private R() {
}
}

View File

@@ -0,0 +1,33 @@
package com.google.firebase.sessions;
import C.w;
import android.util.Base64;
import kotlin.Metadata;
import kotlin.text.StringsKt;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0007\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0016\u0010\u0003\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0006\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0011\u0010\t\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\b¨\u0006\u000b"}, d2 = {"Lcom/google/firebase/sessions/SessionDataStoreConfigs;", "", "()V", "PROCESS_NAME", "", "kotlin.jvm.PlatformType", "SESSIONS_CONFIG_NAME", "getSESSIONS_CONFIG_NAME", "()Ljava/lang/String;", "SETTINGS_CONFIG_NAME", "getSETTINGS_CONFIG_NAME", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionDataStoreConfigs {
public static final SessionDataStoreConfigs INSTANCE = new SessionDataStoreConfigs();
private static final String PROCESS_NAME;
private static final String SESSIONS_CONFIG_NAME;
private static final String SETTINGS_CONFIG_NAME;
static {
String encodeToString = Base64.encodeToString(StringsKt.encodeToByteArray(ProcessDetailsProvider.INSTANCE.getProcessName$com_google_firebase_firebase_sessions()), 10);
PROCESS_NAME = encodeToString;
SESSIONS_CONFIG_NAME = w.o("firebase_session_", encodeToString, "_data");
SETTINGS_CONFIG_NAME = w.o("firebase_session_", encodeToString, "_settings");
}
private SessionDataStoreConfigs() {
}
public final String getSESSIONS_CONFIG_NAME() {
return SESSIONS_CONFIG_NAME;
}
public final String getSETTINGS_CONFIG_NAME() {
return SETTINGS_CONFIG_NAME;
}
}

View File

@@ -0,0 +1,33 @@
package com.google.firebase.sessions;
import com.google.firebase.Firebase;
import com.google.firebase.FirebaseKt;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\b`\u0018\u0000 \u00072\u00020\u0001:\u0001\u0007J\n\u0010\u0002\u001a\u0004\u0018\u00010\u0003H&J\u0010\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0003H&¨\u0006\b"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastore;", "", "getCurrentSessionId", "", "updateSessionId", "", "sessionId", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface SessionDatastore {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = Companion.$$INSTANCE;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u00048F¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastore$Companion;", "", "()V", "instance", "Lcom/google/firebase/sessions/SessionDatastore;", "getInstance", "()Lcom/google/firebase/sessions/SessionDatastore;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private Companion() {
}
public final SessionDatastore getInstance() {
Object obj = FirebaseKt.getApp(Firebase.INSTANCE).get(SessionDatastore.class);
Intrinsics.checkNotNullExpressionValue(obj, "Firebase.app[SessionDatastore::class.java]");
return (SessionDatastore) obj;
}
}
String getCurrentSessionId();
void updateSessionId(String sessionId);
}

View File

@@ -0,0 +1,58 @@
package com.google.firebase.sessions;
import android.util.Log;
import b0.AbstractC0262g;
import b0.C0257b;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
import kotlinx.coroutines.flow.FlowCollector;
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u0004*\b\u0012\u0004\u0012\u00020\u00010\u00002\u0006\u0010\u0003\u001a\u00020\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lkotlinx/coroutines/flow/FlowCollector;", "Lb0/g;", "", "exception", "", "<anonymous>", "(Lkotlinx/coroutines/flow/FlowCollector;Ljava/lang/Throwable;)V"}, k = 3, mv = {1, 7, 1})
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$firebaseSessionDataFlow$1", f = "SessionDatastore.kt", i = {}, l = {73}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SessionDatastoreImpl$firebaseSessionDataFlow$1 extends SuspendLambda implements Function3<FlowCollector<? super AbstractC0262g>, Throwable, Continuation<? super Unit>, Object> {
private /* synthetic */ Object L$0;
/* synthetic */ Object L$1;
int label;
public SessionDatastoreImpl$firebaseSessionDataFlow$1(Continuation<? super SessionDatastoreImpl$firebaseSessionDataFlow$1> continuation) {
super(3, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.L$0;
Log.e("FirebaseSessionsRepo", "Error reading stored session data.", (Throwable) this.L$1);
C0257b c0257b = new C0257b(true);
this.L$0 = null;
this.label = 1;
if (flowCollector.emit(c0257b, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function3
public final Object invoke(FlowCollector<? super AbstractC0262g> flowCollector, Throwable th, Continuation<? super Unit> continuation) {
SessionDatastoreImpl$firebaseSessionDataFlow$1 sessionDatastoreImpl$firebaseSessionDataFlow$1 = new SessionDatastoreImpl$firebaseSessionDataFlow$1(continuation);
sessionDatastoreImpl$firebaseSessionDataFlow$1.L$0 = flowCollector;
sessionDatastoreImpl$firebaseSessionDataFlow$1.L$1 = th;
return sessionDatastoreImpl$firebaseSessionDataFlow$1.invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,113 @@
package com.google.firebase.sessions;
import Y.InterfaceC0091g;
import android.content.Context;
import b0.C0257b;
import b0.C0260e;
import b0.C0263h;
import com.google.firebase.sessions.SessionDatastoreImpl;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$updateSessionId$1", f = "SessionDatastore.kt", i = {}, l = {85}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SessionDatastoreImpl$updateSessionId$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ String $sessionId;
int label;
final /* synthetic */ SessionDatastoreImpl this$0;
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\u008a@¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lb0/b;", "preferences", "", "<anonymous>", "(Lb0/b;)V"}, k = 3, mv = {1, 7, 1})
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$updateSessionId$1$1", f = "SessionDatastore.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$updateSessionId$1$1, reason: invalid class name */
/* loaded from: classes3.dex */
public static final class AnonymousClass1 extends SuspendLambda implements Function2<C0257b, Continuation<? super Unit>, Object> {
final /* synthetic */ String $sessionId;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnonymousClass1(String str, Continuation<? super AnonymousClass1> continuation) {
super(2, continuation);
this.$sessionId = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
AnonymousClass1 anonymousClass1 = new AnonymousClass1(this.$sessionId, continuation);
anonymousClass1.L$0 = obj;
return anonymousClass1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(C0257b c0257b, Continuation<? super Unit> continuation) {
return ((AnonymousClass1) create(c0257b, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
C0257b c0257b = (C0257b) this.L$0;
C0260e key = SessionDatastoreImpl.FirebaseSessionDataKeys.INSTANCE.getSESSION_ID();
String str = this.$sessionId;
c0257b.getClass();
Intrinsics.checkNotNullParameter(key, "key");
c0257b.c(key, str);
return Unit.INSTANCE;
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionDatastoreImpl$updateSessionId$1(SessionDatastoreImpl sessionDatastoreImpl, String str, Continuation<? super SessionDatastoreImpl$updateSessionId$1> continuation) {
super(2, continuation);
this.this$0 = sessionDatastoreImpl;
this.$sessionId = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new SessionDatastoreImpl$updateSessionId$1(this.this$0, this.$sessionId, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
SessionDatastoreImpl.Companion companion;
Context context;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
companion = SessionDatastoreImpl.Companion;
context = this.this$0.context;
InterfaceC0091g dataStore = companion.getDataStore(context);
AnonymousClass1 anonymousClass1 = new AnonymousClass1(this.$sessionId, null);
this.label = 1;
if (dataStore.a(new C0263h(anonymousClass1, null), this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((SessionDatastoreImpl$updateSessionId$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,266 @@
package com.google.firebase.sessions;
import Y.InterfaceC0091g;
import android.content.Context;
import b0.AbstractC0262g;
import b0.C0260e;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.util.concurrent.atomic.AtomicReference;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.IntCompanionObject;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.PropertyReference2Impl;
import kotlin.jvm.internal.Reflection;
import kotlin.properties.ReadOnlyProperty;
import kotlin.reflect.KProperty;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowCollector;
import kotlinx.coroutines.flow.FlowKt;
import m3.l;
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0000\u0018\u0000 \u001c2\u00020\u0001:\u0002\u001c\u001dB\u0017\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0004¢\u0006\u0004\b\u0006\u0010\u0007J\u0017\u0010\u000b\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\bH\u0002¢\u0006\u0004\b\u000b\u0010\fJ\u0017\u0010\u0010\u001a\u00020\u000f2\u0006\u0010\u000e\u001a\u00020\rH\u0016¢\u0006\u0004\b\u0010\u0010\u0011J\u0011\u0010\u0012\u001a\u0004\u0018\u00010\rH\u0016¢\u0006\u0004\b\u0012\u0010\u0013R\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010\u0014R\u0014\u0010\u0005\u001a\u00020\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010\u0015R\u001a\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\n0\u00168\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0017\u0010\u0018R\u001a\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\n0\u00198\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u001a\u0010\u001b¨\u0006\u001e"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastoreImpl;", "Lcom/google/firebase/sessions/SessionDatastore;", "Landroid/content/Context;", "context", "Lkotlin/coroutines/CoroutineContext;", "backgroundDispatcher", "<init>", "(Landroid/content/Context;Lkotlin/coroutines/CoroutineContext;)V", "Lb0/g;", "preferences", "Lcom/google/firebase/sessions/FirebaseSessionsData;", "mapSessionsData", "(Lb0/g;)Lcom/google/firebase/sessions/FirebaseSessionsData;", "", "sessionId", "", "updateSessionId", "(Ljava/lang/String;)V", "getCurrentSessionId", "()Ljava/lang/String;", "Landroid/content/Context;", "Lkotlin/coroutines/CoroutineContext;", "Ljava/util/concurrent/atomic/AtomicReference;", "currentSessionFromDatastore", "Ljava/util/concurrent/atomic/AtomicReference;", "Lkotlinx/coroutines/flow/Flow;", "firebaseSessionDataFlow", "Lkotlinx/coroutines/flow/Flow;", "Companion", "FirebaseSessionDataKeys", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionDatastoreImpl implements SessionDatastore {
@Deprecated
private static final String TAG = "FirebaseSessionsRepo";
private final CoroutineContext backgroundDispatcher;
private final Context context;
private final AtomicReference<FirebaseSessionsData> currentSessionFromDatastore;
private final Flow<FirebaseSessionsData> firebaseSessionDataFlow;
private static final Companion Companion = new Companion(null);
@Deprecated
private static final ReadOnlyProperty<Context, InterfaceC0091g> dataStore$delegate = l.S(SessionDataStoreConfigs.INSTANCE.getSESSIONS_CONFIG_NAME());
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$1", f = "SessionDatastore.kt", i = {}, l = {79}, m = "invokeSuspend", n = {}, s = {})
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$1, reason: invalid class name */
/* loaded from: classes3.dex */
public static final class AnonymousClass1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
int label;
public AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
super(2, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new AnonymousClass1(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
Flow flow = SessionDatastoreImpl.this.firebaseSessionDataFlow;
final SessionDatastoreImpl sessionDatastoreImpl = SessionDatastoreImpl.this;
FlowCollector flowCollector = new FlowCollector() { // from class: com.google.firebase.sessions.SessionDatastoreImpl.1.1
public final Object emit(FirebaseSessionsData firebaseSessionsData, Continuation<? super Unit> continuation) {
SessionDatastoreImpl.this.currentSessionFromDatastore.set(firebaseSessionsData);
return Unit.INSTANCE;
}
@Override // kotlinx.coroutines.flow.FlowCollector
public /* bridge */ /* synthetic */ Object emit(Object obj2, Continuation continuation) {
return emit((FirebaseSessionsData) obj2, (Continuation<? super Unit>) continuation);
}
};
this.label = 1;
if (flow.collect(flowCollector, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0082\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R%\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005*\u00020\u00048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\t\u0010\nR\u0014\u0010\r\u001a\u00020\f8\u0002X\u0082T¢\u0006\u0006\n\u0004\b\r\u0010\u000e¨\u0006\u000f"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastoreImpl$Companion;", "", "<init>", "()V", "Landroid/content/Context;", "LY/g;", "Lb0/g;", "dataStore$delegate", "Lkotlin/properties/ReadOnlyProperty;", "getDataStore", "(Landroid/content/Context;)LY/g;", "dataStore", "", "TAG", "Ljava/lang/String;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property2(new PropertyReference2Impl(Companion.class, "dataStore", "getDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;", 0))};
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
/* JADX INFO: Access modifiers changed from: private */
public final InterfaceC0091g getDataStore(Context context) {
return (InterfaceC0091g) SessionDatastoreImpl.dataStore$delegate.getValue(context, $$delegatedProperties[0]);
}
private Companion() {
}
}
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\bÂ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u001d\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00048\u0006¢\u0006\f\n\u0004\b\u0006\u0010\u0007\u001a\u0004\b\b\u0010\t¨\u0006\n"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastoreImpl$FirebaseSessionDataKeys;", "", "<init>", "()V", "Lb0/e;", "", "SESSION_ID", "Lb0/e;", "getSESSION_ID", "()Lb0/e;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class FirebaseSessionDataKeys {
public static final FirebaseSessionDataKeys INSTANCE = new FirebaseSessionDataKeys();
private static final C0260e SESSION_ID;
static {
Intrinsics.checkNotNullParameter("session_id", AppMeasurementSdk.ConditionalUserProperty.NAME);
SESSION_ID = new C0260e("session_id");
}
private FirebaseSessionDataKeys() {
}
public final C0260e getSESSION_ID() {
return SESSION_ID;
}
}
public SessionDatastoreImpl(Context context, CoroutineContext backgroundDispatcher) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
this.context = context;
this.backgroundDispatcher = backgroundDispatcher;
this.currentSessionFromDatastore = new AtomicReference<>();
final Flow m1659catch = FlowKt.m1659catch(Companion.getDataStore(context).b(), new SessionDatastoreImpl$firebaseSessionDataFlow$1(null));
this.firebaseSessionDataFlow = new Flow<FirebaseSessionsData>() { // from class: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "R", "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1", "kotlinx/coroutines/flow/FlowKt__TransformKt$map$$inlined$unsafeTransform$1$2"}, k = 3, mv = {1, 7, 1}, xi = 48)
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2, reason: invalid class name */
/* loaded from: classes3.dex */
public static final class AnonymousClass2<T> implements FlowCollector {
final /* synthetic */ FlowCollector $this_unsafeFlow;
final /* synthetic */ SessionDatastoreImpl this$0;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2", f = "SessionDatastore.kt", i = {}, l = {224}, m = "emit", n = {}, s = {})
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1, reason: invalid class name */
/* loaded from: classes3.dex */
public static final class AnonymousClass1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
public AnonymousClass1(Continuation continuation) {
super(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
return AnonymousClass2.this.emit(null, this);
}
}
public AnonymousClass2(FlowCollector flowCollector, SessionDatastoreImpl sessionDatastoreImpl) {
this.$this_unsafeFlow = flowCollector;
this.this$0 = sessionDatastoreImpl;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // kotlinx.coroutines.flow.FlowCollector
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object emit(java.lang.Object r5, kotlin.coroutines.Continuation r6) {
/*
r4 = this;
boolean r0 = r6 instanceof com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1.AnonymousClass2.AnonymousClass1
if (r0 == 0) goto L13
r0 = r6
com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1 r0 = (com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1.AnonymousClass2.AnonymousClass1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1 r0 = new com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1
r0.<init>(r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r6)
goto L47
L29:
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
r4.<init>(r5)
throw r4
L31:
kotlin.ResultKt.throwOnFailure(r6)
kotlinx.coroutines.flow.FlowCollector r6 = r4.$this_unsafeFlow
b0.g r5 = (b0.AbstractC0262g) r5
com.google.firebase.sessions.SessionDatastoreImpl r4 = r4.this$0
com.google.firebase.sessions.FirebaseSessionsData r4 = com.google.firebase.sessions.SessionDatastoreImpl.access$mapSessionsData(r4, r5)
r0.label = r3
java.lang.Object r4 = r6.emit(r4, r0)
if (r4 != r1) goto L47
return r1
L47:
kotlin.Unit r4 = kotlin.Unit.INSTANCE
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
}
@Override // kotlinx.coroutines.flow.Flow
public Object collect(FlowCollector<? super FirebaseSessionsData> flowCollector, Continuation continuation) {
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector, this), continuation);
return collect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? collect : Unit.INSTANCE;
}
};
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(backgroundDispatcher), null, null, new AnonymousClass1(null), 3, null);
}
/* JADX INFO: Access modifiers changed from: private */
public final FirebaseSessionsData mapSessionsData(AbstractC0262g preferences) {
return new FirebaseSessionsData((String) preferences.a(FirebaseSessionDataKeys.INSTANCE.getSESSION_ID()));
}
@Override // com.google.firebase.sessions.SessionDatastore
public String getCurrentSessionId() {
FirebaseSessionsData firebaseSessionsData = this.currentSessionFromDatastore.get();
if (firebaseSessionsData != null) {
return firebaseSessionsData.getSessionId();
}
return null;
}
@Override // com.google.firebase.sessions.SessionDatastore
public void updateSessionId(String sessionId) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(this.backgroundDispatcher), null, null, new SessionDatastoreImpl$updateSessionId$1(this, sessionId, null), 3, null);
}
}

View File

@@ -0,0 +1,101 @@
package com.google.firebase.sessions;
import C.w;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\t\n\u0002\b\u000e\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0080\b\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b¢\u0006\u0002\u0010\tJ\t\u0010\u0011\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0012\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0013\u001a\u00020\u0006HÆ\u0003J\t\u0010\u0014\u001a\u00020\bHÆ\u0003J1\u0010\u0015\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\bHÆ\u0001J\u0013\u0010\u0016\u001a\u00020\u00172\b\u0010\u0018\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0019\u001a\u00020\u0006HÖ\u0001J\t\u0010\u001a\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\u000bR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010¨\u0006\u001b"}, d2 = {"Lcom/google/firebase/sessions/SessionDetails;", "", "sessionId", "", "firstSessionId", "sessionIndex", "", "sessionStartTimestampUs", "", "(Ljava/lang/String;Ljava/lang/String;IJ)V", "getFirstSessionId", "()Ljava/lang/String;", "getSessionId", "getSessionIndex", "()I", "getSessionStartTimestampUs", "()J", "component1", "component2", "component3", "component4", "copy", "equals", "", "other", "hashCode", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class SessionDetails {
private final String firstSessionId;
private final String sessionId;
private final int sessionIndex;
private final long sessionStartTimestampUs;
public SessionDetails(String sessionId, String firstSessionId, int i, long j4) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
Intrinsics.checkNotNullParameter(firstSessionId, "firstSessionId");
this.sessionId = sessionId;
this.firstSessionId = firstSessionId;
this.sessionIndex = i;
this.sessionStartTimestampUs = j4;
}
public static /* synthetic */ SessionDetails copy$default(SessionDetails sessionDetails, String str, String str2, int i, long j4, int i4, Object obj) {
if ((i4 & 1) != 0) {
str = sessionDetails.sessionId;
}
if ((i4 & 2) != 0) {
str2 = sessionDetails.firstSessionId;
}
if ((i4 & 4) != 0) {
i = sessionDetails.sessionIndex;
}
if ((i4 & 8) != 0) {
j4 = sessionDetails.sessionStartTimestampUs;
}
int i5 = i;
return sessionDetails.copy(str, str2, i5, j4);
}
/* renamed from: component1, reason: from getter */
public final String getSessionId() {
return this.sessionId;
}
/* renamed from: component2, reason: from getter */
public final String getFirstSessionId() {
return this.firstSessionId;
}
/* renamed from: component3, reason: from getter */
public final int getSessionIndex() {
return this.sessionIndex;
}
/* renamed from: component4, reason: from getter */
public final long getSessionStartTimestampUs() {
return this.sessionStartTimestampUs;
}
public final SessionDetails copy(String sessionId, String firstSessionId, int sessionIndex, long sessionStartTimestampUs) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
Intrinsics.checkNotNullParameter(firstSessionId, "firstSessionId");
return new SessionDetails(sessionId, firstSessionId, sessionIndex, sessionStartTimestampUs);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SessionDetails)) {
return false;
}
SessionDetails sessionDetails = (SessionDetails) other;
return Intrinsics.areEqual(this.sessionId, sessionDetails.sessionId) && Intrinsics.areEqual(this.firstSessionId, sessionDetails.firstSessionId) && this.sessionIndex == sessionDetails.sessionIndex && this.sessionStartTimestampUs == sessionDetails.sessionStartTimestampUs;
}
public final String getFirstSessionId() {
return this.firstSessionId;
}
public final String getSessionId() {
return this.sessionId;
}
public final int getSessionIndex() {
return this.sessionIndex;
}
public final long getSessionStartTimestampUs() {
return this.sessionStartTimestampUs;
}
public int hashCode() {
return Long.hashCode(this.sessionStartTimestampUs) + w.x(this.sessionIndex, com.google.android.gms.measurement.internal.a.d(this.firstSessionId, this.sessionId.hashCode() * 31, 31), 31);
}
public String toString() {
return "SessionDetails(sessionId=" + this.sessionId + ", firstSessionId=" + this.firstSessionId + ", sessionIndex=" + this.sessionIndex + ", sessionStartTimestampUs=" + this.sessionStartTimestampUs + ')';
}
}

View File

@@ -0,0 +1,89 @@
package com.google.firebase.sessions;
import com.google.firebase.encoders.annotations.Encodable;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0081\b\u0018\u00002\u00020\u0001B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ\t\u0010\u000f\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0010\u001a\u00020\u0005HÆ\u0003J\t\u0010\u0011\u001a\u00020\u0007HÆ\u0003J'\u0010\u0012\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u0007HÆ\u0001J\u0013\u0010\u0013\u001a\u00020\u00142\b\u0010\u0015\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0016\u001a\u00020\u0017HÖ\u0001J\t\u0010\u0018\u001a\u00020\u0019HÖ\u0001R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000e¨\u0006\u001a"}, d2 = {"Lcom/google/firebase/sessions/SessionEvent;", "", "eventType", "Lcom/google/firebase/sessions/EventType;", "sessionData", "Lcom/google/firebase/sessions/SessionInfo;", "applicationInfo", "Lcom/google/firebase/sessions/ApplicationInfo;", "(Lcom/google/firebase/sessions/EventType;Lcom/google/firebase/sessions/SessionInfo;Lcom/google/firebase/sessions/ApplicationInfo;)V", "getApplicationInfo", "()Lcom/google/firebase/sessions/ApplicationInfo;", "getEventType", "()Lcom/google/firebase/sessions/EventType;", "getSessionData", "()Lcom/google/firebase/sessions/SessionInfo;", "component1", "component2", "component3", "copy", "equals", "", "other", "hashCode", "", "toString", "", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
@Encodable
/* loaded from: classes3.dex */
public final /* data */ class SessionEvent {
private final ApplicationInfo applicationInfo;
private final EventType eventType;
private final SessionInfo sessionData;
public SessionEvent(EventType eventType, SessionInfo sessionData, ApplicationInfo applicationInfo) {
Intrinsics.checkNotNullParameter(eventType, "eventType");
Intrinsics.checkNotNullParameter(sessionData, "sessionData");
Intrinsics.checkNotNullParameter(applicationInfo, "applicationInfo");
this.eventType = eventType;
this.sessionData = sessionData;
this.applicationInfo = applicationInfo;
}
public static /* synthetic */ SessionEvent copy$default(SessionEvent sessionEvent, EventType eventType, SessionInfo sessionInfo, ApplicationInfo applicationInfo, int i, Object obj) {
if ((i & 1) != 0) {
eventType = sessionEvent.eventType;
}
if ((i & 2) != 0) {
sessionInfo = sessionEvent.sessionData;
}
if ((i & 4) != 0) {
applicationInfo = sessionEvent.applicationInfo;
}
return sessionEvent.copy(eventType, sessionInfo, applicationInfo);
}
/* renamed from: component1, reason: from getter */
public final EventType getEventType() {
return this.eventType;
}
/* renamed from: component2, reason: from getter */
public final SessionInfo getSessionData() {
return this.sessionData;
}
/* renamed from: component3, reason: from getter */
public final ApplicationInfo getApplicationInfo() {
return this.applicationInfo;
}
public final SessionEvent copy(EventType eventType, SessionInfo sessionData, ApplicationInfo applicationInfo) {
Intrinsics.checkNotNullParameter(eventType, "eventType");
Intrinsics.checkNotNullParameter(sessionData, "sessionData");
Intrinsics.checkNotNullParameter(applicationInfo, "applicationInfo");
return new SessionEvent(eventType, sessionData, applicationInfo);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SessionEvent)) {
return false;
}
SessionEvent sessionEvent = (SessionEvent) other;
return this.eventType == sessionEvent.eventType && Intrinsics.areEqual(this.sessionData, sessionEvent.sessionData) && Intrinsics.areEqual(this.applicationInfo, sessionEvent.applicationInfo);
}
public final ApplicationInfo getApplicationInfo() {
return this.applicationInfo;
}
public final EventType getEventType() {
return this.eventType;
}
public final SessionInfo getSessionData() {
return this.sessionData;
}
public int hashCode() {
return this.applicationInfo.hashCode() + ((this.sessionData.hashCode() + (this.eventType.hashCode() * 31)) * 31);
}
public String toString() {
return "SessionEvent(eventType=" + this.eventType + ", sessionData=" + this.sessionData + ", applicationInfo=" + this.applicationInfo + ')';
}
}

View File

@@ -0,0 +1,85 @@
package com.google.firebase.sessions;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.os.Build;
import com.google.firebase.FirebaseApp;
import com.google.firebase.encoders.DataEncoder;
import com.google.firebase.encoders.json.JsonDataEncoderBuilder;
import com.google.firebase.sessions.api.SessionSubscriber;
import com.google.firebase.sessions.settings.SessionsSettings;
import java.util.List;
import java.util.Map;
import kotlin.Metadata;
import kotlin.collections.MapsKt;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0000\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002JT\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u00102\f\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00100\u00122\u0014\b\u0002\u0010\u0013\u001a\u000e\u0012\u0004\u0012\u00020\u0015\u0012\u0004\u0012\u00020\u00160\u00142\b\b\u0002\u0010\u0017\u001a\u00020\u0018J\u000e\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\t\u001a\u00020\nJ\u0012\u0010\u001b\u001a\u00020\u001c2\b\u0010\u001d\u001a\u0004\u0018\u00010\u0016H\u0002R\u0014\u0010\u0003\u001a\u00020\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u001e"}, d2 = {"Lcom/google/firebase/sessions/SessionEvents;", "", "()V", "SESSION_EVENT_ENCODER", "Lcom/google/firebase/encoders/DataEncoder;", "getSESSION_EVENT_ENCODER$com_google_firebase_firebase_sessions", "()Lcom/google/firebase/encoders/DataEncoder;", "buildSession", "Lcom/google/firebase/sessions/SessionEvent;", "firebaseApp", "Lcom/google/firebase/FirebaseApp;", "sessionDetails", "Lcom/google/firebase/sessions/SessionDetails;", "sessionsSettings", "Lcom/google/firebase/sessions/settings/SessionsSettings;", "currentProcessDetails", "Lcom/google/firebase/sessions/ProcessDetails;", "appProcessDetails", "", "subscribers", "", "Lcom/google/firebase/sessions/api/SessionSubscriber$Name;", "Lcom/google/firebase/sessions/api/SessionSubscriber;", "firebaseInstallationId", "", "getApplicationInfo", "Lcom/google/firebase/sessions/ApplicationInfo;", "toDataCollectionState", "Lcom/google/firebase/sessions/DataCollectionState;", "subscriber", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionEvents {
public static final SessionEvents INSTANCE = new SessionEvents();
private static final DataEncoder SESSION_EVENT_ENCODER;
static {
DataEncoder build = new JsonDataEncoderBuilder().configureWith(AutoSessionEventEncoder.CONFIG).ignoreNullValues(true).build();
Intrinsics.checkNotNullExpressionValue(build, "JsonDataEncoderBuilder()…lues(true)\n .build()");
SESSION_EVENT_ENCODER = build;
}
private SessionEvents() {
}
public static /* synthetic */ SessionEvent buildSession$default(SessionEvents sessionEvents, FirebaseApp firebaseApp, SessionDetails sessionDetails, SessionsSettings sessionsSettings, ProcessDetails processDetails, List list, Map map, String str, int i, Object obj) {
if ((i & 32) != 0) {
map = MapsKt.emptyMap();
}
return sessionEvents.buildSession(firebaseApp, sessionDetails, sessionsSettings, processDetails, list, map, (i & 64) != 0 ? "" : str);
}
private final DataCollectionState toDataCollectionState(SessionSubscriber subscriber) {
return subscriber == null ? DataCollectionState.COLLECTION_SDK_NOT_INSTALLED : subscriber.isDataCollectionEnabled() ? DataCollectionState.COLLECTION_ENABLED : DataCollectionState.COLLECTION_DISABLED;
}
public final SessionEvent buildSession(FirebaseApp firebaseApp, SessionDetails sessionDetails, SessionsSettings sessionsSettings, ProcessDetails currentProcessDetails, List<ProcessDetails> appProcessDetails, Map<SessionSubscriber.Name, ? extends SessionSubscriber> subscribers, String firebaseInstallationId) {
Intrinsics.checkNotNullParameter(firebaseApp, "firebaseApp");
Intrinsics.checkNotNullParameter(sessionDetails, "sessionDetails");
Intrinsics.checkNotNullParameter(sessionsSettings, "sessionsSettings");
Intrinsics.checkNotNullParameter(currentProcessDetails, "currentProcessDetails");
Intrinsics.checkNotNullParameter(appProcessDetails, "appProcessDetails");
Intrinsics.checkNotNullParameter(subscribers, "subscribers");
Intrinsics.checkNotNullParameter(firebaseInstallationId, "firebaseInstallationId");
return new SessionEvent(EventType.SESSION_START, new SessionInfo(sessionDetails.getSessionId(), sessionDetails.getFirstSessionId(), sessionDetails.getSessionIndex(), sessionDetails.getSessionStartTimestampUs(), new DataCollectionStatus(toDataCollectionState(subscribers.get(SessionSubscriber.Name.PERFORMANCE)), toDataCollectionState(subscribers.get(SessionSubscriber.Name.CRASHLYTICS)), sessionsSettings.getSamplingRate()), firebaseInstallationId), getApplicationInfo(firebaseApp));
}
public final ApplicationInfo getApplicationInfo(FirebaseApp firebaseApp) {
Intrinsics.checkNotNullParameter(firebaseApp, "firebaseApp");
Context applicationContext = firebaseApp.getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "firebaseApp.applicationContext");
String packageName = applicationContext.getPackageName();
PackageInfo packageInfo = applicationContext.getPackageManager().getPackageInfo(packageName, 0);
String valueOf = String.valueOf(packageInfo.getLongVersionCode());
String applicationId = firebaseApp.getOptions().getApplicationId();
Intrinsics.checkNotNullExpressionValue(applicationId, "firebaseApp.options.applicationId");
String MODEL = Build.MODEL;
Intrinsics.checkNotNullExpressionValue(MODEL, "MODEL");
String RELEASE = Build.VERSION.RELEASE;
Intrinsics.checkNotNullExpressionValue(RELEASE, "RELEASE");
LogEnvironment logEnvironment = LogEnvironment.LOG_ENVIRONMENT_PROD;
Intrinsics.checkNotNullExpressionValue(packageName, "packageName");
String str = packageInfo.versionName;
String str2 = str == null ? valueOf : str;
String MANUFACTURER = Build.MANUFACTURER;
Intrinsics.checkNotNullExpressionValue(MANUFACTURER, "MANUFACTURER");
ProcessDetailsProvider processDetailsProvider = ProcessDetailsProvider.INSTANCE;
Context applicationContext2 = firebaseApp.getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext2, "firebaseApp.applicationContext");
ProcessDetails currentProcessDetails = processDetailsProvider.getCurrentProcessDetails(applicationContext2);
Context applicationContext3 = firebaseApp.getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext3, "firebaseApp.applicationContext");
return new ApplicationInfo(applicationId, MODEL, BuildConfig.VERSION_NAME, RELEASE, logEnvironment, new AndroidApplicationInfo(packageName, str2, valueOf, MANUFACTURER, currentProcessDetails, processDetailsProvider.getAppProcessDetails(applicationContext3)));
}
public final DataEncoder getSESSION_EVENT_ENCODER$com_google_firebase_firebase_sessions() {
return SESSION_EVENT_ENCODER;
}
}

View File

@@ -0,0 +1,31 @@
package com.google.firebase.sessions;
import com.google.firebase.Firebase;
import com.google.firebase.FirebaseKt;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bà\u0080\u0001\u0018\u0000 \u00062\u00020\u0001:\u0001\u0006J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H&¨\u0006\u0007"}, d2 = {"Lcom/google/firebase/sessions/SessionFirelogPublisher;", "", "logSession", "", "sessionDetails", "Lcom/google/firebase/sessions/SessionDetails;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface SessionFirelogPublisher {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = Companion.$$INSTANCE;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u00048F¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/google/firebase/sessions/SessionFirelogPublisher$Companion;", "", "()V", "instance", "Lcom/google/firebase/sessions/SessionFirelogPublisher;", "getInstance", "()Lcom/google/firebase/sessions/SessionFirelogPublisher;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private Companion() {
}
public final SessionFirelogPublisher getInstance() {
Object obj = FirebaseKt.getApp(Firebase.INSTANCE).get(SessionFirelogPublisher.class);
Intrinsics.checkNotNullExpressionValue(obj, "Firebase.app[SessionFirelogPublisher::class.java]");
return (SessionFirelogPublisher) obj;
}
}
void logSession(SessionDetails sessionDetails);
}

View File

@@ -0,0 +1,31 @@
package com.google.firebase.sessions;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionFirelogPublisherImpl", f = "SessionFirelogPublisher.kt", i = {}, l = {113}, m = "getFirebaseInstallationId", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SessionFirelogPublisherImpl$getFirebaseInstallationId$1 extends ContinuationImpl {
int label;
/* synthetic */ Object result;
final /* synthetic */ SessionFirelogPublisherImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionFirelogPublisherImpl$getFirebaseInstallationId$1(SessionFirelogPublisherImpl sessionFirelogPublisherImpl, Continuation<? super SessionFirelogPublisherImpl$getFirebaseInstallationId$1> continuation) {
super(continuation);
this.this$0 = sessionFirelogPublisherImpl;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object firebaseInstallationId;
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
firebaseInstallationId = this.this$0.getFirebaseInstallationId(this);
return firebaseInstallationId;
}
}

View File

@@ -0,0 +1,61 @@
package com.google.firebase.sessions;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionFirelogPublisherImpl$logSession$1", f = "SessionFirelogPublisher.kt", i = {}, l = {64, 72, 73}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SessionFirelogPublisherImpl$logSession$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ SessionDetails $sessionDetails;
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
Object L$6;
Object L$7;
int label;
final /* synthetic */ SessionFirelogPublisherImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionFirelogPublisherImpl$logSession$1(SessionFirelogPublisherImpl sessionFirelogPublisherImpl, SessionDetails sessionDetails, Continuation<? super SessionFirelogPublisherImpl$logSession$1> continuation) {
super(2, continuation);
this.this$0 = sessionFirelogPublisherImpl;
this.$sessionDetails = sessionDetails;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new SessionFirelogPublisherImpl$logSession$1(this.this$0, this.$sessionDetails, continuation);
}
/* JADX WARN: Code restructure failed: missing block: B:25:0x007b, code lost:
if (r13 == r0) goto L23;
*/
/* JADX WARN: Removed duplicated region for block: B:17:0x00f9 */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r13) {
/*
Method dump skipped, instructions count: 277
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.SessionFirelogPublisherImpl$logSession$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((SessionFirelogPublisherImpl$logSession$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,32 @@
package com.google.firebase.sessions;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionFirelogPublisherImpl", f = "SessionFirelogPublisher.kt", i = {0}, l = {95}, m = "shouldLogSession", n = {"this"}, s = {"L$0"})
/* loaded from: classes3.dex */
public final class SessionFirelogPublisherImpl$shouldLogSession$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ SessionFirelogPublisherImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionFirelogPublisherImpl$shouldLogSession$1(SessionFirelogPublisherImpl sessionFirelogPublisherImpl, Continuation<? super SessionFirelogPublisherImpl$shouldLogSession$1> continuation) {
super(continuation);
this.this$0 = sessionFirelogPublisherImpl;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object shouldLogSession;
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
shouldLogSession = this.this$0.shouldLogSession(this);
return shouldLogSession;
}
}

View File

@@ -0,0 +1,194 @@
package com.google.firebase.sessions;
import android.util.Log;
import com.google.firebase.FirebaseApp;
import com.google.firebase.installations.FirebaseInstallationsApi;
import com.google.firebase.sessions.settings.SessionsSettings;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScopeKt;
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\b\u0000\u0018\u0000 \u001b2\u00020\u0001:\u0001\u001bB-\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00020\t\u0012\u0006\u0010\n\u001a\u00020\u000b¢\u0006\u0002\u0010\fJ\u0010\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u0010H\u0002J\u0019\u0010\u0011\u001a\n \u0013*\u0004\u0018\u00010\u00120\u0012H\u0082@ø\u0001\u0000¢\u0006\u0002\u0010\u0014J\u0010\u0010\u0015\u001a\u00020\u000e2\u0006\u0010\u0016\u001a\u00020\u0017H\u0016J\b\u0010\u0018\u001a\u00020\u0019H\u0002J\u0011\u0010\u001a\u001a\u00020\u0019H\u0082@ø\u0001\u0000¢\u0006\u0002\u0010\u0014R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001c"}, d2 = {"Lcom/google/firebase/sessions/SessionFirelogPublisherImpl;", "Lcom/google/firebase/sessions/SessionFirelogPublisher;", "firebaseApp", "Lcom/google/firebase/FirebaseApp;", "firebaseInstallations", "Lcom/google/firebase/installations/FirebaseInstallationsApi;", "sessionSettings", "Lcom/google/firebase/sessions/settings/SessionsSettings;", "eventGDTLogger", "Lcom/google/firebase/sessions/EventGDTLoggerInterface;", "backgroundDispatcher", "Lkotlin/coroutines/CoroutineContext;", "(Lcom/google/firebase/FirebaseApp;Lcom/google/firebase/installations/FirebaseInstallationsApi;Lcom/google/firebase/sessions/settings/SessionsSettings;Lcom/google/firebase/sessions/EventGDTLoggerInterface;Lkotlin/coroutines/CoroutineContext;)V", "attemptLoggingSessionEvent", "", "sessionEvent", "Lcom/google/firebase/sessions/SessionEvent;", "getFirebaseInstallationId", "", "kotlin.jvm.PlatformType", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "logSession", "sessionDetails", "Lcom/google/firebase/sessions/SessionDetails;", "shouldCollectEvents", "", "shouldLogSession", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionFirelogPublisherImpl implements SessionFirelogPublisher {
private static final String TAG = "SessionFirelogPublisher";
private final CoroutineContext backgroundDispatcher;
private final EventGDTLoggerInterface eventGDTLogger;
private final FirebaseApp firebaseApp;
private final FirebaseInstallationsApi firebaseInstallations;
private final SessionsSettings sessionSettings;
private static final double randomValueForSampling = Math.random();
public SessionFirelogPublisherImpl(FirebaseApp firebaseApp, FirebaseInstallationsApi firebaseInstallations, SessionsSettings sessionSettings, EventGDTLoggerInterface eventGDTLogger, CoroutineContext backgroundDispatcher) {
Intrinsics.checkNotNullParameter(firebaseApp, "firebaseApp");
Intrinsics.checkNotNullParameter(firebaseInstallations, "firebaseInstallations");
Intrinsics.checkNotNullParameter(sessionSettings, "sessionSettings");
Intrinsics.checkNotNullParameter(eventGDTLogger, "eventGDTLogger");
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
this.firebaseApp = firebaseApp;
this.firebaseInstallations = firebaseInstallations;
this.sessionSettings = sessionSettings;
this.eventGDTLogger = eventGDTLogger;
this.backgroundDispatcher = backgroundDispatcher;
}
/* JADX INFO: Access modifiers changed from: private */
public final void attemptLoggingSessionEvent(SessionEvent sessionEvent) {
try {
this.eventGDTLogger.log(sessionEvent);
Log.d(TAG, "Successfully logged Session Start event: " + sessionEvent.getSessionData().getSessionId());
} catch (RuntimeException e4) {
Log.e(TAG, "Error logging Session Start event to DataTransport: ", e4);
}
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Removed duplicated region for block: B:17:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:9:0x0023 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object getFirebaseInstallationId(kotlin.coroutines.Continuation<? super java.lang.String> r5) {
/*
r4 = this;
boolean r0 = r5 instanceof com.google.firebase.sessions.SessionFirelogPublisherImpl$getFirebaseInstallationId$1
if (r0 == 0) goto L13
r0 = r5
com.google.firebase.sessions.SessionFirelogPublisherImpl$getFirebaseInstallationId$1 r0 = (com.google.firebase.sessions.SessionFirelogPublisherImpl$getFirebaseInstallationId$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.google.firebase.sessions.SessionFirelogPublisherImpl$getFirebaseInstallationId$1 r0 = new com.google.firebase.sessions.SessionFirelogPublisherImpl$getFirebaseInstallationId$1
r0.<init>(r4, r5)
L18:
java.lang.Object r5 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r5) // Catch: java.lang.Exception -> L4b
goto L48
L29:
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
r4.<init>(r5)
throw r4
L31:
kotlin.ResultKt.throwOnFailure(r5)
com.google.firebase.installations.FirebaseInstallationsApi r4 = r4.firebaseInstallations // Catch: java.lang.Exception -> L4b
com.google.android.gms.tasks.Task r4 = r4.getId() // Catch: java.lang.Exception -> L4b
java.lang.String r5 = "firebaseInstallations.id"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5) // Catch: java.lang.Exception -> L4b
r0.label = r3 // Catch: java.lang.Exception -> L4b
java.lang.Object r5 = kotlinx.coroutines.tasks.TasksKt.await(r4, r0) // Catch: java.lang.Exception -> L4b
if (r5 != r1) goto L48
return r1
L48:
java.lang.String r5 = (java.lang.String) r5 // Catch: java.lang.Exception -> L4b
return r5
L4b:
r4 = move-exception
java.lang.String r5 = "SessionFirelogPublisher"
java.lang.String r0 = "Error getting Firebase Installation ID. Using an empty ID"
android.util.Log.e(r5, r0, r4)
java.lang.String r4 = ""
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.SessionFirelogPublisherImpl.getFirebaseInstallationId(kotlin.coroutines.Continuation):java.lang.Object");
}
private final boolean shouldCollectEvents() {
return randomValueForSampling <= this.sessionSettings.getSamplingRate();
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Removed duplicated region for block: B:12:0x0055 */
/* JADX WARN: Removed duplicated region for block: B:15:0x005f */
/* JADX WARN: Removed duplicated region for block: B:23:0x0037 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0025 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object shouldLogSession(kotlin.coroutines.Continuation<? super java.lang.Boolean> r6) {
/*
r5 = this;
boolean r0 = r6 instanceof com.google.firebase.sessions.SessionFirelogPublisherImpl$shouldLogSession$1
if (r0 == 0) goto L13
r0 = r6
com.google.firebase.sessions.SessionFirelogPublisherImpl$shouldLogSession$1 r0 = (com.google.firebase.sessions.SessionFirelogPublisherImpl$shouldLogSession$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.google.firebase.sessions.SessionFirelogPublisherImpl$shouldLogSession$1 r0 = new com.google.firebase.sessions.SessionFirelogPublisherImpl$shouldLogSession$1
r0.<init>(r5, r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
java.lang.String r3 = "SessionFirelogPublisher"
r4 = 1
if (r2 == 0) goto L37
if (r2 != r4) goto L2f
java.lang.Object r5 = r0.L$0
com.google.firebase.sessions.SessionFirelogPublisherImpl r5 = (com.google.firebase.sessions.SessionFirelogPublisherImpl) r5
kotlin.ResultKt.throwOnFailure(r6)
goto L4c
L2f:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L37:
kotlin.ResultKt.throwOnFailure(r6)
java.lang.String r6 = "Data Collection is enabled for at least one Subscriber"
android.util.Log.d(r3, r6)
com.google.firebase.sessions.settings.SessionsSettings r6 = r5.sessionSettings
r0.L$0 = r5
r0.label = r4
java.lang.Object r6 = r6.updateSettings(r0)
if (r6 != r1) goto L4c
return r1
L4c:
com.google.firebase.sessions.settings.SessionsSettings r6 = r5.sessionSettings
boolean r6 = r6.getSessionsEnabled()
r0 = 0
if (r6 != 0) goto L5f
java.lang.String r5 = "Sessions SDK disabled. Events will not be sent."
android.util.Log.d(r3, r5)
java.lang.Boolean r5 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r0)
return r5
L5f:
boolean r5 = r5.shouldCollectEvents()
if (r5 != 0) goto L6f
java.lang.String r5 = "Sessions SDK has dropped this session due to sampling."
android.util.Log.d(r3, r5)
java.lang.Boolean r5 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r0)
return r5
L6f:
java.lang.Boolean r5 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r4)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.SessionFirelogPublisherImpl.shouldLogSession(kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // com.google.firebase.sessions.SessionFirelogPublisher
public void logSession(SessionDetails sessionDetails) {
Intrinsics.checkNotNullParameter(sessionDetails, "sessionDetails");
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(this.backgroundDispatcher), null, null, new SessionFirelogPublisherImpl$logSession$1(this, sessionDetails, null), 3, null);
}
}

View File

@@ -0,0 +1,101 @@
package com.google.firebase.sessions;
import com.google.firebase.Firebase;
import com.google.firebase.FirebaseKt;
import java.util.Locale;
import java.util.UUID;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.FunctionReferenceImpl;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0004\b\u0000\u0018\u0000 \u00172\u00020\u0001:\u0001\u0017B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u000e\b\u0002\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0002\u0010\u0007J\u0006\u0010\u0015\u001a\u00020\tJ\b\u0010\u0016\u001a\u00020\u000eH\u0002R\u001e\u0010\n\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\t@BX\u0086.¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u000e\u0010\r\u001a\u00020\u000eX\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u000f\u001a\u00020\u00108F¢\u0006\u0006\u001a\u0004\b\u0011\u0010\u0012R\u000e\u0010\u0013\u001a\u00020\u0014X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0018"}, d2 = {"Lcom/google/firebase/sessions/SessionGenerator;", "", "timeProvider", "Lcom/google/firebase/sessions/TimeProvider;", "uuidGenerator", "Lkotlin/Function0;", "Ljava/util/UUID;", "(Lcom/google/firebase/sessions/TimeProvider;Lkotlin/jvm/functions/Function0;)V", "<set-?>", "Lcom/google/firebase/sessions/SessionDetails;", "currentSession", "getCurrentSession", "()Lcom/google/firebase/sessions/SessionDetails;", "firstSessionId", "", "hasGenerateSession", "", "getHasGenerateSession", "()Z", "sessionIndex", "", "generateNewSession", "generateSessionId", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionGenerator {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private SessionDetails currentSession;
private final String firstSessionId;
private int sessionIndex;
private final TimeProvider timeProvider;
private final Function0<UUID> uuidGenerator;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
/* renamed from: com.google.firebase.sessions.SessionGenerator$1, reason: invalid class name */
/* loaded from: classes3.dex */
public /* synthetic */ class AnonymousClass1 extends FunctionReferenceImpl implements Function0<UUID> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
public AnonymousClass1() {
super(0, UUID.class, "randomUUID", "randomUUID()Ljava/util/UUID;", 0);
}
@Override // kotlin.jvm.functions.Function0
public final UUID invoke() {
return UUID.randomUUID();
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0080\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u00048F¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/google/firebase/sessions/SessionGenerator$Companion;", "", "()V", "instance", "Lcom/google/firebase/sessions/SessionGenerator;", "getInstance", "()Lcom/google/firebase/sessions/SessionGenerator;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final SessionGenerator getInstance() {
Object obj = FirebaseKt.getApp(Firebase.INSTANCE).get(SessionGenerator.class);
Intrinsics.checkNotNullExpressionValue(obj, "Firebase.app[SessionGenerator::class.java]");
return (SessionGenerator) obj;
}
private Companion() {
}
}
public SessionGenerator(TimeProvider timeProvider, Function0<UUID> uuidGenerator) {
Intrinsics.checkNotNullParameter(timeProvider, "timeProvider");
Intrinsics.checkNotNullParameter(uuidGenerator, "uuidGenerator");
this.timeProvider = timeProvider;
this.uuidGenerator = uuidGenerator;
this.firstSessionId = generateSessionId();
this.sessionIndex = -1;
}
private final String generateSessionId() {
String replace$default;
String uuid = this.uuidGenerator.invoke().toString();
Intrinsics.checkNotNullExpressionValue(uuid, "uuidGenerator().toString()");
replace$default = StringsKt__StringsJVMKt.replace$default(uuid, "-", "", false, 4, (Object) null);
String lowerCase = replace$default.toLowerCase(Locale.ROOT);
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
return lowerCase;
}
public final SessionDetails generateNewSession() {
int i = this.sessionIndex + 1;
this.sessionIndex = i;
this.currentSession = new SessionDetails(i == 0 ? this.firstSessionId : generateSessionId(), this.firstSessionId, this.sessionIndex, this.timeProvider.currentTimeUs());
return getCurrentSession();
}
public final SessionDetails getCurrentSession() {
SessionDetails sessionDetails = this.currentSession;
if (sessionDetails != null) {
return sessionDetails;
}
Intrinsics.throwUninitializedPropertyAccessException("currentSession");
return null;
}
public final boolean getHasGenerateSession() {
return this.currentSession != null;
}
public /* synthetic */ SessionGenerator(TimeProvider timeProvider, Function0 function0, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(timeProvider, (i & 2) != 0 ? AnonymousClass1.INSTANCE : function0);
}
}

View File

@@ -0,0 +1,151 @@
package com.google.firebase.sessions;
import C.w;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0014\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0080\b\u0018\u00002\u00020\u0001B9\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\b\b\u0002\u0010\t\u001a\u00020\n\u0012\b\b\u0002\u0010\u000b\u001a\u00020\u0003¢\u0006\u0002\u0010\fJ\t\u0010\u0017\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0018\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0019\u001a\u00020\u0006HÆ\u0003J\t\u0010\u001a\u001a\u00020\bHÆ\u0003J\t\u0010\u001b\u001a\u00020\nHÆ\u0003J\t\u0010\u001c\u001a\u00020\u0003HÆ\u0003JE\u0010\u001d\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\n2\b\b\u0002\u0010\u000b\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\u001e\u001a\u00020\u001f2\b\u0010 \u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010!\u001a\u00020\u0006HÖ\u0001J\t\u0010\"\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\t\u001a\u00020\n¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u000b\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0012R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0012R\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0016¨\u0006#"}, d2 = {"Lcom/google/firebase/sessions/SessionInfo;", "", "sessionId", "", "firstSessionId", "sessionIndex", "", "eventTimestampUs", "", "dataCollectionStatus", "Lcom/google/firebase/sessions/DataCollectionStatus;", "firebaseInstallationId", "(Ljava/lang/String;Ljava/lang/String;IJLcom/google/firebase/sessions/DataCollectionStatus;Ljava/lang/String;)V", "getDataCollectionStatus", "()Lcom/google/firebase/sessions/DataCollectionStatus;", "getEventTimestampUs", "()J", "getFirebaseInstallationId", "()Ljava/lang/String;", "getFirstSessionId", "getSessionId", "getSessionIndex", "()I", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "equals", "", "other", "hashCode", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class SessionInfo {
private final DataCollectionStatus dataCollectionStatus;
private final long eventTimestampUs;
private final String firebaseInstallationId;
private final String firstSessionId;
private final String sessionId;
private final int sessionIndex;
public SessionInfo(String sessionId, String firstSessionId, int i, long j4, DataCollectionStatus dataCollectionStatus, String firebaseInstallationId) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
Intrinsics.checkNotNullParameter(firstSessionId, "firstSessionId");
Intrinsics.checkNotNullParameter(dataCollectionStatus, "dataCollectionStatus");
Intrinsics.checkNotNullParameter(firebaseInstallationId, "firebaseInstallationId");
this.sessionId = sessionId;
this.firstSessionId = firstSessionId;
this.sessionIndex = i;
this.eventTimestampUs = j4;
this.dataCollectionStatus = dataCollectionStatus;
this.firebaseInstallationId = firebaseInstallationId;
}
public static /* synthetic */ SessionInfo copy$default(SessionInfo sessionInfo, String str, String str2, int i, long j4, DataCollectionStatus dataCollectionStatus, String str3, int i4, Object obj) {
if ((i4 & 1) != 0) {
str = sessionInfo.sessionId;
}
if ((i4 & 2) != 0) {
str2 = sessionInfo.firstSessionId;
}
if ((i4 & 4) != 0) {
i = sessionInfo.sessionIndex;
}
if ((i4 & 8) != 0) {
j4 = sessionInfo.eventTimestampUs;
}
if ((i4 & 16) != 0) {
dataCollectionStatus = sessionInfo.dataCollectionStatus;
}
if ((i4 & 32) != 0) {
str3 = sessionInfo.firebaseInstallationId;
}
long j5 = j4;
int i5 = i;
return sessionInfo.copy(str, str2, i5, j5, dataCollectionStatus, str3);
}
/* renamed from: component1, reason: from getter */
public final String getSessionId() {
return this.sessionId;
}
/* renamed from: component2, reason: from getter */
public final String getFirstSessionId() {
return this.firstSessionId;
}
/* renamed from: component3, reason: from getter */
public final int getSessionIndex() {
return this.sessionIndex;
}
/* renamed from: component4, reason: from getter */
public final long getEventTimestampUs() {
return this.eventTimestampUs;
}
/* renamed from: component5, reason: from getter */
public final DataCollectionStatus getDataCollectionStatus() {
return this.dataCollectionStatus;
}
/* renamed from: component6, reason: from getter */
public final String getFirebaseInstallationId() {
return this.firebaseInstallationId;
}
public final SessionInfo copy(String sessionId, String firstSessionId, int sessionIndex, long eventTimestampUs, DataCollectionStatus dataCollectionStatus, String firebaseInstallationId) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
Intrinsics.checkNotNullParameter(firstSessionId, "firstSessionId");
Intrinsics.checkNotNullParameter(dataCollectionStatus, "dataCollectionStatus");
Intrinsics.checkNotNullParameter(firebaseInstallationId, "firebaseInstallationId");
return new SessionInfo(sessionId, firstSessionId, sessionIndex, eventTimestampUs, dataCollectionStatus, firebaseInstallationId);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SessionInfo)) {
return false;
}
SessionInfo sessionInfo = (SessionInfo) other;
return Intrinsics.areEqual(this.sessionId, sessionInfo.sessionId) && Intrinsics.areEqual(this.firstSessionId, sessionInfo.firstSessionId) && this.sessionIndex == sessionInfo.sessionIndex && this.eventTimestampUs == sessionInfo.eventTimestampUs && Intrinsics.areEqual(this.dataCollectionStatus, sessionInfo.dataCollectionStatus) && Intrinsics.areEqual(this.firebaseInstallationId, sessionInfo.firebaseInstallationId);
}
public final DataCollectionStatus getDataCollectionStatus() {
return this.dataCollectionStatus;
}
public final long getEventTimestampUs() {
return this.eventTimestampUs;
}
public final String getFirebaseInstallationId() {
return this.firebaseInstallationId;
}
public final String getFirstSessionId() {
return this.firstSessionId;
}
public final String getSessionId() {
return this.sessionId;
}
public final int getSessionIndex() {
return this.sessionIndex;
}
public int hashCode() {
return this.firebaseInstallationId.hashCode() + ((this.dataCollectionStatus.hashCode() + com.google.android.gms.measurement.internal.a.b(this.eventTimestampUs, w.x(this.sessionIndex, com.google.android.gms.measurement.internal.a.d(this.firstSessionId, this.sessionId.hashCode() * 31, 31), 31), 31)) * 31);
}
public String toString() {
StringBuilder sb = new StringBuilder("SessionInfo(sessionId=");
sb.append(this.sessionId);
sb.append(", firstSessionId=");
sb.append(this.firstSessionId);
sb.append(", sessionIndex=");
sb.append(this.sessionIndex);
sb.append(", eventTimestampUs=");
sb.append(this.eventTimestampUs);
sb.append(", dataCollectionStatus=");
sb.append(this.dataCollectionStatus);
sb.append(", firebaseInstallationId=");
return com.google.android.gms.measurement.internal.a.n(sb, this.firebaseInstallationId, ')');
}
public /* synthetic */ SessionInfo(String str, String str2, int i, long j4, DataCollectionStatus dataCollectionStatus, String str3, int i4, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, i, j4, (i4 & 16) != 0 ? new DataCollectionStatus(null, null, FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE, 7, null) : dataCollectionStatus, (i4 & 32) != 0 ? "" : str3);
}
}

View File

@@ -0,0 +1,67 @@
package com.google.firebase.sessions;
import android.util.Log;
import com.google.firebase.sessions.api.FirebaseSessionsDependencies;
import com.google.firebase.sessions.api.SessionSubscriber;
import java.util.Collection;
import java.util.Map;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1", f = "SessionLifecycleClient.kt", i = {}, l = {73}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ String $sessionId;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1(String str, Continuation<? super SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1> continuation) {
super(2, continuation);
this.$sessionId = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1(this.$sessionId, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FirebaseSessionsDependencies firebaseSessionsDependencies = FirebaseSessionsDependencies.INSTANCE;
this.label = 1;
obj = firebaseSessionsDependencies.getRegisteredSubscribers$com_google_firebase_firebase_sessions(this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
Collection<SessionSubscriber> values = ((Map) obj).values();
String str = this.$sessionId;
for (SessionSubscriber sessionSubscriber : values) {
sessionSubscriber.onSessionChanged(new SessionSubscriber.SessionDetails(str));
Log.d(SessionLifecycleClient.TAG, "Notified " + sessionSubscriber.getSessionSubscriberName() + " of new session " + str);
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,99 @@
package com.google.firebase.sessions;
import android.os.Message;
import android.util.Log;
import com.google.firebase.sessions.api.FirebaseSessionsDependencies;
import com.google.firebase.sessions.api.SessionSubscriber;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.comparisons.ComparisonsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.SessionLifecycleClient$sendLifecycleEvents$1", f = "SessionLifecycleClient.kt", i = {}, l = {149}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SessionLifecycleClient$sendLifecycleEvents$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ List<Message> $messages;
int label;
final /* synthetic */ SessionLifecycleClient this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionLifecycleClient$sendLifecycleEvents$1(SessionLifecycleClient sessionLifecycleClient, List<Message> list, Continuation<? super SessionLifecycleClient$sendLifecycleEvents$1> continuation) {
super(2, continuation);
this.this$0 = sessionLifecycleClient;
this.$messages = list;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new SessionLifecycleClient$sendLifecycleEvents$1(this.this$0, this.$messages, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Message latestByCode;
Message latestByCode2;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FirebaseSessionsDependencies firebaseSessionsDependencies = FirebaseSessionsDependencies.INSTANCE;
this.label = 1;
obj = firebaseSessionsDependencies.getRegisteredSubscribers$com_google_firebase_firebase_sessions(this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
Map map = (Map) obj;
if (map.isEmpty()) {
Log.d(SessionLifecycleClient.TAG, "Sessions SDK did not have any dependent SDKs register as dependencies. Events will not be sent.");
} else {
Collection values = map.values();
if (!(values instanceof Collection) || !values.isEmpty()) {
Iterator it = values.iterator();
while (it.hasNext()) {
if (((SessionSubscriber) it.next()).isDataCollectionEnabled()) {
latestByCode = this.this$0.getLatestByCode(this.$messages, 2);
latestByCode2 = this.this$0.getLatestByCode(this.$messages, 1);
List sortedWith = CollectionsKt.sortedWith(CollectionsKt.filterNotNull(CollectionsKt.mutableListOf(latestByCode, latestByCode2)), new Comparator() { // from class: com.google.firebase.sessions.SessionLifecycleClient$sendLifecycleEvents$1$invokeSuspend$$inlined$sortedBy$1
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Comparator
public final int compare(T t2, T t4) {
return ComparisonsKt.compareValues(Long.valueOf(((Message) t2).getWhen()), Long.valueOf(((Message) t4).getWhen()));
}
});
SessionLifecycleClient sessionLifecycleClient = this.this$0;
Iterator it2 = sortedWith.iterator();
while (it2.hasNext()) {
sessionLifecycleClient.sendMessageToServer((Message) it2.next());
}
}
}
}
Log.d(SessionLifecycleClient.TAG, "Data Collection is disabled for all subscribers. Skipping this Event");
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((SessionLifecycleClient$sendLifecycleEvents$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,188 @@
package com.google.firebase.sessions;
import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.util.Log;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.LinkedBlockingDeque;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.Job;
@Metadata(d1 = {"\u0000U\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010!\n\u0002\b\u0003\n\u0002\u0010 \n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004*\u0001\r\b\u0000\u0018\u0000 \"2\u00020\u0001:\u0002!\"B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0006\u0010\u000f\u001a\u00020\u0010J\u0006\u0010\u0011\u001a\u00020\u0010J\u000e\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00070\u0013H\u0002J\u0006\u0010\u0014\u001a\u00020\u0010J \u0010\u0015\u001a\u0004\u0018\u00010\u00072\f\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00070\u00172\u0006\u0010\u0018\u001a\u00020\u0019H\u0002J\u0010\u0010\u001a\u001a\u00020\u00102\u0006\u0010\u001b\u001a\u00020\u0007H\u0002J\u0010\u0010\u001c\u001a\u00020\u00102\u0006\u0010\u001d\u001a\u00020\u0019H\u0002J\u0016\u0010\u001e\u001a\u00020\u001f2\f\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00070\u0017H\u0002J\u0010\u0010 \u001a\u00020\u00102\u0006\u0010\u001b\u001a\u00020\u0007H\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\b\u001a\u0004\u0018\u00010\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u000e¨\u0006#"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleClient;", "", "backgroundDispatcher", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlin/coroutines/CoroutineContext;)V", "queuedMessages", "Ljava/util/concurrent/LinkedBlockingDeque;", "Landroid/os/Message;", "service", "Landroid/os/Messenger;", "serviceBound", "", "serviceConnection", "com/google/firebase/sessions/SessionLifecycleClient$serviceConnection$1", "Lcom/google/firebase/sessions/SessionLifecycleClient$serviceConnection$1;", "backgrounded", "", "bindToService", "drainQueue", "", "foregrounded", "getLatestByCode", "messages", "", "msgCode", "", "queueMessage", "msg", "sendLifecycleEvent", "messageCode", "sendLifecycleEvents", "Lkotlinx/coroutines/Job;", "sendMessageToServer", "ClientUpdateHandler", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionLifecycleClient {
private static final int MAX_QUEUED_MESSAGES = 20;
public static final String TAG = "SessionLifecycleClient";
private final CoroutineContext backgroundDispatcher;
private final LinkedBlockingDeque<Message> queuedMessages;
private Messenger service;
private boolean serviceBound;
private final SessionLifecycleClient$serviceConnection$1 serviceConnection;
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0000\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0010\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016J\u0010\u0010\t\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\u000bH\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleClient$ClientUpdateHandler;", "Landroid/os/Handler;", "backgroundDispatcher", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlin/coroutines/CoroutineContext;)V", "handleMessage", "", "msg", "Landroid/os/Message;", "handleSessionUpdate", "sessionId", "", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class ClientUpdateHandler extends Handler {
private final CoroutineContext backgroundDispatcher;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ClientUpdateHandler(CoroutineContext backgroundDispatcher) {
super(Looper.getMainLooper());
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
this.backgroundDispatcher = backgroundDispatcher;
}
private final void handleSessionUpdate(String sessionId) {
Log.d(SessionLifecycleClient.TAG, "Session update received: " + sessionId);
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(this.backgroundDispatcher), null, null, new SessionLifecycleClient$ClientUpdateHandler$handleSessionUpdate$1(sessionId, null), 3, null);
}
@Override // android.os.Handler
public void handleMessage(Message msg) {
String str;
Intrinsics.checkNotNullParameter(msg, "msg");
if (msg.what != 3) {
Log.w(SessionLifecycleClient.TAG, "Received unexpected event from the SessionLifecycleService: " + msg);
super.handleMessage(msg);
return;
}
Bundle data = msg.getData();
if (data == null || (str = data.getString(SessionLifecycleService.SESSION_UPDATE_EXTRA)) == null) {
str = "";
}
handleSessionUpdate(str);
}
}
/* JADX WARN: Type inference failed for: r2v2, types: [com.google.firebase.sessions.SessionLifecycleClient$serviceConnection$1] */
public SessionLifecycleClient(CoroutineContext backgroundDispatcher) {
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
this.backgroundDispatcher = backgroundDispatcher;
this.queuedMessages = new LinkedBlockingDeque<>(20);
this.serviceConnection = new ServiceConnection() { // from class: com.google.firebase.sessions.SessionLifecycleClient$serviceConnection$1
@Override // android.content.ServiceConnection
public void onServiceConnected(ComponentName className, IBinder serviceBinder) {
LinkedBlockingDeque linkedBlockingDeque;
List drainQueue;
StringBuilder sb = new StringBuilder("Connected to SessionLifecycleService. Queue size ");
linkedBlockingDeque = SessionLifecycleClient.this.queuedMessages;
sb.append(linkedBlockingDeque.size());
Log.d(SessionLifecycleClient.TAG, sb.toString());
SessionLifecycleClient.this.service = new Messenger(serviceBinder);
SessionLifecycleClient.this.serviceBound = true;
SessionLifecycleClient sessionLifecycleClient = SessionLifecycleClient.this;
drainQueue = sessionLifecycleClient.drainQueue();
sessionLifecycleClient.sendLifecycleEvents(drainQueue);
}
@Override // android.content.ServiceConnection
public void onServiceDisconnected(ComponentName className) {
Log.d(SessionLifecycleClient.TAG, "Disconnected from SessionLifecycleService");
SessionLifecycleClient.this.service = null;
SessionLifecycleClient.this.serviceBound = false;
}
};
}
/* JADX INFO: Access modifiers changed from: private */
public final List<Message> drainQueue() {
ArrayList arrayList = new ArrayList();
this.queuedMessages.drainTo(arrayList);
return arrayList;
}
/* JADX INFO: Access modifiers changed from: private */
public final Message getLatestByCode(List<Message> messages, int msgCode) {
Object obj;
ArrayList arrayList = new ArrayList();
for (Object obj2 : messages) {
if (((Message) obj2).what == msgCode) {
arrayList.add(obj2);
}
}
Iterator it = arrayList.iterator();
if (it.hasNext()) {
Object next = it.next();
if (it.hasNext()) {
long when = ((Message) next).getWhen();
do {
Object next2 = it.next();
long when2 = ((Message) next2).getWhen();
if (when < when2) {
next = next2;
when = when2;
}
} while (it.hasNext());
}
obj = next;
} else {
obj = null;
}
return (Message) obj;
}
private final void queueMessage(Message msg) {
if (!this.queuedMessages.offer(msg)) {
Log.d(TAG, "Failed to enqueue message " + msg.what + ". Dropping.");
return;
}
Log.d(TAG, "Queued message " + msg.what + ". Queue size " + this.queuedMessages.size());
}
private final void sendLifecycleEvent(int messageCode) {
List<Message> drainQueue = drainQueue();
Message obtain = Message.obtain(null, messageCode, 0, 0);
Intrinsics.checkNotNullExpressionValue(obtain, "obtain(null, messageCode, 0, 0)");
drainQueue.add(obtain);
sendLifecycleEvents(drainQueue);
}
/* JADX INFO: Access modifiers changed from: private */
public final Job sendLifecycleEvents(List<Message> messages) {
Job launch$default;
launch$default = BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(this.backgroundDispatcher), null, null, new SessionLifecycleClient$sendLifecycleEvents$1(this, messages, null), 3, null);
return launch$default;
}
/* JADX INFO: Access modifiers changed from: private */
public final void sendMessageToServer(Message msg) {
if (this.service == null) {
queueMessage(msg);
return;
}
try {
Log.d(TAG, "Sending lifecycle " + msg.what + " to service");
Messenger messenger = this.service;
if (messenger != null) {
messenger.send(msg);
}
} catch (RemoteException e4) {
Log.w(TAG, "Unable to deliver message: " + msg.what, e4);
queueMessage(msg);
}
}
public final void backgrounded() {
sendLifecycleEvent(2);
}
public final void bindToService() {
SessionLifecycleServiceBinder.INSTANCE.getInstance().bindToService(new Messenger(new ClientUpdateHandler(this.backgroundDispatcher)), this.serviceConnection);
}
public final void foregrounded() {
sendLifecycleEvent(1);
}
}

View File

@@ -0,0 +1,204 @@
package com.google.firebase.sessions;
import android.app.Service;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.Messenger;
import android.util.Log;
import com.google.firebase.sessions.SessionGenerator;
import com.google.firebase.sessions.settings.SessionsSettings;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.time.Duration;
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\b\u0000\u0018\u0000 \u00132\u00020\u0001:\u0002\u0013\u0014B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u000b\u001a\u0004\u0018\u00010\n2\u0006\u0010\f\u001a\u00020\rH\u0002J\u0014\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\u0010\f\u001a\u0004\u0018\u00010\rH\u0016J\b\u0010\u0010\u001a\u00020\u0011H\u0016J\b\u0010\u0012\u001a\u00020\u0011H\u0016R\u0014\u0010\u0003\u001a\u00020\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\t\u001a\u0004\u0018\u00010\nX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u0015"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleService;", "Landroid/app/Service;", "()V", "handlerThread", "Landroid/os/HandlerThread;", "getHandlerThread$com_google_firebase_firebase_sessions", "()Landroid/os/HandlerThread;", "messageHandler", "Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;", "messenger", "Landroid/os/Messenger;", "getClientCallback", "intent", "Landroid/content/Intent;", "onBind", "Landroid/os/IBinder;", "onCreate", "", "onDestroy", "Companion", "MessageHandler", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionLifecycleService extends Service {
public static final int BACKGROUNDED = 2;
private static final int CLIENT_BOUND = 4;
public static final String CLIENT_CALLBACK_MESSENGER = "ClientCallbackMessenger";
public static final int FOREGROUNDED = 1;
public static final int SESSION_UPDATED = 3;
public static final String SESSION_UPDATE_EXTRA = "SessionUpdateExtra";
public static final String TAG = "SessionLifecycleService";
private final HandlerThread handlerThread = new HandlerThread("FirebaseSessions_HandlerThread");
private MessageHandler messageHandler;
private Messenger messenger;
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\u000e\n\u0000\b\u0000\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\r\u001a\u00020\u000eH\u0002J\u0010\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0010\u001a\u00020\u0011H\u0002J\u0010\u0010\u0012\u001a\u00020\u000e2\u0006\u0010\u0010\u001a\u00020\u0011H\u0002J\u0010\u0010\u0013\u001a\u00020\u000e2\u0006\u0010\u0010\u001a\u00020\u0011H\u0002J\u0010\u0010\u0014\u001a\u00020\u000e2\u0006\u0010\u0010\u001a\u00020\u0011H\u0016J\u0010\u0010\u0015\u001a\u00020\n2\u0006\u0010\u0016\u001a\u00020\fH\u0002J\u0010\u0010\u0017\u001a\u00020\u000e2\u0006\u0010\u0018\u001a\u00020\u0007H\u0002J\b\u0010\u0019\u001a\u00020\u000eH\u0002J\u0018\u0010\u001a\u001a\u00020\u000e2\u0006\u0010\u0018\u001a\u00020\u00072\u0006\u0010\u001b\u001a\u00020\u001cH\u0002R\u001e\u0010\u0005\u001a\u0012\u0012\u0004\u0012\u00020\u00070\u0006j\b\u0012\u0004\u0012\u00020\u0007`\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\fX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u001d"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleService$MessageHandler;", "Landroid/os/Handler;", "looper", "Landroid/os/Looper;", "(Landroid/os/Looper;)V", "boundClients", "Ljava/util/ArrayList;", "Landroid/os/Messenger;", "Lkotlin/collections/ArrayList;", "hasForegrounded", "", "lastMsgTimeMs", "", "broadcastSession", "", "handleBackgrounding", "msg", "Landroid/os/Message;", "handleClientBound", "handleForegrounding", "handleMessage", "isSessionRestart", "foregroundTimeMs", "maybeSendSessionToClient", "client", "newSession", "sendSessionToClient", "sessionId", "", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class MessageHandler extends Handler {
private final ArrayList<Messenger> boundClients;
private boolean hasForegrounded;
private long lastMsgTimeMs;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public MessageHandler(Looper looper) {
super(looper);
Intrinsics.checkNotNullParameter(looper, "looper");
this.boundClients = new ArrayList<>();
}
private final void broadcastSession() {
StringBuilder sb = new StringBuilder("Broadcasting new session: ");
SessionGenerator.Companion companion = SessionGenerator.INSTANCE;
sb.append(companion.getInstance().getCurrentSession());
Log.d(SessionLifecycleService.TAG, sb.toString());
SessionFirelogPublisher.INSTANCE.getInstance().logSession(companion.getInstance().getCurrentSession());
for (Messenger it : new ArrayList(this.boundClients)) {
Intrinsics.checkNotNullExpressionValue(it, "it");
maybeSendSessionToClient(it);
}
}
private final void handleBackgrounding(Message msg) {
Log.d(SessionLifecycleService.TAG, "Activity backgrounding at " + msg.getWhen());
this.lastMsgTimeMs = msg.getWhen();
}
private final void handleClientBound(Message msg) {
this.boundClients.add(msg.replyTo);
Messenger messenger = msg.replyTo;
Intrinsics.checkNotNullExpressionValue(messenger, "msg.replyTo");
maybeSendSessionToClient(messenger);
Log.d(SessionLifecycleService.TAG, "Client " + msg.replyTo + " bound at " + msg.getWhen() + ". Clients: " + this.boundClients.size());
}
private final void handleForegrounding(Message msg) {
Log.d(SessionLifecycleService.TAG, "Activity foregrounding at " + msg.getWhen() + '.');
if (!this.hasForegrounded) {
Log.d(SessionLifecycleService.TAG, "Cold start detected.");
this.hasForegrounded = true;
newSession();
} else if (isSessionRestart(msg.getWhen())) {
Log.d(SessionLifecycleService.TAG, "Session too long in background. Creating new session.");
newSession();
}
this.lastMsgTimeMs = msg.getWhen();
}
private final boolean isSessionRestart(long foregroundTimeMs) {
return foregroundTimeMs - this.lastMsgTimeMs > Duration.m1473getInWholeMillisecondsimpl(SessionsSettings.INSTANCE.getInstance().m106getSessionRestartTimeoutUwyO8pc());
}
private final void maybeSendSessionToClient(Messenger client) {
if (this.hasForegrounded) {
sendSessionToClient(client, SessionGenerator.INSTANCE.getInstance().getCurrentSession().getSessionId());
return;
}
String currentSessionId = SessionDatastore.INSTANCE.getInstance().getCurrentSessionId();
Log.d(SessionLifecycleService.TAG, "App has not yet foregrounded. Using previously stored session: " + currentSessionId);
if (currentSessionId != null) {
sendSessionToClient(client, currentSessionId);
}
}
private final void newSession() {
SessionGenerator.Companion companion = SessionGenerator.INSTANCE;
companion.getInstance().generateNewSession();
Log.d(SessionLifecycleService.TAG, "Generated new session " + companion.getInstance().getCurrentSession().getSessionId());
broadcastSession();
SessionDatastore.INSTANCE.getInstance().updateSessionId(companion.getInstance().getCurrentSession().getSessionId());
}
private final void sendSessionToClient(Messenger client, String sessionId) {
try {
Bundle bundle = new Bundle();
bundle.putString(SessionLifecycleService.SESSION_UPDATE_EXTRA, sessionId);
Message obtain = Message.obtain(null, 3, 0, 0);
obtain.setData(bundle);
client.send(obtain);
} catch (DeadObjectException unused) {
Log.d(SessionLifecycleService.TAG, "Removing dead client from list: " + client);
this.boundClients.remove(client);
} catch (Exception e4) {
Log.w(SessionLifecycleService.TAG, "Unable to push new session to " + client + '.', e4);
}
}
@Override // android.os.Handler
public void handleMessage(Message msg) {
Intrinsics.checkNotNullParameter(msg, "msg");
if (this.lastMsgTimeMs > msg.getWhen()) {
Log.d(SessionLifecycleService.TAG, "Ignoring old message from " + msg.getWhen() + " which is older than " + this.lastMsgTimeMs + '.');
return;
}
int i = msg.what;
if (i == 1) {
handleForegrounding(msg);
return;
}
if (i == 2) {
handleBackgrounding(msg);
return;
}
if (i == 4) {
handleClientBound(msg);
return;
}
Log.w(SessionLifecycleService.TAG, "Received unexpected event from the SessionLifecycleClient: " + msg);
super.handleMessage(msg);
}
}
private final Messenger getClientCallback(Intent intent) {
Object parcelableExtra;
if (Build.VERSION.SDK_INT < 33) {
return (Messenger) intent.getParcelableExtra(CLIENT_CALLBACK_MESSENGER);
}
parcelableExtra = intent.getParcelableExtra(CLIENT_CALLBACK_MESSENGER, Messenger.class);
return (Messenger) parcelableExtra;
}
/* renamed from: getHandlerThread$com_google_firebase_firebase_sessions, reason: from getter */
public final HandlerThread getHandlerThread() {
return this.handlerThread;
}
@Override // android.app.Service
public IBinder onBind(Intent intent) {
if (intent == null) {
Log.d(TAG, "Service bound with null intent. Ignoring.");
return null;
}
Log.d(TAG, "Service bound to new client on process " + intent.getAction());
Messenger clientCallback = getClientCallback(intent);
if (clientCallback != null) {
Message obtain = Message.obtain(null, 4, 0, 0);
obtain.replyTo = clientCallback;
MessageHandler messageHandler = this.messageHandler;
if (messageHandler != null) {
messageHandler.sendMessage(obtain);
}
}
Messenger messenger = this.messenger;
if (messenger != null) {
return messenger.getBinder();
}
return null;
}
@Override // android.app.Service
public void onCreate() {
super.onCreate();
this.handlerThread.start();
Looper looper = this.handlerThread.getLooper();
Intrinsics.checkNotNullExpressionValue(looper, "handlerThread.looper");
this.messageHandler = new MessageHandler(looper);
this.messenger = new Messenger(this.messageHandler);
}
@Override // android.app.Service
public void onDestroy() {
super.onDestroy();
this.handlerThread.quit();
}
}

View File

@@ -0,0 +1,33 @@
package com.google.firebase.sessions;
import android.content.ServiceConnection;
import android.os.Messenger;
import com.google.firebase.Firebase;
import com.google.firebase.FirebaseKt;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bà\u0080\u0001\u0018\u0000 \b2\u00020\u0001:\u0001\bJ\u0018\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007H&¨\u0006\t"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleServiceBinder;", "", "bindToService", "", "callback", "Landroid/os/Messenger;", "serviceConnection", "Landroid/content/ServiceConnection;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface SessionLifecycleServiceBinder {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = Companion.$$INSTANCE;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u00048F¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleServiceBinder$Companion;", "", "()V", "instance", "Lcom/google/firebase/sessions/SessionLifecycleServiceBinder;", "getInstance", "()Lcom/google/firebase/sessions/SessionLifecycleServiceBinder;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private Companion() {
}
public final SessionLifecycleServiceBinder getInstance() {
Object obj = FirebaseKt.getApp(Firebase.INSTANCE).get(SessionLifecycleServiceBinder.class);
Intrinsics.checkNotNullExpressionValue(obj, "Firebase.app[SessionLife…erviceBinder::class.java]");
return (SessionLifecycleServiceBinder) obj;
}
}
void bindToService(Messenger callback, ServiceConnection serviceConnection);
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.sessions;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Messenger;
import android.os.Process;
import android.util.Log;
import com.google.firebase.FirebaseApp;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0000\u0018\u0000 \u000b2\u00020\u0001:\u0001\u000bB\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0018\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\nH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"Lcom/google/firebase/sessions/SessionLifecycleServiceBinderImpl;", "Lcom/google/firebase/sessions/SessionLifecycleServiceBinder;", "firebaseApp", "Lcom/google/firebase/FirebaseApp;", "(Lcom/google/firebase/FirebaseApp;)V", "bindToService", "", "callback", "Landroid/os/Messenger;", "serviceConnection", "Landroid/content/ServiceConnection;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionLifecycleServiceBinderImpl implements SessionLifecycleServiceBinder {
public static final String TAG = "LifecycleServiceBinder";
private final FirebaseApp firebaseApp;
public SessionLifecycleServiceBinderImpl(FirebaseApp firebaseApp) {
Intrinsics.checkNotNullParameter(firebaseApp, "firebaseApp");
this.firebaseApp = firebaseApp;
}
@Override // com.google.firebase.sessions.SessionLifecycleServiceBinder
public void bindToService(Messenger callback, ServiceConnection serviceConnection) {
Intrinsics.checkNotNullParameter(callback, "callback");
Intrinsics.checkNotNullParameter(serviceConnection, "serviceConnection");
Context applicationContext = this.firebaseApp.getApplicationContext().getApplicationContext();
Intent intent = new Intent(applicationContext, (Class<?>) SessionLifecycleService.class);
Log.d(TAG, "Binding service to application.");
intent.setAction(String.valueOf(Process.myPid()));
intent.putExtra(SessionLifecycleService.CLIENT_CALLBACK_MESSENGER, callback);
applicationContext.bindService(intent, serviceConnection, 65);
}
}

View File

@@ -0,0 +1,94 @@
package com.google.firebase.sessions;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001a\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u00132\b\u0010\u0014\u001a\u0004\u0018\u00010\u0015H\u0016J\u0010\u0010\u0016\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0013H\u0016J\u0010\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0013H\u0016J\u0010\u0010\u0018\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0013H\u0016J\u0018\u0010\u0019\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u001a\u001a\u00020\u0015H\u0016J\u0010\u0010\u001b\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0013H\u0016J\u0010\u0010\u001c\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0013H\u0016R$\u0010\u0003\u001a\u00020\u00048\u0000@\u0000X\u0081\u000e¢\u0006\u0014\n\u0000\u0012\u0004\b\u0005\u0010\u0002\u001a\u0004\b\u0006\u0010\u0007\"\u0004\b\b\u0010\tR(\u0010\n\u001a\u0004\u0018\u00010\u000b2\b\u0010\n\u001a\u0004\u0018\u00010\u000b@FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\f\u0010\r\"\u0004\b\u000e\u0010\u000f¨\u0006\u001d"}, d2 = {"Lcom/google/firebase/sessions/SessionsActivityLifecycleCallbacks;", "Landroid/app/Application$ActivityLifecycleCallbacks;", "()V", "hasPendingForeground", "", "getHasPendingForeground$com_google_firebase_firebase_sessions$annotations", "getHasPendingForeground$com_google_firebase_firebase_sessions", "()Z", "setHasPendingForeground$com_google_firebase_firebase_sessions", "(Z)V", "lifecycleClient", "Lcom/google/firebase/sessions/SessionLifecycleClient;", "getLifecycleClient", "()Lcom/google/firebase/sessions/SessionLifecycleClient;", "setLifecycleClient", "(Lcom/google/firebase/sessions/SessionLifecycleClient;)V", "onActivityCreated", "", "activity", "Landroid/app/Activity;", "savedInstanceState", "Landroid/os/Bundle;", "onActivityDestroyed", "onActivityPaused", "onActivityResumed", "onActivitySaveInstanceState", "outState", "onActivityStarted", "onActivityStopped", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionsActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks {
public static final SessionsActivityLifecycleCallbacks INSTANCE = new SessionsActivityLifecycleCallbacks();
private static boolean hasPendingForeground;
private static SessionLifecycleClient lifecycleClient;
private SessionsActivityLifecycleCallbacks() {
}
public static /* synthetic */ void getHasPendingForeground$com_google_firebase_firebase_sessions$annotations() {
}
public final boolean getHasPendingForeground$com_google_firebase_firebase_sessions() {
return hasPendingForeground;
}
public final SessionLifecycleClient getLifecycleClient() {
return lifecycleClient;
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
Intrinsics.checkNotNullParameter(activity, "activity");
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityDestroyed(Activity activity) {
Intrinsics.checkNotNullParameter(activity, "activity");
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityPaused(Activity activity) {
Intrinsics.checkNotNullParameter(activity, "activity");
SessionLifecycleClient sessionLifecycleClient = lifecycleClient;
if (sessionLifecycleClient != null) {
sessionLifecycleClient.backgrounded();
}
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityResumed(Activity activity) {
Unit unit;
Intrinsics.checkNotNullParameter(activity, "activity");
SessionLifecycleClient sessionLifecycleClient = lifecycleClient;
if (sessionLifecycleClient != null) {
sessionLifecycleClient.foregrounded();
unit = Unit.INSTANCE;
} else {
unit = null;
}
if (unit == null) {
hasPendingForeground = true;
}
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(outState, "outState");
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityStarted(Activity activity) {
Intrinsics.checkNotNullParameter(activity, "activity");
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityStopped(Activity activity) {
Intrinsics.checkNotNullParameter(activity, "activity");
}
public final void setHasPendingForeground$com_google_firebase_firebase_sessions(boolean z3) {
hasPendingForeground = z3;
}
public final void setLifecycleClient(SessionLifecycleClient sessionLifecycleClient) {
lifecycleClient = sessionLifecycleClient;
if (sessionLifecycleClient == null || !hasPendingForeground) {
return;
}
hasPendingForeground = false;
sessionLifecycleClient.foregrounded();
}
}

View File

@@ -0,0 +1,12 @@
package com.google.firebase.sessions;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b`\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H&J\u0018\u0010\u0004\u001a\u00020\u0005H&ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\b\u0006\u0010\u0007\u0082\u0002\u000f\n\u0002\b!\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\b"}, d2 = {"Lcom/google/firebase/sessions/TimeProvider;", "", "currentTimeUs", "", "elapsedRealtime", "Lkotlin/time/Duration;", "elapsedRealtime-UwyO8pc", "()J", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface TimeProvider {
long currentTimeUs();
/* renamed from: elapsedRealtime-UwyO8pc, reason: not valid java name */
long mo103elapsedRealtimeUwyO8pc();
}

View File

@@ -0,0 +1,29 @@
package com.google.firebase.sessions;
import android.os.SystemClock;
import kotlin.Metadata;
import kotlin.time.Duration;
import kotlin.time.DurationKt;
import kotlin.time.DurationUnit;
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\b\u0010\u0005\u001a\u00020\u0004H\u0016J\u0018\u0010\u0006\u001a\u00020\u0007H\u0016ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\b\b\u0010\tR\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b!\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\n"}, d2 = {"Lcom/google/firebase/sessions/WallClock;", "Lcom/google/firebase/sessions/TimeProvider;", "()V", "US_PER_MILLIS", "", "currentTimeUs", "elapsedRealtime", "Lkotlin/time/Duration;", "elapsedRealtime-UwyO8pc", "()J", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class WallClock implements TimeProvider {
public static final WallClock INSTANCE = new WallClock();
private static final long US_PER_MILLIS = 1000;
private WallClock() {
}
@Override // com.google.firebase.sessions.TimeProvider
public long currentTimeUs() {
return System.currentTimeMillis() * 1000;
}
@Override // com.google.firebase.sessions.TimeProvider
/* renamed from: elapsedRealtime-UwyO8pc */
public long mo103elapsedRealtimeUwyO8pc() {
Duration.Companion companion = Duration.INSTANCE;
return DurationKt.toDuration(SystemClock.elapsedRealtime(), DurationUnit.MILLISECONDS);
}
}

View File

@@ -0,0 +1,13 @@
package com.google.firebase.sessions;
import com.google.firebase.FirebaseAppLifecycleListener;
import com.google.firebase.FirebaseOptions;
import com.google.firebase.sessions.FirebaseSessions;
/* loaded from: classes3.dex */
public final /* synthetic */ class a implements FirebaseAppLifecycleListener {
@Override // com.google.firebase.FirebaseAppLifecycleListener
public final void onDeleted(String str, FirebaseOptions firebaseOptions) {
FirebaseSessions.AnonymousClass1.m96invokeSuspend$lambda1(str, firebaseOptions);
}
}

View File

@@ -0,0 +1,35 @@
package com.google.firebase.sessions.api;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.api.FirebaseSessionsDependencies", f = "FirebaseSessionsDependencies.kt", i = {0, 0, 0}, l = {123}, m = "getRegisteredSubscribers$com_google_firebase_firebase_sessions", n = {"destination$iv$iv", "subscriberName", "$this$withLock_u24default$iv"}, s = {"L$0", "L$2", "L$3"})
/* loaded from: classes3.dex */
public final class FirebaseSessionsDependencies$getRegisteredSubscribers$1 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
int label;
/* synthetic */ Object result;
final /* synthetic */ FirebaseSessionsDependencies this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FirebaseSessionsDependencies$getRegisteredSubscribers$1(FirebaseSessionsDependencies firebaseSessionsDependencies, Continuation<? super FirebaseSessionsDependencies$getRegisteredSubscribers$1> continuation) {
super(continuation);
this.this$0 = firebaseSessionsDependencies;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
return this.this$0.getRegisteredSubscribers$com_google_firebase_firebase_sessions(this);
}
}

View File

@@ -0,0 +1,259 @@
package com.google.firebase.sessions.api;
import android.util.Log;
import com.google.firebase.sessions.api.SessionSubscriber;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.sync.Mutex;
import kotlinx.coroutines.sync.MutexKt;
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010%\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010$\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\n\bÆ\u0002\u0018\u00002\u00020\u0001:\u0001\u0019B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u000e\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u0007J\u0010\u0010\u000e\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\u0007H\u0002J\u001f\u0010\u000f\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00100\nH\u0080@ø\u0001\u0000¢\u0006\u0004\b\u0011\u0010\u0012J\u0015\u0010\u0013\u001a\u00020\u00102\u0006\u0010\r\u001a\u00020\u0007H\u0001¢\u0006\u0002\b\u0014J\u0010\u0010\u0015\u001a\u00020\f2\u0006\u0010\u0016\u001a\u00020\u0010H\u0007J\r\u0010\u0017\u001a\u00020\fH\u0001¢\u0006\u0002\b\u0018R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000RN\u0010\u0005\u001aB\u0012\f\u0012\n \b*\u0004\u0018\u00010\u00070\u0007\u0012\f\u0012\n \b*\u0004\u0018\u00010\t0\t \b* \u0012\f\u0012\n \b*\u0004\u0018\u00010\u00070\u0007\u0012\f\u0012\n \b*\u0004\u0018\u00010\t0\t\u0018\u00010\n0\u0006X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001a"}, d2 = {"Lcom/google/firebase/sessions/api/FirebaseSessionsDependencies;", "", "()V", "TAG", "", "dependencies", "", "Lcom/google/firebase/sessions/api/SessionSubscriber$Name;", "kotlin.jvm.PlatformType", "Lcom/google/firebase/sessions/api/FirebaseSessionsDependencies$Dependency;", "", "addDependency", "", "subscriberName", "getDependency", "getRegisteredSubscribers", "Lcom/google/firebase/sessions/api/SessionSubscriber;", "getRegisteredSubscribers$com_google_firebase_firebase_sessions", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "getSubscriber", "getSubscriber$com_google_firebase_firebase_sessions", "register", "subscriber", "reset", "reset$com_google_firebase_firebase_sessions", "Dependency", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class FirebaseSessionsDependencies {
private static final String TAG = "SessionsDependencies";
public static final FirebaseSessionsDependencies INSTANCE = new FirebaseSessionsDependencies();
private static final Map<SessionSubscriber.Name, Dependency> dependencies = Collections.synchronizedMap(new LinkedHashMap());
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0082\b\u0018\u00002\u00020\u0001B\u0019\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\u0002\u0010\u0006J\t\u0010\r\u001a\u00020\u0003HÆ\u0003J\u000b\u0010\u000e\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\u001f\u0010\u000f\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0005HÆ\u0001J\u0013\u0010\u0010\u001a\u00020\u00112\b\u0010\u0012\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0013\u001a\u00020\u0014HÖ\u0001J\t\u0010\u0015\u001a\u00020\u0016HÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u001c\u0010\u0004\u001a\u0004\u0018\u00010\u0005X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\t\u0010\n\"\u0004\b\u000b\u0010\f¨\u0006\u0017"}, d2 = {"Lcom/google/firebase/sessions/api/FirebaseSessionsDependencies$Dependency;", "", "mutex", "Lkotlinx/coroutines/sync/Mutex;", "subscriber", "Lcom/google/firebase/sessions/api/SessionSubscriber;", "(Lkotlinx/coroutines/sync/Mutex;Lcom/google/firebase/sessions/api/SessionSubscriber;)V", "getMutex", "()Lkotlinx/coroutines/sync/Mutex;", "getSubscriber", "()Lcom/google/firebase/sessions/api/SessionSubscriber;", "setSubscriber", "(Lcom/google/firebase/sessions/api/SessionSubscriber;)V", "component1", "component2", "copy", "equals", "", "other", "hashCode", "", "toString", "", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final /* data */ class Dependency {
private final Mutex mutex;
private SessionSubscriber subscriber;
public Dependency(Mutex mutex, SessionSubscriber sessionSubscriber) {
Intrinsics.checkNotNullParameter(mutex, "mutex");
this.mutex = mutex;
this.subscriber = sessionSubscriber;
}
public static /* synthetic */ Dependency copy$default(Dependency dependency, Mutex mutex, SessionSubscriber sessionSubscriber, int i, Object obj) {
if ((i & 1) != 0) {
mutex = dependency.mutex;
}
if ((i & 2) != 0) {
sessionSubscriber = dependency.subscriber;
}
return dependency.copy(mutex, sessionSubscriber);
}
/* renamed from: component1, reason: from getter */
public final Mutex getMutex() {
return this.mutex;
}
/* renamed from: component2, reason: from getter */
public final SessionSubscriber getSubscriber() {
return this.subscriber;
}
public final Dependency copy(Mutex mutex, SessionSubscriber subscriber) {
Intrinsics.checkNotNullParameter(mutex, "mutex");
return new Dependency(mutex, subscriber);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof Dependency)) {
return false;
}
Dependency dependency = (Dependency) other;
return Intrinsics.areEqual(this.mutex, dependency.mutex) && Intrinsics.areEqual(this.subscriber, dependency.subscriber);
}
public final Mutex getMutex() {
return this.mutex;
}
public final SessionSubscriber getSubscriber() {
return this.subscriber;
}
public int hashCode() {
int hashCode = this.mutex.hashCode() * 31;
SessionSubscriber sessionSubscriber = this.subscriber;
return hashCode + (sessionSubscriber == null ? 0 : sessionSubscriber.hashCode());
}
public final void setSubscriber(SessionSubscriber sessionSubscriber) {
this.subscriber = sessionSubscriber;
}
public String toString() {
return "Dependency(mutex=" + this.mutex + ", subscriber=" + this.subscriber + ')';
}
public /* synthetic */ Dependency(Mutex mutex, SessionSubscriber sessionSubscriber, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(mutex, (i & 2) != 0 ? null : sessionSubscriber);
}
}
private FirebaseSessionsDependencies() {
}
private final Dependency getDependency(SessionSubscriber.Name subscriberName) {
Map<SessionSubscriber.Name, Dependency> dependencies2 = dependencies;
Intrinsics.checkNotNullExpressionValue(dependencies2, "dependencies");
Dependency dependency = dependencies2.get(subscriberName);
if (dependency != null) {
Intrinsics.checkNotNullExpressionValue(dependency, "dependencies.getOrElse(s…load time.\"\n )\n }");
return dependency;
}
throw new IllegalStateException("Cannot get dependency " + subscriberName + ". Dependencies should be added at class load time.");
}
@JvmStatic
public static final void register(SessionSubscriber subscriber) {
Intrinsics.checkNotNullParameter(subscriber, "subscriber");
SessionSubscriber.Name sessionSubscriberName = subscriber.getSessionSubscriberName();
Dependency dependency = INSTANCE.getDependency(sessionSubscriberName);
if (dependency.getSubscriber() != null) {
Log.d(TAG, "Subscriber " + sessionSubscriberName + " already registered.");
return;
}
dependency.setSubscriber(subscriber);
Log.d(TAG, "Subscriber " + sessionSubscriberName + " registered.");
Mutex.DefaultImpls.unlock$default(dependency.getMutex(), null, 1, null);
}
/* JADX WARN: Multi-variable type inference failed */
public final void addDependency(SessionSubscriber.Name subscriberName) {
Intrinsics.checkNotNullParameter(subscriberName, "subscriberName");
if (subscriberName == SessionSubscriber.Name.PERFORMANCE) {
throw new IllegalArgumentException("Incompatible versions of Firebase Perf and Firebase Sessions.\nA safe combination would be:\n firebase-sessions:1.1.0\n firebase-crashlytics:18.5.0\n firebase-perf:20.5.0\nFor more information contact Firebase Support.");
}
Map<SessionSubscriber.Name, Dependency> dependencies2 = dependencies;
if (dependencies2.containsKey(subscriberName)) {
Log.d(TAG, "Dependency " + subscriberName + " already added.");
return;
}
Intrinsics.checkNotNullExpressionValue(dependencies2, "dependencies");
dependencies2.put(subscriberName, new Dependency(MutexKt.Mutex(true), null, 2, 0 == true ? 1 : 0));
Log.d(TAG, "Dependency to " + subscriberName + " added.");
}
/* JADX WARN: Removed duplicated region for block: B:15:0x006f */
/* JADX WARN: Removed duplicated region for block: B:20:0x00b3 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:27:0x0048 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x009f -> B:10:0x00a0). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object getRegisteredSubscribers$com_google_firebase_firebase_sessions(kotlin.coroutines.Continuation<? super java.util.Map<com.google.firebase.sessions.api.SessionSubscriber.Name, ? extends com.google.firebase.sessions.api.SessionSubscriber>> r10) {
/*
r9 = this;
boolean r0 = r10 instanceof com.google.firebase.sessions.api.FirebaseSessionsDependencies$getRegisteredSubscribers$1
if (r0 == 0) goto L13
r0 = r10
com.google.firebase.sessions.api.FirebaseSessionsDependencies$getRegisteredSubscribers$1 r0 = (com.google.firebase.sessions.api.FirebaseSessionsDependencies$getRegisteredSubscribers$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.google.firebase.sessions.api.FirebaseSessionsDependencies$getRegisteredSubscribers$1 r0 = new com.google.firebase.sessions.api.FirebaseSessionsDependencies$getRegisteredSubscribers$1
r0.<init>(r9, r10)
L18:
java.lang.Object r9 = r0.result
java.lang.Object r10 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r1 = r0.label
r2 = 1
r3 = 0
if (r1 == 0) goto L48
if (r1 != r2) goto L40
java.lang.Object r1 = r0.L$5
java.lang.Object r4 = r0.L$4
java.util.Map r4 = (java.util.Map) r4
java.lang.Object r5 = r0.L$3
kotlinx.coroutines.sync.Mutex r5 = (kotlinx.coroutines.sync.Mutex) r5
java.lang.Object r6 = r0.L$2
com.google.firebase.sessions.api.SessionSubscriber$Name r6 = (com.google.firebase.sessions.api.SessionSubscriber.Name) r6
java.lang.Object r7 = r0.L$1
java.util.Iterator r7 = (java.util.Iterator) r7
java.lang.Object r8 = r0.L$0
java.util.Map r8 = (java.util.Map) r8
kotlin.ResultKt.throwOnFailure(r9)
goto La0
L40:
java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
java.lang.String r10 = "call to 'resume' before 'invoke' with coroutine"
r9.<init>(r10)
throw r9
L48:
kotlin.ResultKt.throwOnFailure(r9)
java.util.Map<com.google.firebase.sessions.api.SessionSubscriber$Name, com.google.firebase.sessions.api.FirebaseSessionsDependencies$Dependency> r9 = com.google.firebase.sessions.api.FirebaseSessionsDependencies.dependencies
java.lang.String r1 = "dependencies"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r9, r1)
java.util.LinkedHashMap r1 = new java.util.LinkedHashMap
int r4 = r9.size()
int r4 = kotlin.collections.MapsKt.mapCapacity(r4)
r1.<init>(r4)
java.util.Set r9 = r9.entrySet()
java.util.Iterator r9 = r9.iterator()
r7 = r9
r4 = r1
L69:
boolean r9 = r7.hasNext()
if (r9 == 0) goto Lb3
java.lang.Object r9 = r7.next()
java.util.Map$Entry r9 = (java.util.Map.Entry) r9
java.lang.Object r1 = r9.getKey()
java.lang.Object r5 = r9.getKey()
r6 = r5
com.google.firebase.sessions.api.SessionSubscriber$Name r6 = (com.google.firebase.sessions.api.SessionSubscriber.Name) r6
java.lang.Object r9 = r9.getValue()
com.google.firebase.sessions.api.FirebaseSessionsDependencies$Dependency r9 = (com.google.firebase.sessions.api.FirebaseSessionsDependencies.Dependency) r9
kotlinx.coroutines.sync.Mutex r5 = r9.getMutex()
r0.L$0 = r4
r0.L$1 = r7
r0.L$2 = r6
r0.L$3 = r5
r0.L$4 = r4
r0.L$5 = r1
r0.label = r2
java.lang.Object r9 = r5.lock(r3, r0)
if (r9 != r10) goto L9f
return r10
L9f:
r8 = r4
La0:
com.google.firebase.sessions.api.FirebaseSessionsDependencies r9 = com.google.firebase.sessions.api.FirebaseSessionsDependencies.INSTANCE // Catch: java.lang.Throwable -> Lae
com.google.firebase.sessions.api.SessionSubscriber r9 = r9.getSubscriber$com_google_firebase_firebase_sessions(r6) // Catch: java.lang.Throwable -> Lae
r5.unlock(r3)
r4.put(r1, r9)
r4 = r8
goto L69
Lae:
r9 = move-exception
r5.unlock(r3)
throw r9
Lb3:
return r4
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.api.FirebaseSessionsDependencies.getRegisteredSubscribers$com_google_firebase_firebase_sessions(kotlin.coroutines.Continuation):java.lang.Object");
}
public final SessionSubscriber getSubscriber$com_google_firebase_firebase_sessions(SessionSubscriber.Name subscriberName) {
Intrinsics.checkNotNullParameter(subscriberName, "subscriberName");
SessionSubscriber subscriber = getDependency(subscriberName).getSubscriber();
if (subscriber != null) {
return subscriber;
}
throw new IllegalStateException("Subscriber " + subscriberName + " has not been registered.");
}
public final void reset$com_google_firebase_firebase_sessions() {
dependencies.clear();
}
}

View File

@@ -0,0 +1,71 @@
package com.google.firebase.sessions.api;
import com.google.android.gms.measurement.internal.a;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001:\u0002\r\u000eJ\u0010\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\fH&R\u0012\u0010\u0002\u001a\u00020\u0003X¦\u0004¢\u0006\u0006\u001a\u0004\b\u0002\u0010\u0004R\u0012\u0010\u0005\u001a\u00020\u0006X¦\u0004¢\u0006\u0006\u001a\u0004\b\u0007\u0010\b¨\u0006\u000f"}, d2 = {"Lcom/google/firebase/sessions/api/SessionSubscriber;", "", "isDataCollectionEnabled", "", "()Z", "sessionSubscriberName", "Lcom/google/firebase/sessions/api/SessionSubscriber$Name;", "getSessionSubscriberName", "()Lcom/google/firebase/sessions/api/SessionSubscriber$Name;", "onSessionChanged", "", "sessionDetails", "Lcom/google/firebase/sessions/api/SessionSubscriber$SessionDetails;", "Name", "SessionDetails", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface SessionSubscriber {
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0005\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005¨\u0006\u0006"}, d2 = {"Lcom/google/firebase/sessions/api/SessionSubscriber$Name;", "", "(Ljava/lang/String;I)V", "CRASHLYTICS", "PERFORMANCE", "MATT_SAYS_HI", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public enum Name {
CRASHLYTICS,
PERFORMANCE,
MATT_SAYS_HI
}
@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\t\u0010\u0007\u001a\u00020\u0003HÆ\u0003J\u0013\u0010\b\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\t\u001a\u00020\n2\b\u0010\u000b\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\f\u001a\u00020\rHÖ\u0001J\t\u0010\u000e\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u000f"}, d2 = {"Lcom/google/firebase/sessions/api/SessionSubscriber$SessionDetails;", "", "sessionId", "", "(Ljava/lang/String;)V", "getSessionId", "()Ljava/lang/String;", "component1", "copy", "equals", "", "other", "hashCode", "", "toString", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final /* data */ class SessionDetails {
private final String sessionId;
public SessionDetails(String sessionId) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
this.sessionId = sessionId;
}
public static /* synthetic */ SessionDetails copy$default(SessionDetails sessionDetails, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = sessionDetails.sessionId;
}
return sessionDetails.copy(str);
}
/* renamed from: component1, reason: from getter */
public final String getSessionId() {
return this.sessionId;
}
public final SessionDetails copy(String sessionId) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
return new SessionDetails(sessionId);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
return (other instanceof SessionDetails) && Intrinsics.areEqual(this.sessionId, ((SessionDetails) other).sessionId);
}
public final String getSessionId() {
return this.sessionId;
}
public int hashCode() {
return this.sessionId.hashCode();
}
public String toString() {
return a.n(new StringBuilder("SessionDetails(sessionId="), this.sessionId, ')');
}
}
Name getSessionSubscriberName();
boolean isDataCollectionEnabled();
void onSessionChanged(SessionDetails sessionDetails);
}

View File

@@ -0,0 +1,15 @@
package com.google.firebase.sessions.settings;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import org.json.JSONObject;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\bà\u0080\u0001\u0018\u00002\u00020\u0001J|\u0010\u0002\u001a\u00020\u00032\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00060\u00052\"\u0010\u0007\u001a\u001e\b\u0001\u0012\u0004\u0012\u00020\t\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00030\n\u0012\u0006\u0012\u0004\u0018\u00010\u00010\b21\u0010\u000b\u001a-\b\u0001\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\f\u0012\b\b\r\u0012\u0004\b\b(\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00030\n\u0012\u0006\u0012\u0004\u0018\u00010\u00010\bH¦@ø\u0001\u0000¢\u0006\u0002\u0010\u000f\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0010"}, d2 = {"Lcom/google/firebase/sessions/settings/CrashlyticsSettingsFetcher;", "", "doConfigFetch", "", "headerOptions", "", "", "onSuccess", "Lkotlin/Function2;", "Lorg/json/JSONObject;", "Lkotlin/coroutines/Continuation;", "onFailure", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "msg", "(Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface CrashlyticsSettingsFetcher {
Object doConfigFetch(Map<String, String> map, Function2<? super JSONObject, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super String, ? super Continuation<? super Unit>, ? extends Object> function22, Continuation<? super Unit> continuation);
}

View File

@@ -0,0 +1,84 @@
package com.google.firebase.sessions.settings;
import android.content.Context;
import android.os.Bundle;
import com.google.firebase.sessions.settings.SettingsProvider;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.time.Duration;
import kotlin.time.DurationKt;
import kotlin.time.DurationUnit;
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0000\u0018\u0000 \u00162\u00020\u0001:\u0001\u0016B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004R\u001c\u0010\u0005\u001a\n \u0007*\u0004\u0018\u00010\u00060\u0006X\u0082\u0004¢\u0006\b\n\u0000\u0012\u0004\b\b\u0010\tR\u0016\u0010\n\u001a\u0004\u0018\u00010\u000b8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\f\u0010\rR\u0016\u0010\u000e\u001a\u0004\u0018\u00010\u000f8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u001f\u0010\u0012\u001a\u0004\u0018\u00010\u00138VX\u0096\u0004ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b\u0014\u0010\u0015\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006\u0017"}, d2 = {"Lcom/google/firebase/sessions/settings/LocalOverrideSettings;", "Lcom/google/firebase/sessions/settings/SettingsProvider;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "metadata", "Landroid/os/Bundle;", "kotlin.jvm.PlatformType", "getMetadata$annotations", "()V", "samplingRate", "", "getSamplingRate", "()Ljava/lang/Double;", "sessionEnabled", "", "getSessionEnabled", "()Ljava/lang/Boolean;", "sessionRestartTimeout", "Lkotlin/time/Duration;", "getSessionRestartTimeout-FghU774", "()Lkotlin/time/Duration;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class LocalOverrideSettings implements SettingsProvider {
private static final Companion Companion = new Companion(null);
@Deprecated
public static final String SAMPLING_RATE = "firebase_sessions_sampling_rate";
@Deprecated
public static final String SESSIONS_ENABLED = "firebase_sessions_enabled";
@Deprecated
public static final String SESSION_RESTART_TIMEOUT = "firebase_sessions_sessions_restart_timeout";
private final Bundle metadata;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0082\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0007"}, d2 = {"Lcom/google/firebase/sessions/settings/LocalOverrideSettings$Companion;", "", "()V", "SAMPLING_RATE", "", "SESSIONS_ENABLED", "SESSION_RESTART_TIMEOUT", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public LocalOverrideSettings(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
Bundle bundle = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData;
this.metadata = bundle == null ? Bundle.EMPTY : bundle;
}
private static /* synthetic */ void getMetadata$annotations() {
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public Double getSamplingRate() {
if (this.metadata.containsKey(SAMPLING_RATE)) {
return Double.valueOf(this.metadata.getDouble(SAMPLING_RATE));
}
return null;
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public Boolean getSessionEnabled() {
if (this.metadata.containsKey(SESSIONS_ENABLED)) {
return Boolean.valueOf(this.metadata.getBoolean(SESSIONS_ENABLED));
}
return null;
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
/* renamed from: getSessionRestartTimeout-FghU774, reason: not valid java name */
public Duration mo104getSessionRestartTimeoutFghU774() {
if (this.metadata.containsKey(SESSION_RESTART_TIMEOUT)) {
return Duration.m1453boximpl(DurationKt.toDuration(this.metadata.getInt(SESSION_RESTART_TIMEOUT), DurationUnit.SECONDS));
}
return null;
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public boolean isSettingsStale() {
return SettingsProvider.DefaultImpls.isSettingsStale(this);
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public Object updateSettings(Continuation<? super Unit> continuation) {
return SettingsProvider.DefaultImpls.updateSettings(this, continuation);
}
}

View File

@@ -0,0 +1,56 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.RemoteSettings$clearCachedSettings$1", f = "RemoteSettings.kt", i = {}, l = {151}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class RemoteSettings$clearCachedSettings$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
int label;
final /* synthetic */ RemoteSettings this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RemoteSettings$clearCachedSettings$1(RemoteSettings remoteSettings, Continuation<? super RemoteSettings$clearCachedSettings$1> continuation) {
super(2, continuation);
this.this$0 = remoteSettings;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new RemoteSettings$clearCachedSettings$1(this.this$0, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
SettingsCache settingsCache;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
settingsCache = this.this$0.settingsCache;
this.label = 1;
if (settingsCache.removeConfigs$com_google_firebase_firebase_sessions(this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((RemoteSettings$clearCachedSettings$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,31 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.RemoteSettings", f = "RemoteSettings.kt", i = {0, 0, 1, 1, 2}, l = {170, 76, 94}, m = "updateSettings", n = {"this", "$this$withLock_u24default$iv", "this", "$this$withLock_u24default$iv", "$this$withLock_u24default$iv"}, s = {"L$0", "L$1", "L$0", "L$1", "L$0"})
/* loaded from: classes3.dex */
public final class RemoteSettings$updateSettings$1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
final /* synthetic */ RemoteSettings this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RemoteSettings$updateSettings$1(RemoteSettings remoteSettings, Continuation<? super RemoteSettings$updateSettings$1> continuation) {
super(continuation);
this.this$0 = remoteSettings;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
return this.this$0.updateSettings(this);
}
}

View File

@@ -0,0 +1,83 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import org.json.JSONObject;
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\u008a@"}, d2 = {"<anonymous>", "", "it", "Lorg/json/JSONObject;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.RemoteSettings$updateSettings$2$1", f = "RemoteSettings.kt", i = {0, 0, 0, 1, 1, 2}, l = {125, 128, 131, 133, 134, 136}, m = "invokeSuspend", n = {"sessionSamplingRate", "sessionTimeoutSeconds", "cacheDuration", "sessionSamplingRate", "cacheDuration", "cacheDuration"}, s = {"L$0", "L$1", "L$2", "L$0", "L$1", "L$0"})
/* loaded from: classes3.dex */
public final class RemoteSettings$updateSettings$2$1 extends SuspendLambda implements Function2<JSONObject, Continuation<? super Unit>, Object> {
/* synthetic */ Object L$0;
Object L$1;
Object L$2;
int label;
final /* synthetic */ RemoteSettings this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RemoteSettings$updateSettings$2$1(RemoteSettings remoteSettings, Continuation<? super RemoteSettings$updateSettings$2$1> continuation) {
super(2, continuation);
this.this$0 = remoteSettings;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
RemoteSettings$updateSettings$2$1 remoteSettings$updateSettings$2$1 = new RemoteSettings$updateSettings$2$1(this.this$0, continuation);
remoteSettings$updateSettings$2$1.L$0 = obj;
return remoteSettings$updateSettings$2$1;
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0192, code lost:
if (r13.updateSessionCacheUpdatedTime(r0, r12) == r4) goto L66;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x0174, code lost:
if (r13.updateSessionCacheDuration(r0, r12) == r4) goto L66;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x0151, code lost:
if (r13.updateSessionCacheDuration(r0, r12) == r4) goto L66;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x0131, code lost:
if (r13.updateSamplingRate(r1, r12) == r4) goto L66;
*/
/* JADX WARN: Code restructure failed: missing block: B:34:0x0110, code lost:
if (r13.updateSessionRestartTimeout(r2, r12) == r4) goto L66;
*/
/* JADX WARN: Failed to find 'out' block for switch in B:2:0x000f. Please report as an issue. */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:16:0x015a */
/* JADX WARN: Removed duplicated region for block: B:21:0x013a */
/* JADX WARN: Removed duplicated region for block: B:23:0x0157 */
/* JADX WARN: Removed duplicated region for block: B:27:0x011a */
/* JADX WARN: Removed duplicated region for block: B:33:0x00f9 */
/* JADX WARN: Removed duplicated region for block: B:55:0x00d4 */
/* JADX WARN: Removed duplicated region for block: B:58:0x00f1 */
/* JADX WARN: Type inference failed for: r13v12, types: [T, java.lang.Integer] */
/* JADX WARN: Type inference failed for: r1v5, types: [T, java.lang.Integer] */
/* JADX WARN: Type inference failed for: r2v4, types: [T, java.lang.Double] */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r13) {
/*
Method dump skipped, instructions count: 426
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.settings.RemoteSettings$updateSettings$2$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(JSONObject jSONObject, Continuation<? super Unit> continuation) {
return ((RemoteSettings$updateSettings$2$1) create(jSONObject, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,46 @@
package com.google.firebase.sessions.settings;
import android.util.Log;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\u008a@"}, d2 = {"<anonymous>", "", "msg", ""}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.RemoteSettings$updateSettings$2$2", f = "RemoteSettings.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class RemoteSettings$updateSettings$2$2 extends SuspendLambda implements Function2<String, Continuation<? super Unit>, Object> {
/* synthetic */ Object L$0;
int label;
public RemoteSettings$updateSettings$2$2(Continuation<? super RemoteSettings$updateSettings$2$2> continuation) {
super(2, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
RemoteSettings$updateSettings$2$2 remoteSettings$updateSettings$2$2 = new RemoteSettings$updateSettings$2$2(continuation);
remoteSettings$updateSettings$2$2.L$0 = obj;
return remoteSettings$updateSettings$2$2;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
Log.e(RemoteSettings.TAG, "Error failing to fetch the remote configs: " + ((String) this.L$0));
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(String str, Continuation<? super Unit> continuation) {
return ((RemoteSettings$updateSettings$2$2) create(str, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,128 @@
package com.google.firebase.sessions.settings;
import Y.InterfaceC0091g;
import com.google.firebase.installations.FirebaseInstallationsApi;
import com.google.firebase.sessions.ApplicationInfo;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
import kotlin.time.Duration;
import kotlin.time.DurationKt;
import kotlin.time.DurationUnit;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.sync.Mutex;
import kotlinx.coroutines.sync.MutexKt;
@Metadata(d1 = {"\u0000d\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0006\n\u0002\b\u0005\b\u0000\u0018\u0000 12\u00020\u0001:\u00011B5\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0004\u0012\u0006\u0010\u0007\u001a\u00020\u0006\u0012\u0006\u0010\t\u001a\u00020\b\u0012\f\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u000b0\n¢\u0006\u0004\b\r\u0010\u000eJ\u0017\u0010\u0011\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u000fH\u0002¢\u0006\u0004\b\u0011\u0010\u0012J\u0013\u0010\u0014\u001a\u00020\u0013H\u0096@ø\u0001\u0000¢\u0006\u0004\b\u0014\u0010\u0015J\u000f\u0010\u0017\u001a\u00020\u0016H\u0016¢\u0006\u0004\b\u0017\u0010\u0018J\u000f\u0010\u001b\u001a\u00020\u0013H\u0001¢\u0006\u0004\b\u0019\u0010\u001aR\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010\u001cR\u0014\u0010\u0005\u001a\u00020\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010\u001dR\u0014\u0010\u0007\u001a\u00020\u00068\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0007\u0010\u001eR\u0014\u0010\t\u001a\u00020\b8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\t\u0010\u001fR\u0014\u0010!\u001a\u00020 8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b!\u0010\"R\u0014\u0010$\u001a\u00020#8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b$\u0010%R\u0016\u0010(\u001a\u0004\u0018\u00010\u00168VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b&\u0010'R\u001f\u0010,\u001a\u0004\u0018\u00010)8VX\u0096\u0004ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b*\u0010+R\u0016\u00100\u001a\u0004\u0018\u00010-8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b.\u0010/\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u00062"}, d2 = {"Lcom/google/firebase/sessions/settings/RemoteSettings;", "Lcom/google/firebase/sessions/settings/SettingsProvider;", "Lkotlin/coroutines/CoroutineContext;", "backgroundDispatcher", "Lcom/google/firebase/installations/FirebaseInstallationsApi;", "firebaseInstallationsApi", "Lcom/google/firebase/sessions/ApplicationInfo;", "appInfo", "Lcom/google/firebase/sessions/settings/CrashlyticsSettingsFetcher;", "configsFetcher", "LY/g;", "Lb0/g;", "dataStore", "<init>", "(Lkotlin/coroutines/CoroutineContext;Lcom/google/firebase/installations/FirebaseInstallationsApi;Lcom/google/firebase/sessions/ApplicationInfo;Lcom/google/firebase/sessions/settings/CrashlyticsSettingsFetcher;LY/g;)V", "", "s", "removeForwardSlashesIn", "(Ljava/lang/String;)Ljava/lang/String;", "", "updateSettings", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "", "isSettingsStale", "()Z", "clearCachedSettings$com_google_firebase_firebase_sessions", "()V", "clearCachedSettings", "Lkotlin/coroutines/CoroutineContext;", "Lcom/google/firebase/installations/FirebaseInstallationsApi;", "Lcom/google/firebase/sessions/ApplicationInfo;", "Lcom/google/firebase/sessions/settings/CrashlyticsSettingsFetcher;", "Lcom/google/firebase/sessions/settings/SettingsCache;", "settingsCache", "Lcom/google/firebase/sessions/settings/SettingsCache;", "Lkotlinx/coroutines/sync/Mutex;", "fetchInProgress", "Lkotlinx/coroutines/sync/Mutex;", "getSessionEnabled", "()Ljava/lang/Boolean;", "sessionEnabled", "Lkotlin/time/Duration;", "getSessionRestartTimeout-FghU774", "()Lkotlin/time/Duration;", "sessionRestartTimeout", "", "getSamplingRate", "()Ljava/lang/Double;", "samplingRate", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class RemoteSettings implements SettingsProvider {
private static final Companion Companion = new Companion(null);
@Deprecated
public static final String FORWARD_SLASH_STRING = "/";
@Deprecated
public static final String TAG = "SessionConfigFetcher";
private final ApplicationInfo appInfo;
private final CoroutineContext backgroundDispatcher;
private final CrashlyticsSettingsFetcher configsFetcher;
private final Mutex fetchInProgress;
private final FirebaseInstallationsApi firebaseInstallationsApi;
private final SettingsCache settingsCache;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0082\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0006"}, d2 = {"Lcom/google/firebase/sessions/settings/RemoteSettings$Companion;", "", "()V", "FORWARD_SLASH_STRING", "", "TAG", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public RemoteSettings(CoroutineContext backgroundDispatcher, FirebaseInstallationsApi firebaseInstallationsApi, ApplicationInfo appInfo, CrashlyticsSettingsFetcher configsFetcher, InterfaceC0091g dataStore) {
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
Intrinsics.checkNotNullParameter(firebaseInstallationsApi, "firebaseInstallationsApi");
Intrinsics.checkNotNullParameter(appInfo, "appInfo");
Intrinsics.checkNotNullParameter(configsFetcher, "configsFetcher");
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
this.backgroundDispatcher = backgroundDispatcher;
this.firebaseInstallationsApi = firebaseInstallationsApi;
this.appInfo = appInfo;
this.configsFetcher = configsFetcher;
this.settingsCache = new SettingsCache(dataStore);
this.fetchInProgress = MutexKt.Mutex$default(false, 1, null);
}
private final String removeForwardSlashesIn(String s4) {
return new Regex(FORWARD_SLASH_STRING).replace(s4, "");
}
public final void clearCachedSettings$com_google_firebase_firebase_sessions() {
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(this.backgroundDispatcher), null, null, new RemoteSettings$clearCachedSettings$1(this, null), 3, null);
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public Double getSamplingRate() {
return this.settingsCache.sessionSamplingRate();
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public Boolean getSessionEnabled() {
return this.settingsCache.sessionsEnabled();
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
/* renamed from: getSessionRestartTimeout-FghU774 */
public Duration mo104getSessionRestartTimeoutFghU774() {
Integer sessionRestartTimeout = this.settingsCache.sessionRestartTimeout();
if (sessionRestartTimeout == null) {
return null;
}
Duration.Companion companion = Duration.INSTANCE;
return Duration.m1453boximpl(DurationKt.toDuration(sessionRestartTimeout.intValue(), DurationUnit.SECONDS));
}
@Override // com.google.firebase.sessions.settings.SettingsProvider
public boolean isSettingsStale() {
return this.settingsCache.hasCacheExpired$com_google_firebase_firebase_sessions();
}
/* JADX WARN: Code restructure failed: missing block: B:28:0x0142, code lost:
if (r4.doConfigFetch(r13, r5, r2, r0) == r1) goto L51;
*/
/* JADX WARN: Code restructure failed: missing block: B:51:0x007f, code lost:
if (r13.lock(null, r0) == r1) goto L51;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:24:0x00bd A[Catch: all -> 0x0037, TRY_LEAVE, TryCatch #1 {all -> 0x0037, blocks: (B:13:0x0032, B:14:0x0145, B:21:0x004a, B:22:0x00b9, B:24:0x00bd, B:27:0x00c8), top: B:7:0x0026 }] */
/* JADX WARN: Removed duplicated region for block: B:27:0x00c8 A[Catch: all -> 0x0037, TRY_ENTER, TryCatch #1 {all -> 0x0037, blocks: (B:13:0x0032, B:14:0x0145, B:21:0x004a, B:22:0x00b9, B:24:0x00bd, B:27:0x00c8), top: B:7:0x0026 }] */
/* JADX WARN: Removed duplicated region for block: B:34:0x008b A[Catch: all -> 0x0096, TRY_LEAVE, TryCatch #0 {all -> 0x0096, blocks: (B:32:0x0083, B:34:0x008b, B:37:0x009c), top: B:31:0x0083 }] */
/* JADX WARN: Removed duplicated region for block: B:37:0x009c A[Catch: all -> 0x0096, TRY_ENTER, TRY_LEAVE, TryCatch #0 {all -> 0x0096, blocks: (B:32:0x0083, B:34:0x008b, B:37:0x009c), top: B:31:0x0083 }] */
/* JADX WARN: Removed duplicated region for block: B:44:0x005d */
/* JADX WARN: Removed duplicated region for block: B:9:0x0028 */
/* JADX WARN: Type inference failed for: r12v0, types: [com.google.firebase.sessions.settings.RemoteSettings, java.lang.Object] */
/* JADX WARN: Type inference failed for: r12v1, types: [kotlinx.coroutines.sync.Mutex] */
/* JADX WARN: Type inference failed for: r12v14 */
/* JADX WARN: Type inference failed for: r12v20 */
/* JADX WARN: Type inference failed for: r12v3, types: [com.google.firebase.sessions.settings.RemoteSettings, java.lang.Object] */
/* JADX WARN: Type inference failed for: r12v5 */
@Override // com.google.firebase.sessions.settings.SettingsProvider
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object updateSettings(kotlin.coroutines.Continuation<? super kotlin.Unit> r13) {
/*
Method dump skipped, instructions count: 337
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.settings.RemoteSettings.updateSettings(kotlin.coroutines.Continuation):java.lang.Object");
}
}

View File

@@ -0,0 +1,169 @@
package com.google.firebase.sessions.settings;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
import org.json.JSONObject;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.RemoteSettingsFetcher$doConfigFetch$2", f = "RemoteSettingsFetcher.kt", i = {}, l = {68, 70, 73}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class RemoteSettingsFetcher$doConfigFetch$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
final /* synthetic */ Map<String, String> $headerOptions;
final /* synthetic */ Function2<String, Continuation<? super Unit>, Object> $onFailure;
final /* synthetic */ Function2<JSONObject, Continuation<? super Unit>, Object> $onSuccess;
int label;
final /* synthetic */ RemoteSettingsFetcher this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
public RemoteSettingsFetcher$doConfigFetch$2(RemoteSettingsFetcher remoteSettingsFetcher, Map<String, String> map, Function2<? super JSONObject, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super String, ? super Continuation<? super Unit>, ? extends Object> function22, Continuation<? super RemoteSettingsFetcher$doConfigFetch$2> continuation) {
super(2, continuation);
this.this$0 = remoteSettingsFetcher;
this.$headerOptions = map;
this.$onSuccess = function2;
this.$onFailure = function22;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new RemoteSettingsFetcher$doConfigFetch$2(this.this$0, this.$headerOptions, this.$onSuccess, this.$onFailure, continuation);
}
/* JADX WARN: Code restructure failed: missing block: B:32:0x00cb, code lost:
if (r8.invoke(r1, r7) == r0) goto L36;
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x00e0, code lost:
if (r1.invoke(r3, r7) != r0) goto L37;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r6v0, types: [T, java.lang.String] */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r8) {
/*
r7 = this;
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r1 = r7.label
r2 = 3
r3 = 2
r4 = 1
if (r1 == 0) goto L26
if (r1 == r4) goto L1e
if (r1 == r3) goto L1e
if (r1 != r2) goto L16
kotlin.ResultKt.throwOnFailure(r8)
goto Le3
L16:
java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
java.lang.String r8 = "call to 'resume' before 'invoke' with coroutine"
r7.<init>(r8)
throw r7
L1e:
kotlin.ResultKt.throwOnFailure(r8) // Catch: java.lang.Exception -> L23
goto Le3
L23:
r8 = move-exception
goto Lce
L26:
kotlin.ResultKt.throwOnFailure(r8)
com.google.firebase.sessions.settings.RemoteSettingsFetcher r8 = r7.this$0 // Catch: java.lang.Exception -> L23
java.net.URL r8 = com.google.firebase.sessions.settings.RemoteSettingsFetcher.access$settingsUrl(r8) // Catch: java.lang.Exception -> L23
java.net.URLConnection r8 = r8.openConnection() // Catch: java.lang.Exception -> L23
java.lang.String r1 = "null cannot be cast to non-null type javax.net.ssl.HttpsURLConnection"
kotlin.jvm.internal.Intrinsics.checkNotNull(r8, r1) // Catch: java.lang.Exception -> L23
javax.net.ssl.HttpsURLConnection r8 = (javax.net.ssl.HttpsURLConnection) r8 // Catch: java.lang.Exception -> L23
java.lang.String r1 = "GET"
r8.setRequestMethod(r1) // Catch: java.lang.Exception -> L23
java.lang.String r1 = "Accept"
java.lang.String r5 = "application/json"
r8.setRequestProperty(r1, r5) // Catch: java.lang.Exception -> L23
java.util.Map<java.lang.String, java.lang.String> r1 = r7.$headerOptions // Catch: java.lang.Exception -> L23
java.util.Set r1 = r1.entrySet() // Catch: java.lang.Exception -> L23
java.util.Iterator r1 = r1.iterator() // Catch: java.lang.Exception -> L23
L50:
boolean r5 = r1.hasNext() // Catch: java.lang.Exception -> L23
if (r5 == 0) goto L6c
java.lang.Object r5 = r1.next() // Catch: java.lang.Exception -> L23
java.util.Map$Entry r5 = (java.util.Map.Entry) r5 // Catch: java.lang.Exception -> L23
java.lang.Object r6 = r5.getKey() // Catch: java.lang.Exception -> L23
java.lang.String r6 = (java.lang.String) r6 // Catch: java.lang.Exception -> L23
java.lang.Object r5 = r5.getValue() // Catch: java.lang.Exception -> L23
java.lang.String r5 = (java.lang.String) r5 // Catch: java.lang.Exception -> L23
r8.setRequestProperty(r6, r5) // Catch: java.lang.Exception -> L23
goto L50
L6c:
int r1 = r8.getResponseCode() // Catch: java.lang.Exception -> L23
r5 = 200(0xc8, float:2.8E-43)
if (r1 != r5) goto Lb2
java.io.InputStream r8 = r8.getInputStream() // Catch: java.lang.Exception -> L23
java.io.BufferedReader r1 = new java.io.BufferedReader // Catch: java.lang.Exception -> L23
java.io.InputStreamReader r3 = new java.io.InputStreamReader // Catch: java.lang.Exception -> L23
r3.<init>(r8) // Catch: java.lang.Exception -> L23
r1.<init>(r3) // Catch: java.lang.Exception -> L23
java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L23
r3.<init>() // Catch: java.lang.Exception -> L23
kotlin.jvm.internal.Ref$ObjectRef r5 = new kotlin.jvm.internal.Ref$ObjectRef // Catch: java.lang.Exception -> L23
r5.<init>() // Catch: java.lang.Exception -> L23
L8c:
java.lang.String r6 = r1.readLine() // Catch: java.lang.Exception -> L23
r5.element = r6 // Catch: java.lang.Exception -> L23
if (r6 == 0) goto L98
r3.append(r6) // Catch: java.lang.Exception -> L23
goto L8c
L98:
r1.close() // Catch: java.lang.Exception -> L23
r8.close() // Catch: java.lang.Exception -> L23
org.json.JSONObject r8 = new org.json.JSONObject // Catch: java.lang.Exception -> L23
java.lang.String r1 = r3.toString() // Catch: java.lang.Exception -> L23
r8.<init>(r1) // Catch: java.lang.Exception -> L23
kotlin.jvm.functions.Function2<org.json.JSONObject, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> r1 = r7.$onSuccess // Catch: java.lang.Exception -> L23
r7.label = r4 // Catch: java.lang.Exception -> L23
java.lang.Object r7 = r1.invoke(r8, r7) // Catch: java.lang.Exception -> L23
if (r7 != r0) goto Le3
goto Le2
Lb2:
kotlin.jvm.functions.Function2<java.lang.String, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> r8 = r7.$onFailure // Catch: java.lang.Exception -> L23
java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L23
r4.<init>() // Catch: java.lang.Exception -> L23
java.lang.String r5 = "Bad response code: "
r4.append(r5) // Catch: java.lang.Exception -> L23
r4.append(r1) // Catch: java.lang.Exception -> L23
java.lang.String r1 = r4.toString() // Catch: java.lang.Exception -> L23
r7.label = r3 // Catch: java.lang.Exception -> L23
java.lang.Object r7 = r8.invoke(r1, r7) // Catch: java.lang.Exception -> L23
if (r7 != r0) goto Le3
goto Le2
Lce:
kotlin.jvm.functions.Function2<java.lang.String, kotlin.coroutines.Continuation<? super kotlin.Unit>, java.lang.Object> r1 = r7.$onFailure
java.lang.String r3 = r8.getMessage()
if (r3 != 0) goto Lda
java.lang.String r3 = r8.toString()
Lda:
r7.label = r2
java.lang.Object r7 = r1.invoke(r3, r7)
if (r7 != r0) goto Le3
Le2:
return r0
Le3:
kotlin.Unit r7 = kotlin.Unit.INSTANCE
return r7
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.settings.RemoteSettingsFetcher$doConfigFetch$2.invokeSuspend(java.lang.Object):java.lang.Object");
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((RemoteSettingsFetcher$doConfigFetch$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,50 @@
package com.google.firebase.sessions.settings;
import android.net.Uri;
import com.google.firebase.sessions.ApplicationInfo;
import java.net.URL;
import java.util.Map;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt;
import org.json.JSONObject;
@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010$\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0000\u0018\u0000 \u00162\u00020\u0001:\u0001\u0016B\u001f\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJm\u0010\t\u001a\u00020\n2\u0012\u0010\u000b\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00070\f2\"\u0010\r\u001a\u001e\b\u0001\u0012\u0004\u0012\u00020\u000f\u0012\n\u0012\b\u0012\u0004\u0012\u00020\n0\u0010\u0012\u0006\u0012\u0004\u0018\u00010\u00110\u000e2\"\u0010\u0012\u001a\u001e\b\u0001\u0012\u0004\u0012\u00020\u0007\u0012\n\u0012\b\u0012\u0004\u0012\u00020\n0\u0010\u0012\u0006\u0012\u0004\u0018\u00010\u00110\u000eH\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u0013J\b\u0010\u0014\u001a\u00020\u0015H\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0017"}, d2 = {"Lcom/google/firebase/sessions/settings/RemoteSettingsFetcher;", "Lcom/google/firebase/sessions/settings/CrashlyticsSettingsFetcher;", "appInfo", "Lcom/google/firebase/sessions/ApplicationInfo;", "blockingDispatcher", "Lkotlin/coroutines/CoroutineContext;", "baseUrl", "", "(Lcom/google/firebase/sessions/ApplicationInfo;Lkotlin/coroutines/CoroutineContext;Ljava/lang/String;)V", "doConfigFetch", "", "headerOptions", "", "onSuccess", "Lkotlin/Function2;", "Lorg/json/JSONObject;", "Lkotlin/coroutines/Continuation;", "", "onFailure", "(Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "settingsUrl", "Ljava/net/URL;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class RemoteSettingsFetcher implements CrashlyticsSettingsFetcher {
private static final String FIREBASE_PLATFORM = "android";
private static final String FIREBASE_SESSIONS_BASE_URL_STRING = "firebase-settings.crashlytics.com";
private final ApplicationInfo appInfo;
private final String baseUrl;
private final CoroutineContext blockingDispatcher;
public RemoteSettingsFetcher(ApplicationInfo appInfo, CoroutineContext blockingDispatcher, String baseUrl) {
Intrinsics.checkNotNullParameter(appInfo, "appInfo");
Intrinsics.checkNotNullParameter(blockingDispatcher, "blockingDispatcher");
Intrinsics.checkNotNullParameter(baseUrl, "baseUrl");
this.appInfo = appInfo;
this.blockingDispatcher = blockingDispatcher;
this.baseUrl = baseUrl;
}
/* JADX INFO: Access modifiers changed from: private */
public final URL settingsUrl() {
return new URL(new Uri.Builder().scheme("https").authority(this.baseUrl).appendPath("spi").appendPath("v2").appendPath("platforms").appendPath(FIREBASE_PLATFORM).appendPath("gmp").appendPath(this.appInfo.getAppId()).appendPath("settings").appendQueryParameter("build_version", this.appInfo.getAndroidAppInfo().getAppBuildVersion()).appendQueryParameter("display_version", this.appInfo.getAndroidAppInfo().getVersionName()).build().toString());
}
@Override // com.google.firebase.sessions.settings.CrashlyticsSettingsFetcher
public Object doConfigFetch(Map<String, String> map, Function2<? super JSONObject, ? super Continuation<? super Unit>, ? extends Object> function2, Function2<? super String, ? super Continuation<? super Unit>, ? extends Object> function22, Continuation<? super Unit> continuation) {
Object withContext = BuildersKt.withContext(this.blockingDispatcher, new RemoteSettingsFetcher$doConfigFetch$2(this, map, function2, function22, null), continuation);
return withContext == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? withContext : Unit.INSTANCE;
}
public /* synthetic */ RemoteSettingsFetcher(ApplicationInfo applicationInfo, CoroutineContext coroutineContext, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(applicationInfo, coroutineContext, (i & 4) != 0 ? FIREBASE_SESSIONS_BASE_URL_STRING : str);
}
}

View File

@@ -0,0 +1,120 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0006\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0019\n\u0002\u0010\u000e\n\u0000\b\u0080\b\u0018\u00002\u00020\u0001B7\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0007\u0012\b\u0010\b\u001a\u0004\u0018\u00010\u0007\u0012\b\u0010\t\u001a\u0004\u0018\u00010\n¢\u0006\u0002\u0010\u000bJ\u0010\u0010\u0019\u001a\u0004\u0018\u00010\u0003HÆ\u0003¢\u0006\u0002\u0010\u0013J\u0010\u0010\u001a\u001a\u0004\u0018\u00010\u0005HÆ\u0003¢\u0006\u0002\u0010\u0017J\u0010\u0010\u001b\u001a\u0004\u0018\u00010\u0007HÆ\u0003¢\u0006\u0002\u0010\rJ\u0010\u0010\u001c\u001a\u0004\u0018\u00010\u0007HÆ\u0003¢\u0006\u0002\u0010\rJ\u0010\u0010\u001d\u001a\u0004\u0018\u00010\nHÆ\u0003¢\u0006\u0002\u0010\u0010JJ\u0010\u001e\u001a\u00020\u00002\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u00052\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u00072\n\b\u0002\u0010\b\u001a\u0004\u0018\u00010\u00072\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\nHÆ\u0001¢\u0006\u0002\u0010\u001fJ\u0013\u0010 \u001a\u00020\u00032\b\u0010!\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\"\u001a\u00020\u0007HÖ\u0001J\t\u0010#\u001a\u00020$HÖ\u0001R\u0015\u0010\b\u001a\u0004\u0018\u00010\u0007¢\u0006\n\n\u0002\u0010\u000e\u001a\u0004\b\f\u0010\rR\u0015\u0010\t\u001a\u0004\u0018\u00010\n¢\u0006\n\n\u0002\u0010\u0011\u001a\u0004\b\u000f\u0010\u0010R\u0015\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\n\n\u0002\u0010\u0014\u001a\u0004\b\u0012\u0010\u0013R\u0015\u0010\u0006\u001a\u0004\u0018\u00010\u0007¢\u0006\n\n\u0002\u0010\u000e\u001a\u0004\b\u0015\u0010\rR\u0015\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\n\n\u0002\u0010\u0018\u001a\u0004\b\u0016\u0010\u0017¨\u0006%"}, d2 = {"Lcom/google/firebase/sessions/settings/SessionConfigs;", "", "sessionEnabled", "", "sessionSamplingRate", "", "sessionRestartTimeout", "", "cacheDuration", "cacheUpdatedTime", "", "(Ljava/lang/Boolean;Ljava/lang/Double;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)V", "getCacheDuration", "()Ljava/lang/Integer;", "Ljava/lang/Integer;", "getCacheUpdatedTime", "()Ljava/lang/Long;", "Ljava/lang/Long;", "getSessionEnabled", "()Ljava/lang/Boolean;", "Ljava/lang/Boolean;", "getSessionRestartTimeout", "getSessionSamplingRate", "()Ljava/lang/Double;", "Ljava/lang/Double;", "component1", "component2", "component3", "component4", "component5", "copy", "(Ljava/lang/Boolean;Ljava/lang/Double;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;)Lcom/google/firebase/sessions/settings/SessionConfigs;", "equals", "other", "hashCode", "toString", "", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final /* data */ class SessionConfigs {
private final Integer cacheDuration;
private final Long cacheUpdatedTime;
private final Boolean sessionEnabled;
private final Integer sessionRestartTimeout;
private final Double sessionSamplingRate;
public SessionConfigs(Boolean bool, Double d4, Integer num, Integer num2, Long l4) {
this.sessionEnabled = bool;
this.sessionSamplingRate = d4;
this.sessionRestartTimeout = num;
this.cacheDuration = num2;
this.cacheUpdatedTime = l4;
}
public static /* synthetic */ SessionConfigs copy$default(SessionConfigs sessionConfigs, Boolean bool, Double d4, Integer num, Integer num2, Long l4, int i, Object obj) {
if ((i & 1) != 0) {
bool = sessionConfigs.sessionEnabled;
}
if ((i & 2) != 0) {
d4 = sessionConfigs.sessionSamplingRate;
}
if ((i & 4) != 0) {
num = sessionConfigs.sessionRestartTimeout;
}
if ((i & 8) != 0) {
num2 = sessionConfigs.cacheDuration;
}
if ((i & 16) != 0) {
l4 = sessionConfigs.cacheUpdatedTime;
}
Long l5 = l4;
Integer num3 = num;
return sessionConfigs.copy(bool, d4, num3, num2, l5);
}
/* renamed from: component1, reason: from getter */
public final Boolean getSessionEnabled() {
return this.sessionEnabled;
}
/* renamed from: component2, reason: from getter */
public final Double getSessionSamplingRate() {
return this.sessionSamplingRate;
}
/* renamed from: component3, reason: from getter */
public final Integer getSessionRestartTimeout() {
return this.sessionRestartTimeout;
}
/* renamed from: component4, reason: from getter */
public final Integer getCacheDuration() {
return this.cacheDuration;
}
/* renamed from: component5, reason: from getter */
public final Long getCacheUpdatedTime() {
return this.cacheUpdatedTime;
}
public final SessionConfigs copy(Boolean sessionEnabled, Double sessionSamplingRate, Integer sessionRestartTimeout, Integer cacheDuration, Long cacheUpdatedTime) {
return new SessionConfigs(sessionEnabled, sessionSamplingRate, sessionRestartTimeout, cacheDuration, cacheUpdatedTime);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SessionConfigs)) {
return false;
}
SessionConfigs sessionConfigs = (SessionConfigs) other;
return Intrinsics.areEqual(this.sessionEnabled, sessionConfigs.sessionEnabled) && Intrinsics.areEqual((Object) this.sessionSamplingRate, (Object) sessionConfigs.sessionSamplingRate) && Intrinsics.areEqual(this.sessionRestartTimeout, sessionConfigs.sessionRestartTimeout) && Intrinsics.areEqual(this.cacheDuration, sessionConfigs.cacheDuration) && Intrinsics.areEqual(this.cacheUpdatedTime, sessionConfigs.cacheUpdatedTime);
}
public final Integer getCacheDuration() {
return this.cacheDuration;
}
public final Long getCacheUpdatedTime() {
return this.cacheUpdatedTime;
}
public final Boolean getSessionEnabled() {
return this.sessionEnabled;
}
public final Integer getSessionRestartTimeout() {
return this.sessionRestartTimeout;
}
public final Double getSessionSamplingRate() {
return this.sessionSamplingRate;
}
public int hashCode() {
Boolean bool = this.sessionEnabled;
int hashCode = (bool == null ? 0 : bool.hashCode()) * 31;
Double d4 = this.sessionSamplingRate;
int hashCode2 = (hashCode + (d4 == null ? 0 : d4.hashCode())) * 31;
Integer num = this.sessionRestartTimeout;
int hashCode3 = (hashCode2 + (num == null ? 0 : num.hashCode())) * 31;
Integer num2 = this.cacheDuration;
int hashCode4 = (hashCode3 + (num2 == null ? 0 : num2.hashCode())) * 31;
Long l4 = this.cacheUpdatedTime;
return hashCode4 + (l4 != null ? l4.hashCode() : 0);
}
public String toString() {
return "SessionConfigs(sessionEnabled=" + this.sessionEnabled + ", sessionSamplingRate=" + this.sessionSamplingRate + ", sessionRestartTimeout=" + this.sessionRestartTimeout + ", cacheDuration=" + this.cacheDuration + ", cacheUpdatedTime=" + this.cacheUpdatedTime + ')';
}
}

View File

@@ -0,0 +1,30 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.SessionsSettings", f = "SessionsSettings.kt", i = {0}, l = {134, 135}, m = "updateSettings", n = {"this"}, s = {"L$0"})
/* loaded from: classes3.dex */
public final class SessionsSettings$updateSettings$1 extends ContinuationImpl {
Object L$0;
int label;
/* synthetic */ Object result;
final /* synthetic */ SessionsSettings this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SessionsSettings$updateSettings$1(SessionsSettings sessionsSettings, Continuation<? super SessionsSettings$updateSettings$1> continuation) {
super(continuation);
this.this$0 = sessionsSettings;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
return this.this$0.updateSettings(this);
}
}

View File

@@ -0,0 +1,239 @@
package com.google.firebase.sessions.settings;
import Y.InterfaceC0091g;
import android.content.Context;
import com.google.firebase.Firebase;
import com.google.firebase.FirebaseKt;
import com.google.firebase.installations.FirebaseInstallationsApi;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.google.firebase.sessions.ApplicationInfo;
import com.google.firebase.sessions.SessionDataStoreConfigs;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.PropertyReference2Impl;
import kotlin.jvm.internal.Reflection;
import kotlin.properties.ReadOnlyProperty;
import kotlin.reflect.KProperty;
import kotlin.time.Duration;
import kotlin.time.DurationKt;
import kotlin.time.DurationUnit;
import m3.l;
@Metadata(d1 = {"\u0000V\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0007\n\u0002\u0010\u0002\n\u0002\b\u0003\b\u0000\u0018\u0000 &2\u00020\u0001:\u0001&B/\b\u0012\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\n¢\u0006\u0002\u0010\u000bB'\b\u0016\u0012\u0006\u0010\f\u001a\u00020\r\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b¢\u0006\u0002\u0010\u000eB\u0015\u0012\u0006\u0010\u000f\u001a\u00020\u0010\u0012\u0006\u0010\u0011\u001a\u00020\u0010¢\u0006\u0002\u0010\u0012J\u0010\u0010\u001f\u001a\u00020\u001c2\u0006\u0010\u0013\u001a\u00020\u0014H\u0002J\u001d\u0010 \u001a\u00020\u001c2\u0006\u0010\u0017\u001a\u00020\u0018H\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b!\u0010\"J\u0011\u0010#\u001a\u00020$H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010%R\u000e\u0010\u000f\u001a\u00020\u0010X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0010X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0013\u001a\u00020\u00148F¢\u0006\u0006\u001a\u0004\b\u0015\u0010\u0016R\u001a\u0010\u0017\u001a\u00020\u00188Fø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b\u0019\u0010\u001aR\u0011\u0010\u001b\u001a\u00020\u001c8F¢\u0006\u0006\u001a\u0004\b\u001d\u0010\u001e\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006'"}, d2 = {"Lcom/google/firebase/sessions/settings/SessionsSettings;", "", "context", "Landroid/content/Context;", "blockingDispatcher", "Lkotlin/coroutines/CoroutineContext;", "backgroundDispatcher", "firebaseInstallationsApi", "Lcom/google/firebase/installations/FirebaseInstallationsApi;", "appInfo", "Lcom/google/firebase/sessions/ApplicationInfo;", "(Landroid/content/Context;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcom/google/firebase/installations/FirebaseInstallationsApi;Lcom/google/firebase/sessions/ApplicationInfo;)V", "firebaseApp", "Lcom/google/firebase/FirebaseApp;", "(Lcom/google/firebase/FirebaseApp;Lkotlin/coroutines/CoroutineContext;Lkotlin/coroutines/CoroutineContext;Lcom/google/firebase/installations/FirebaseInstallationsApi;)V", "localOverrideSettings", "Lcom/google/firebase/sessions/settings/SettingsProvider;", "remoteSettings", "(Lcom/google/firebase/sessions/settings/SettingsProvider;Lcom/google/firebase/sessions/settings/SettingsProvider;)V", "samplingRate", "", "getSamplingRate", "()D", "sessionRestartTimeout", "Lkotlin/time/Duration;", "getSessionRestartTimeout-UwyO8pc", "()J", "sessionsEnabled", "", "getSessionsEnabled", "()Z", "isValidSamplingRate", "isValidSessionRestartTimeout", "isValidSessionRestartTimeout-LRDsOJo", "(J)Z", "updateSettings", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SessionsSettings {
/* renamed from: Companion, reason: from kotlin metadata */
public static final Companion INSTANCE = new Companion(null);
private static final ReadOnlyProperty<Context, InterfaceC0091g> dataStore$delegate = l.S(SessionDataStoreConfigs.INSTANCE.getSETTINGS_CONFIG_NAME());
private final SettingsProvider localOverrideSettings;
private final SettingsProvider remoteSettings;
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0080\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R%\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005*\u00020\u00048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\t\u0010\nR\u0011\u0010\u000f\u001a\u00020\f8F¢\u0006\u0006\u001a\u0004\b\r\u0010\u000e¨\u0006\u0010"}, d2 = {"Lcom/google/firebase/sessions/settings/SessionsSettings$Companion;", "", "<init>", "()V", "Landroid/content/Context;", "LY/g;", "Lb0/g;", "dataStore$delegate", "Lkotlin/properties/ReadOnlyProperty;", "getDataStore", "(Landroid/content/Context;)LY/g;", "dataStore", "Lcom/google/firebase/sessions/settings/SessionsSettings;", "getInstance", "()Lcom/google/firebase/sessions/settings/SessionsSettings;", "instance", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property2(new PropertyReference2Impl(Companion.class, "dataStore", "getDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;", 0))};
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
/* JADX INFO: Access modifiers changed from: private */
public final InterfaceC0091g getDataStore(Context context) {
return (InterfaceC0091g) SessionsSettings.dataStore$delegate.getValue(context, $$delegatedProperties[0]);
}
public final SessionsSettings getInstance() {
Object obj = FirebaseKt.getApp(Firebase.INSTANCE).get(SessionsSettings.class);
Intrinsics.checkNotNullExpressionValue(obj, "Firebase.app[SessionsSettings::class.java]");
return (SessionsSettings) obj;
}
private Companion() {
}
}
public SessionsSettings(SettingsProvider localOverrideSettings, SettingsProvider remoteSettings) {
Intrinsics.checkNotNullParameter(localOverrideSettings, "localOverrideSettings");
Intrinsics.checkNotNullParameter(remoteSettings, "remoteSettings");
this.localOverrideSettings = localOverrideSettings;
this.remoteSettings = remoteSettings;
}
private final boolean isValidSamplingRate(double samplingRate) {
return FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE <= samplingRate && samplingRate <= 1.0d;
}
/* renamed from: isValidSessionRestartTimeout-LRDsOJo, reason: not valid java name */
private final boolean m105isValidSessionRestartTimeoutLRDsOJo(long sessionRestartTimeout) {
return Duration.m1489isPositiveimpl(sessionRestartTimeout) && Duration.m1484isFiniteimpl(sessionRestartTimeout);
}
public final double getSamplingRate() {
Double samplingRate = this.localOverrideSettings.getSamplingRate();
if (samplingRate != null) {
double doubleValue = samplingRate.doubleValue();
if (isValidSamplingRate(doubleValue)) {
return doubleValue;
}
}
Double samplingRate2 = this.remoteSettings.getSamplingRate();
if (samplingRate2 == null) {
return 1.0d;
}
double doubleValue2 = samplingRate2.doubleValue();
if (isValidSamplingRate(doubleValue2)) {
return doubleValue2;
}
return 1.0d;
}
/* renamed from: getSessionRestartTimeout-UwyO8pc, reason: not valid java name */
public final long m106getSessionRestartTimeoutUwyO8pc() {
Duration mo104getSessionRestartTimeoutFghU774 = this.localOverrideSettings.mo104getSessionRestartTimeoutFghU774();
if (mo104getSessionRestartTimeoutFghU774 != null) {
long rawValue = mo104getSessionRestartTimeoutFghU774.getRawValue();
if (m105isValidSessionRestartTimeoutLRDsOJo(rawValue)) {
return rawValue;
}
}
Duration mo104getSessionRestartTimeoutFghU7742 = this.remoteSettings.mo104getSessionRestartTimeoutFghU774();
if (mo104getSessionRestartTimeoutFghU7742 != null) {
long rawValue2 = mo104getSessionRestartTimeoutFghU7742.getRawValue();
if (m105isValidSessionRestartTimeoutLRDsOJo(rawValue2)) {
return rawValue2;
}
}
Duration.Companion companion = Duration.INSTANCE;
return DurationKt.toDuration(30, DurationUnit.MINUTES);
}
public final boolean getSessionsEnabled() {
Boolean sessionEnabled = this.localOverrideSettings.getSessionEnabled();
if (sessionEnabled != null) {
return sessionEnabled.booleanValue();
}
Boolean sessionEnabled2 = this.remoteSettings.getSessionEnabled();
if (sessionEnabled2 != null) {
return sessionEnabled2.booleanValue();
}
return true;
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0057, code lost:
if (r5.updateSettings(r0) != r1) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0059, code lost:
return r1;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0049, code lost:
if (r6.updateSettings(r0) == r1) goto L21;
*/
/* JADX WARN: Removed duplicated region for block: B:20:0x003c */
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object updateSettings(kotlin.coroutines.Continuation<? super kotlin.Unit> r6) {
/*
r5 = this;
boolean r0 = r6 instanceof com.google.firebase.sessions.settings.SessionsSettings$updateSettings$1
if (r0 == 0) goto L13
r0 = r6
com.google.firebase.sessions.settings.SessionsSettings$updateSettings$1 r0 = (com.google.firebase.sessions.settings.SessionsSettings$updateSettings$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.google.firebase.sessions.settings.SessionsSettings$updateSettings$1 r0 = new com.google.firebase.sessions.settings.SessionsSettings$updateSettings$1
r0.<init>(r5, r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 2
r4 = 1
if (r2 == 0) goto L3c
if (r2 == r4) goto L34
if (r2 != r3) goto L2c
kotlin.ResultKt.throwOnFailure(r6)
goto L5a
L2c:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L34:
java.lang.Object r5 = r0.L$0
com.google.firebase.sessions.settings.SessionsSettings r5 = (com.google.firebase.sessions.settings.SessionsSettings) r5
kotlin.ResultKt.throwOnFailure(r6)
goto L4c
L3c:
kotlin.ResultKt.throwOnFailure(r6)
com.google.firebase.sessions.settings.SettingsProvider r6 = r5.localOverrideSettings
r0.L$0 = r5
r0.label = r4
java.lang.Object r6 = r6.updateSettings(r0)
if (r6 != r1) goto L4c
goto L59
L4c:
com.google.firebase.sessions.settings.SettingsProvider r5 = r5.remoteSettings
r6 = 0
r0.L$0 = r6
r0.label = r3
java.lang.Object r5 = r5.updateSettings(r0)
if (r5 != r1) goto L5a
L59:
return r1
L5a:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.settings.SessionsSettings.updateSettings(kotlin.coroutines.Continuation):java.lang.Object");
}
private SessionsSettings(Context context, CoroutineContext coroutineContext, CoroutineContext coroutineContext2, FirebaseInstallationsApi firebaseInstallationsApi, ApplicationInfo applicationInfo) {
this(new LocalOverrideSettings(context), new RemoteSettings(coroutineContext2, firebaseInstallationsApi, applicationInfo, new RemoteSettingsFetcher(applicationInfo, coroutineContext, null, 4, null), INSTANCE.getDataStore(context)));
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public SessionsSettings(com.google.firebase.FirebaseApp r8, kotlin.coroutines.CoroutineContext r9, kotlin.coroutines.CoroutineContext r10, com.google.firebase.installations.FirebaseInstallationsApi r11) {
/*
r7 = this;
java.lang.String r0 = "firebaseApp"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)
java.lang.String r0 = "blockingDispatcher"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r9, r0)
java.lang.String r0 = "backgroundDispatcher"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0)
java.lang.String r0 = "firebaseInstallationsApi"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r11, r0)
android.content.Context r2 = r8.getApplicationContext()
java.lang.String r0 = "firebaseApp.applicationContext"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r0)
com.google.firebase.sessions.SessionEvents r0 = com.google.firebase.sessions.SessionEvents.INSTANCE
com.google.firebase.sessions.ApplicationInfo r6 = r0.getApplicationInfo(r8)
r1 = r7
r3 = r9
r4 = r10
r5 = r11
r1.<init>(r2, r3, r4, r5, r6)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.settings.SessionsSettings.<init>(com.google.firebase.FirebaseApp, kotlin.coroutines.CoroutineContext, kotlin.coroutines.CoroutineContext, com.google.firebase.installations.FirebaseInstallationsApi):void");
}
}

View File

@@ -0,0 +1,52 @@
package com.google.firebase.sessions.settings;
import b0.C0257b;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\u008a@¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lb0/b;", "preferences", "", "<anonymous>", "(Lb0/b;)V"}, k = 3, mv = {1, 7, 1})
@DebugMetadata(c = "com.google.firebase.sessions.settings.SettingsCache$removeConfigs$2", f = "SettingsCache.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SettingsCache$removeConfigs$2 extends SuspendLambda implements Function2<C0257b, Continuation<? super Unit>, Object> {
/* synthetic */ Object L$0;
int label;
final /* synthetic */ SettingsCache this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SettingsCache$removeConfigs$2(SettingsCache settingsCache, Continuation<? super SettingsCache$removeConfigs$2> continuation) {
super(2, continuation);
this.this$0 = settingsCache;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
SettingsCache$removeConfigs$2 settingsCache$removeConfigs$2 = new SettingsCache$removeConfigs$2(this.this$0, continuation);
settingsCache$removeConfigs$2.L$0 = obj;
return settingsCache$removeConfigs$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(C0257b c0257b, Continuation<? super Unit> continuation) {
return ((SettingsCache$removeConfigs$2) create(c0257b, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
C0257b c0257b = (C0257b) this.L$0;
c0257b.b();
c0257b.f4153a.clear();
this.this$0.updateSessionConfigs(c0257b);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,31 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.SettingsCache", f = "SettingsCache.kt", i = {}, l = {112}, m = "updateConfigValue", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SettingsCache$updateConfigValue$1<T> extends ContinuationImpl {
int label;
/* synthetic */ Object result;
final /* synthetic */ SettingsCache this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SettingsCache$updateConfigValue$1(SettingsCache settingsCache, Continuation<? super SettingsCache$updateConfigValue$1> continuation) {
super(continuation);
this.this$0 = settingsCache;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object updateConfigValue;
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
updateConfigValue = this.this$0.updateConfigValue(null, null, this);
return updateConfigValue;
}
}

View File

@@ -0,0 +1,69 @@
package com.google.firebase.sessions.settings;
import b0.C0257b;
import b0.C0260e;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u00002\u0006\u0010\u0002\u001a\u00020\u0001H\u008a@¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"T", "Lb0/b;", "preferences", "", "<anonymous>", "(Lb0/b;)V"}, k = 3, mv = {1, 7, 1})
@DebugMetadata(c = "com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2", f = "SettingsCache.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class SettingsCache$updateConfigValue$2 extends SuspendLambda implements Function2<C0257b, Continuation<? super Unit>, Object> {
final /* synthetic */ C0260e $key;
final /* synthetic */ T $value;
/* synthetic */ Object L$0;
int label;
final /* synthetic */ SettingsCache this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SettingsCache$updateConfigValue$2(T t2, C0260e c0260e, SettingsCache settingsCache, Continuation<? super SettingsCache$updateConfigValue$2> continuation) {
super(2, continuation);
this.$value = t2;
this.$key = c0260e;
this.this$0 = settingsCache;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
SettingsCache$updateConfigValue$2 settingsCache$updateConfigValue$2 = new SettingsCache$updateConfigValue$2(this.$value, this.$key, this.this$0, continuation);
settingsCache$updateConfigValue$2.L$0 = obj;
return settingsCache$updateConfigValue$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(C0257b c0257b, Continuation<? super Unit> continuation) {
return ((SettingsCache$updateConfigValue$2) create(c0257b, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
C0257b c0257b = (C0257b) this.L$0;
Object obj2 = this.$value;
if (obj2 != null) {
C0260e key = this.$key;
c0257b.getClass();
Intrinsics.checkNotNullParameter(key, "key");
c0257b.c(key, obj2);
} else {
C0260e key2 = this.$key;
c0257b.getClass();
Intrinsics.checkNotNullParameter(key2, "key");
c0257b.b();
c0257b.f4153a.remove(key2);
}
this.this$0.updateSessionConfigs(c0257b);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,311 @@
package com.google.firebase.sessions.settings;
import Y.InterfaceC0091g;
import b0.AbstractC0262g;
import b0.C0257b;
import b0.C0260e;
import b0.C0263h;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.util.Collections;
import java.util.Map;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__BuildersKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowKt;
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\u0006\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\r\n\u0002\u0010\t\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0000\u0018\u0000 32\u00020\u0001:\u00013B\u0015\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002¢\u0006\u0004\b\u0005\u0010\u0006J\u0017\u0010\t\u001a\u00020\b2\u0006\u0010\u0007\u001a\u00020\u0003H\u0002¢\u0006\u0004\b\t\u0010\nJ1\u0010\u000f\u001a\u00020\b\"\u0004\b\u0000\u0010\u000b2\f\u0010\r\u001a\b\u0012\u0004\u0012\u00028\u00000\f2\b\u0010\u000e\u001a\u0004\u0018\u00018\u0000H\u0082@ø\u0001\u0000¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0014\u001a\u00020\u0011H\u0000¢\u0006\u0004\b\u0012\u0010\u0013J\u000f\u0010\u0015\u001a\u0004\u0018\u00010\u0011¢\u0006\u0004\b\u0015\u0010\u0016J\u000f\u0010\u0018\u001a\u0004\u0018\u00010\u0017¢\u0006\u0004\b\u0018\u0010\u0019J\u000f\u0010\u001b\u001a\u0004\u0018\u00010\u001a¢\u0006\u0004\b\u001b\u0010\u001cJ\u001d\u0010\u001e\u001a\u00020\b2\b\u0010\u001d\u001a\u0004\u0018\u00010\u0011H\u0086@ø\u0001\u0000¢\u0006\u0004\b\u001e\u0010\u001fJ\u001d\u0010!\u001a\u00020\b2\b\u0010 \u001a\u0004\u0018\u00010\u0017H\u0086@ø\u0001\u0000¢\u0006\u0004\b!\u0010\"J\u001d\u0010$\u001a\u00020\b2\b\u0010#\u001a\u0004\u0018\u00010\u001aH\u0086@ø\u0001\u0000¢\u0006\u0004\b$\u0010%J\u001d\u0010'\u001a\u00020\b2\b\u0010&\u001a\u0004\u0018\u00010\u001aH\u0086@ø\u0001\u0000¢\u0006\u0004\b'\u0010%J\u001d\u0010*\u001a\u00020\b2\b\u0010)\u001a\u0004\u0018\u00010(H\u0086@ø\u0001\u0000¢\u0006\u0004\b*\u0010+J\u0013\u0010.\u001a\u00020\bH\u0081@ø\u0001\u0000¢\u0006\u0004\b,\u0010-R\u001a\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0004\u0010/R\u0016\u00101\u001a\u0002008\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b1\u00102\u0082\u0002\u0004\n\u0002\b\u0019¨\u00064"}, d2 = {"Lcom/google/firebase/sessions/settings/SettingsCache;", "", "LY/g;", "Lb0/g;", "dataStore", "<init>", "(LY/g;)V", "preferences", "", "updateSessionConfigs", "(Lb0/g;)V", "T", "Lb0/e;", "key", "value", "updateConfigValue", "(Lb0/e;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "", "hasCacheExpired$com_google_firebase_firebase_sessions", "()Z", "hasCacheExpired", "sessionsEnabled", "()Ljava/lang/Boolean;", "", "sessionSamplingRate", "()Ljava/lang/Double;", "", "sessionRestartTimeout", "()Ljava/lang/Integer;", "enabled", "updateSettingsEnabled", "(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "rate", "updateSamplingRate", "(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "timeoutInSeconds", "updateSessionRestartTimeout", "(Ljava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "cacheDurationInSeconds", "updateSessionCacheDuration", "", "cacheUpdatedTime", "updateSessionCacheUpdatedTime", "(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "removeConfigs$com_google_firebase_firebase_sessions", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "removeConfigs", "LY/g;", "Lcom/google/firebase/sessions/settings/SessionConfigs;", "sessionConfigs", "Lcom/google/firebase/sessions/settings/SessionConfigs;", "Companion", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public final class SettingsCache {
@Deprecated
private static final C0260e CACHE_DURATION_SECONDS;
@Deprecated
private static final C0260e CACHE_UPDATED_TIME;
private static final Companion Companion = new Companion(null);
@Deprecated
private static final C0260e RESTART_TIMEOUT_SECONDS;
@Deprecated
private static final C0260e SAMPLING_RATE;
@Deprecated
private static final C0260e SESSIONS_ENABLED;
@Deprecated
public static final String TAG = "SettingsCache";
private final InterfaceC0091g dataStore;
private SessionConfigs sessionConfigs;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
@DebugMetadata(c = "com.google.firebase.sessions.settings.SettingsCache$1", f = "SettingsCache.kt", i = {}, l = {46}, m = "invokeSuspend", n = {}, s = {})
/* renamed from: com.google.firebase.sessions.settings.SettingsCache$1, reason: invalid class name */
/* loaded from: classes3.dex */
public static final class AnonymousClass1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
Object L$0;
int label;
public AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
super(2, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
return new AnonymousClass1(continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
SettingsCache settingsCache;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
SettingsCache settingsCache2 = SettingsCache.this;
Flow b4 = settingsCache2.dataStore.b();
this.L$0 = settingsCache2;
this.label = 1;
Object first = FlowKt.first(b4, this);
if (first == coroutine_suspended) {
return coroutine_suspended;
}
obj = first;
settingsCache = settingsCache2;
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
settingsCache = (SettingsCache) this.L$0;
ResultKt.throwOnFailure(obj);
}
AbstractC0262g abstractC0262g = (AbstractC0262g) obj;
abstractC0262g.getClass();
Map unmodifiableMap = Collections.unmodifiableMap(((C0257b) abstractC0262g).f4153a);
Intrinsics.checkNotNullExpressionValue(unmodifiableMap, "unmodifiableMap(preferencesMap)");
settingsCache.updateSessionConfigs(new C0257b(MapsKt.toMutableMap(unmodifiableMap), true));
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0006\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0082\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u001d\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00048\u0006¢\u0006\f\n\u0004\b\u0006\u0010\u0007\u001a\u0004\b\b\u0010\tR\u001d\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\n0\u00048\u0006¢\u0006\f\n\u0004\b\u000b\u0010\u0007\u001a\u0004\b\f\u0010\tR\u001d\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\r0\u00048\u0006¢\u0006\f\n\u0004\b\u000e\u0010\u0007\u001a\u0004\b\u000f\u0010\tR\u001d\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\r0\u00048\u0006¢\u0006\f\n\u0004\b\u0010\u0010\u0007\u001a\u0004\b\u0011\u0010\tR\u001d\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00120\u00048\u0006¢\u0006\f\n\u0004\b\u0013\u0010\u0007\u001a\u0004\b\u0014\u0010\tR\u0014\u0010\u0016\u001a\u00020\u00158\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017¨\u0006\u0018"}, d2 = {"Lcom/google/firebase/sessions/settings/SettingsCache$Companion;", "", "<init>", "()V", "Lb0/e;", "", "SESSIONS_ENABLED", "Lb0/e;", "getSESSIONS_ENABLED", "()Lb0/e;", "", "SAMPLING_RATE", "getSAMPLING_RATE", "", "RESTART_TIMEOUT_SECONDS", "getRESTART_TIMEOUT_SECONDS", "CACHE_DURATION_SECONDS", "getCACHE_DURATION_SECONDS", "", "CACHE_UPDATED_TIME", "getCACHE_UPDATED_TIME", "", "TAG", "Ljava/lang/String;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final C0260e getCACHE_DURATION_SECONDS() {
return SettingsCache.CACHE_DURATION_SECONDS;
}
public final C0260e getCACHE_UPDATED_TIME() {
return SettingsCache.CACHE_UPDATED_TIME;
}
public final C0260e getRESTART_TIMEOUT_SECONDS() {
return SettingsCache.RESTART_TIMEOUT_SECONDS;
}
public final C0260e getSAMPLING_RATE() {
return SettingsCache.SAMPLING_RATE;
}
public final C0260e getSESSIONS_ENABLED() {
return SettingsCache.SESSIONS_ENABLED;
}
private Companion() {
}
}
static {
Intrinsics.checkNotNullParameter(LocalOverrideSettings.SESSIONS_ENABLED, AppMeasurementSdk.ConditionalUserProperty.NAME);
SESSIONS_ENABLED = new C0260e(LocalOverrideSettings.SESSIONS_ENABLED);
Intrinsics.checkNotNullParameter(LocalOverrideSettings.SAMPLING_RATE, AppMeasurementSdk.ConditionalUserProperty.NAME);
SAMPLING_RATE = new C0260e(LocalOverrideSettings.SAMPLING_RATE);
Intrinsics.checkNotNullParameter("firebase_sessions_restart_timeout", AppMeasurementSdk.ConditionalUserProperty.NAME);
RESTART_TIMEOUT_SECONDS = new C0260e("firebase_sessions_restart_timeout");
Intrinsics.checkNotNullParameter("firebase_sessions_cache_duration", AppMeasurementSdk.ConditionalUserProperty.NAME);
CACHE_DURATION_SECONDS = new C0260e("firebase_sessions_cache_duration");
Intrinsics.checkNotNullParameter("firebase_sessions_cache_updated_time", AppMeasurementSdk.ConditionalUserProperty.NAME);
CACHE_UPDATED_TIME = new C0260e("firebase_sessions_cache_updated_time");
}
public SettingsCache(InterfaceC0091g dataStore) {
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
this.dataStore = dataStore;
BuildersKt__BuildersKt.runBlocking$default(null, new AnonymousClass1(null), 1, null);
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Can't wrap try/catch for region: R(9:1|(2:3|(7:5|6|7|(1:(1:10)(2:16|17))(3:18|19|(1:21))|11|12|13))|24|6|7|(0)(0)|11|12|13) */
/* JADX WARN: Code restructure failed: missing block: B:22:0x004a, code lost:
r5 = move-exception;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x004b, code lost:
android.util.Log.w(com.google.firebase.sessions.settings.SettingsCache.TAG, "Failed to update cache config value: " + r5);
*/
/* JADX WARN: Removed duplicated region for block: B:18:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:9:0x0023 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final <T> java.lang.Object updateConfigValue(b0.C0260e r6, T r7, kotlin.coroutines.Continuation<? super kotlin.Unit> r8) {
/*
r5 = this;
boolean r0 = r8 instanceof com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$1
if (r0 == 0) goto L13
r0 = r8
com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$1 r0 = (com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$1 r0 = new com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$1
r0.<init>(r5, r8)
L18:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r8) // Catch: java.io.IOException -> L4a
goto L5e
L29:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L31:
kotlin.ResultKt.throwOnFailure(r8)
Y.g r8 = r5.dataStore // Catch: java.io.IOException -> L4a
com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2 r2 = new com.google.firebase.sessions.settings.SettingsCache$updateConfigValue$2 // Catch: java.io.IOException -> L4a
r4 = 0
r2.<init>(r7, r6, r5, r4) // Catch: java.io.IOException -> L4a
r0.label = r3 // Catch: java.io.IOException -> L4a
b0.h r5 = new b0.h // Catch: java.io.IOException -> L4a
r5.<init>(r2, r4) // Catch: java.io.IOException -> L4a
java.lang.Object r5 = r8.a(r5, r0) // Catch: java.io.IOException -> L4a
if (r5 != r1) goto L5e
return r1
L4a:
r5 = move-exception
java.lang.StringBuilder r6 = new java.lang.StringBuilder
java.lang.String r7 = "Failed to update cache config value: "
r6.<init>(r7)
r6.append(r5)
java.lang.String r5 = r6.toString()
java.lang.String r6 = "SettingsCache"
android.util.Log.w(r6, r5)
L5e:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.settings.SettingsCache.updateConfigValue(b0.e, java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX INFO: Access modifiers changed from: private */
public final void updateSessionConfigs(AbstractC0262g preferences) {
this.sessionConfigs = new SessionConfigs((Boolean) preferences.a(SESSIONS_ENABLED), (Double) preferences.a(SAMPLING_RATE), (Integer) preferences.a(RESTART_TIMEOUT_SECONDS), (Integer) preferences.a(CACHE_DURATION_SECONDS), (Long) preferences.a(CACHE_UPDATED_TIME));
}
public final boolean hasCacheExpired$com_google_firebase_firebase_sessions() {
SessionConfigs sessionConfigs = this.sessionConfigs;
SessionConfigs sessionConfigs2 = null;
if (sessionConfigs == null) {
Intrinsics.throwUninitializedPropertyAccessException("sessionConfigs");
sessionConfigs = null;
}
Long cacheUpdatedTime = sessionConfigs.getCacheUpdatedTime();
SessionConfigs sessionConfigs3 = this.sessionConfigs;
if (sessionConfigs3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sessionConfigs");
} else {
sessionConfigs2 = sessionConfigs3;
}
Integer cacheDuration = sessionConfigs2.getCacheDuration();
return cacheUpdatedTime == null || cacheDuration == null || (System.currentTimeMillis() - cacheUpdatedTime.longValue()) / ((long) 1000) >= ((long) cacheDuration.intValue());
}
public final Object removeConfigs$com_google_firebase_firebase_sessions(Continuation<? super Unit> continuation) {
Object a2 = this.dataStore.a(new C0263h(new SettingsCache$removeConfigs$2(this, null), null), continuation);
return a2 == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? a2 : Unit.INSTANCE;
}
public final Integer sessionRestartTimeout() {
SessionConfigs sessionConfigs = this.sessionConfigs;
if (sessionConfigs == null) {
Intrinsics.throwUninitializedPropertyAccessException("sessionConfigs");
sessionConfigs = null;
}
return sessionConfigs.getSessionRestartTimeout();
}
public final Double sessionSamplingRate() {
SessionConfigs sessionConfigs = this.sessionConfigs;
if (sessionConfigs == null) {
Intrinsics.throwUninitializedPropertyAccessException("sessionConfigs");
sessionConfigs = null;
}
return sessionConfigs.getSessionSamplingRate();
}
public final Boolean sessionsEnabled() {
SessionConfigs sessionConfigs = this.sessionConfigs;
if (sessionConfigs == null) {
Intrinsics.throwUninitializedPropertyAccessException("sessionConfigs");
sessionConfigs = null;
}
return sessionConfigs.getSessionEnabled();
}
public final Object updateSamplingRate(Double d4, Continuation<? super Unit> continuation) {
Object updateConfigValue = updateConfigValue(SAMPLING_RATE, d4, continuation);
return updateConfigValue == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? updateConfigValue : Unit.INSTANCE;
}
public final Object updateSessionCacheDuration(Integer num, Continuation<? super Unit> continuation) {
Object updateConfigValue = updateConfigValue(CACHE_DURATION_SECONDS, num, continuation);
return updateConfigValue == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? updateConfigValue : Unit.INSTANCE;
}
public final Object updateSessionCacheUpdatedTime(Long l4, Continuation<? super Unit> continuation) {
Object updateConfigValue = updateConfigValue(CACHE_UPDATED_TIME, l4, continuation);
return updateConfigValue == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? updateConfigValue : Unit.INSTANCE;
}
public final Object updateSessionRestartTimeout(Integer num, Continuation<? super Unit> continuation) {
Object updateConfigValue = updateConfigValue(RESTART_TIMEOUT_SECONDS, num, continuation);
return updateConfigValue == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? updateConfigValue : Unit.INSTANCE;
}
public final Object updateSettingsEnabled(Boolean bool, Continuation<? super Unit> continuation) {
Object updateConfigValue = updateConfigValue(SESSIONS_ENABLED, bool, continuation);
return updateConfigValue == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? updateConfigValue : Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,34 @@
package com.google.firebase.sessions.settings;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.time.Duration;
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\b`\u0018\u00002\u00020\u0001J\b\u0010\u000e\u001a\u00020\u0007H\u0016J\u0011\u0010\u000f\u001a\u00020\u0010H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u0011R\u0014\u0010\u0002\u001a\u0004\u0018\u00010\u0003X¦\u0004¢\u0006\u0006\u001a\u0004\b\u0004\u0010\u0005R\u0014\u0010\u0006\u001a\u0004\u0018\u00010\u0007X¦\u0004¢\u0006\u0006\u001a\u0004\b\b\u0010\tR\u001d\u0010\n\u001a\u0004\u0018\u00010\u000bX¦\u0004ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b\f\u0010\r\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006\u0012"}, d2 = {"Lcom/google/firebase/sessions/settings/SettingsProvider;", "", "samplingRate", "", "getSamplingRate", "()Ljava/lang/Double;", "sessionEnabled", "", "getSessionEnabled", "()Ljava/lang/Boolean;", "sessionRestartTimeout", "Lkotlin/time/Duration;", "getSessionRestartTimeout-FghU774", "()Lkotlin/time/Duration;", "isSettingsStale", "updateSettings", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public interface SettingsProvider {
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
/* loaded from: classes3.dex */
public static final class DefaultImpls {
public static boolean isSettingsStale(SettingsProvider settingsProvider) {
return false;
}
public static Object updateSettings(SettingsProvider settingsProvider, Continuation<? super Unit> continuation) {
return Unit.INSTANCE;
}
}
Double getSamplingRate();
Boolean getSessionEnabled();
/* renamed from: getSessionRestartTimeout-FghU774 */
Duration mo104getSessionRestartTimeoutFghU774();
boolean isSettingsStale();
Object updateSettings(Continuation<? super Unit> continuation);
}