package o;

import android.os.Bundle;
import java.util.Arrays;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.g40, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1259g40 implements InterfaceC1545j40 {
    public final C1640k40 a;
    public boolean b;
    public Bundle c;
    public final C1014dc0 d;

    public C1259g40(C1640k40 c1640k40, InterfaceC1508ik0 interfaceC1508ik0) {
        this.a = c1640k40;
        this.d = new C1014dc0(new C1164f5(15, interfaceC1508ik0));
    }

    @Override // o.InterfaceC1545j40
    public final Bundle a() {
        Bundle bundleF = AbstractC0940cn0.f((C3001yV[]) Arrays.copyOf(new C3001yV[0], 0));
        Bundle bundle = this.c;
        if (bundle != null) {
            bundleF.putAll(bundle);
        }
        for (Map.Entry entry : ((C1355h40) this.d.getValue()).b.entrySet()) {
            String str = (String) entry.getKey();
            Bundle bundleA = ((C3024yj) ((C0972d40) entry.getValue()).a.q).a();
            if (!bundleA.isEmpty()) {
                bundleF.putBundle(str, bundleA);
            }
        }
        this.b = false;
        return bundleF;
    }

    public final void b() {
        if (this.b) {
            return;
        }
        Bundle bundleA = this.a.a("androidx.lifecycle.internal.SavedStateHandlesProvider");
        Bundle bundleF = AbstractC0940cn0.f((C3001yV[]) Arrays.copyOf(new C3001yV[0], 0));
        Bundle bundle = this.c;
        if (bundle != null) {
            bundleF.putAll(bundle);
        }
        if (bundleA != null) {
            bundleF.putAll(bundleA);
        }
        this.c = bundleF;
        this.b = true;
    }
}
