package c.l;

import android.os.Bundle;
import c.o.b;
import java.util.Map;

/* JADX INFO: compiled from: SavedStateHandleSupport.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public final class a0 implements b.InterfaceC0024b {
    public final c.o.b a;

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Bundle f1755c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final g.g f1756d;

    /* JADX INFO: compiled from: SavedStateHandleSupport.kt */
    @g.i
    public static final class a extends g.h0.c.m implements g.h0.b.a<b0> {

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final /* synthetic */ h0 f1757b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public a(h0 h0Var) {
            super(0);
            this.f1757b = h0Var;
        }

        @Override // g.h0.b.a
        public b0 invoke() {
            return z.b(this.f1757b);
        }
    }

    public a0(c.o.b bVar, h0 h0Var) {
        g.h0.c.l.f(bVar, "savedStateRegistry");
        g.h0.c.l.f(h0Var, "viewModelStoreOwner");
        this.a = bVar;
        this.f1756d = f.a.y.a.v0(new a(h0Var));
    }

    @Override // c.o.b.InterfaceC0024b
    public Bundle a() {
        Bundle bundle = new Bundle();
        Bundle bundle2 = this.f1755c;
        if (bundle2 != null) {
            bundle.putAll(bundle2);
        }
        for (Map.Entry<String, y> entry : ((b0) this.f1756d.getValue()).f1758d.entrySet()) {
            String key = entry.getKey();
            Bundle bundleA = entry.getValue().f1804g.a();
            if (!g.h0.c.l.a(bundleA, Bundle.EMPTY)) {
                bundle.putBundle(key, bundleA);
            }
        }
        this.f1754b = false;
        return bundle;
    }

    public final void b() {
        if (this.f1754b) {
            return;
        }
        this.f1755c = this.a.a("androidx.lifecycle.internal.SavedStateHandlesProvider");
        this.f1754b = true;
    }
}
