package androidx.window.layout;

import android.app.Activity;
import kotlin.coroutines.EmptyCoroutineContext;
import kotlinx.coroutines.channels.BufferOverflow;
import kotlinx.coroutines.h0;
import kotlinx.coroutines.i1;
import kotlinx.coroutines.u;
import kotlinx.coroutines.y;

/* JADX INFO: loaded from: classes.dex */
public final class m implements k {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final c4.a f4486b;

    public m(c4.a aVar) {
        r rVar = r.f4493b;
        this.f4486b = aVar;
    }

    @Override // androidx.window.layout.k
    public final kotlinx.coroutines.flow.f a(Activity activity) {
        nb.g.i(activity, "activity");
        WindowInfoTrackerImpl$windowLayoutInfo$2 windowInfoTrackerImpl$windowLayoutInfo$2 = new WindowInfoTrackerImpl$windowLayoutInfo$2(this, activity, null);
        EmptyCoroutineContext emptyCoroutineContext = EmptyCoroutineContext.f29221a;
        kotlinx.coroutines.flow.b bVar = new kotlinx.coroutines.flow.b(windowInfoTrackerImpl$windowLayoutInfo$2, emptyCoroutineContext, -2, BufferOverflow.f29297a);
        be.d dVar = h0.f29440a;
        i1 i1Var = kotlinx.coroutines.internal.n.f29483a;
        if (i1Var.m(u.f29565b) == null) {
            return nb.g.c(i1Var, emptyCoroutineContext) ? bVar : y.p(bVar, i1Var, 0, null, 6);
        }
        throw new IllegalArgumentException(("Flow context cannot contain job in it. Had " + i1Var).toString());
    }
}
