Initial import of ADIF API reverse-engineering toolkit

This commit is contained in:
2025-12-16 08:37:56 +01:00
commit 60388529c1
11486 changed files with 1086536 additions and 0 deletions

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\\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\\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\\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\\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\\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\\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\\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\\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\\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\\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);
}