package androidx.lifecycle;

import androidx.lifecycle.g;

/* JADX INFO: loaded from: classes.dex */
final class SavedStateHandleController implements i {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final String f2534a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private boolean f2535b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final v f2536c;

    @Override // androidx.lifecycle.i
    public void g(k kVar, g.b bVar) {
        if (bVar == g.b.ON_DESTROY) {
            this.f2535b = false;
            kVar.a().c(this);
        }
    }

    void h(g0.c cVar, g gVar) {
        if (this.f2535b) {
            throw new IllegalStateException("Already attached to lifecycleOwner");
        }
        this.f2535b = true;
        gVar.a(this);
        cVar.h(this.f2534a, this.f2536c.c());
    }

    boolean i() {
        return this.f2535b;
    }
}
