- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
107 lines
4.7 KiB
Java
107 lines
4.7 KiB
Java
package com.google.firebase.sessions;
|
|
|
|
import android.content.Context;
|
|
import android.util.Log;
|
|
import androidx.datastore.core.DataStore;
|
|
import androidx.datastore.preferences.core.MutablePreferences;
|
|
import androidx.datastore.preferences.core.PreferencesKt;
|
|
import com.google.firebase.sessions.SessionDatastoreImpl;
|
|
import java.io.IOException;
|
|
import kotlin.ResultKt;
|
|
import kotlin.Unit;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
|
|
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class SessionDatastoreImpl$updateSessionId$1 extends SuspendLambda implements Function2 {
|
|
public final /* synthetic */ String $sessionId;
|
|
public int label;
|
|
public final /* synthetic */ SessionDatastoreImpl this$0;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public SessionDatastoreImpl$updateSessionId$1(SessionDatastoreImpl sessionDatastoreImpl, String str, Continuation continuation) {
|
|
super(2, continuation);
|
|
this.this$0 = sessionDatastoreImpl;
|
|
this.$sessionId = str;
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Continuation create(Object obj, Continuation continuation) {
|
|
return new SessionDatastoreImpl$updateSessionId$1(this.this$0, this.$sessionId, continuation);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
|
|
return ((SessionDatastoreImpl$updateSessionId$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Object invokeSuspend(Object obj) {
|
|
Object coroutine_suspended;
|
|
SessionDatastoreImpl.Companion companion;
|
|
Context context;
|
|
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
|
int i = this.label;
|
|
try {
|
|
if (i == 0) {
|
|
ResultKt.throwOnFailure(obj);
|
|
companion = SessionDatastoreImpl.Companion;
|
|
context = this.this$0.context;
|
|
DataStore dataStore = companion.getDataStore(context);
|
|
AnonymousClass1 anonymousClass1 = new AnonymousClass1(this.$sessionId, null);
|
|
this.label = 1;
|
|
if (PreferencesKt.edit(dataStore, anonymousClass1, this) == coroutine_suspended) {
|
|
return coroutine_suspended;
|
|
}
|
|
} else {
|
|
if (i != 1) {
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
|
}
|
|
ResultKt.throwOnFailure(obj);
|
|
}
|
|
} catch (IOException e) {
|
|
Log.w("FirebaseSessionsRepo", "Failed to update session Id: " + e);
|
|
}
|
|
return Unit.INSTANCE;
|
|
}
|
|
|
|
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$updateSessionId$1$1, reason: invalid class name */
|
|
public static final class AnonymousClass1 extends SuspendLambda implements Function2 {
|
|
public final /* synthetic */ String $sessionId;
|
|
public /* synthetic */ Object L$0;
|
|
public int label;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(String str, Continuation continuation) {
|
|
super(2, continuation);
|
|
this.$sessionId = str;
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Continuation 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(MutablePreferences mutablePreferences, Continuation continuation) {
|
|
return ((AnonymousClass1) create(mutablePreferences, continuation)).invokeSuspend(Unit.INSTANCE);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
|
public final Object invokeSuspend(Object obj) {
|
|
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
|
if (this.label == 0) {
|
|
ResultKt.throwOnFailure(obj);
|
|
((MutablePreferences) this.L$0).set(SessionDatastoreImpl.FirebaseSessionDataKeys.INSTANCE.getSESSION_ID(), this.$sessionId);
|
|
return Unit.INSTANCE;
|
|
}
|
|
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
|
}
|
|
}
|
|
}
|