package f;

import g.AbstractC0604a;
import java.util.ArrayList;
import java.util.LinkedHashMap;

/* JADX INFO: renamed from: f.g, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0584g extends AbstractC0580c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ AbstractC0585h f6319a;

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ AbstractC0604a f6321c;

    public C0584g(AbstractC0585h abstractC0585h, String str, AbstractC0604a abstractC0604a) {
        this.f6319a = abstractC0585h;
        this.f6320b = str;
        this.f6321c = abstractC0604a;
    }

    public final void a(Object obj) {
        AbstractC0585h abstractC0585h = this.f6319a;
        LinkedHashMap linkedHashMap = abstractC0585h.f6323b;
        String str = this.f6320b;
        Object obj2 = linkedHashMap.get(str);
        AbstractC0604a abstractC0604a = this.f6321c;
        if (obj2 == null) {
            throw new IllegalStateException(("Attempting to launch an unregistered ActivityResultLauncher with contract " + abstractC0604a + " and input " + obj + ". You must ensure the ActivityResultLauncher is registered before calling launch().").toString());
        }
        int iIntValue = ((Number) obj2).intValue();
        ArrayList arrayList = abstractC0585h.f6325d;
        arrayList.add(str);
        try {
            abstractC0585h.b(iIntValue, abstractC0604a, obj);
        } catch (Exception e2) {
            arrayList.remove(str);
            throw e2;
        }
    }

    public final void b() {
        this.f6319a.f(this.f6320b);
    }
}
