package Q4;

import Z6.InterfaceC0382w;
import android.util.Log;
import com.google.android.gms.internal.measurement.C1;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class Y extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f5724u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ String f5725v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public Y(String str, E6.d dVar) {
        super(2, dVar);
        this.f5725v = str;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((Y) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new Y(this.f5725v, dVar);
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        F6.a aVar = F6.a.f2580q;
        int i = this.f5724u;
        if (i == 0) {
            C1.N(obj);
            R4.c cVar = R4.c.f6074a;
            this.f5724u = 1;
            obj = cVar.b(this);
            if (obj == aVar) {
                return aVar;
            }
        } else {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
        }
        Collection<k4.j> collectionValues = ((Map) obj).values();
        String str = this.f5725v;
        for (k4.j jVar : collectionValues) {
            R4.e eVar = new R4.e(str);
            jVar.getClass();
            String str2 = "App Quality Sessions session changed: " + eVar;
            if (Log.isLoggable("FirebaseCrashlytics", 3)) {
                Log.d("FirebaseCrashlytics", str2, null);
            }
            k4.i iVar = jVar.f13868b;
            synchronized (iVar) {
                if (!Objects.equals(iVar.f13866c, str)) {
                    k4.i.a(iVar.f13864a, iVar.f13865b, str);
                    iVar.f13866c = str;
                }
            }
            Log.d("SessionLifecycleClient", "Notified " + R4.d.f6076q + " of new session " + str);
        }
        return A6.n.f457a;
    }
}
