package d;

import O1.C0225a;
import android.os.Bundle;
import e.InterfaceC0852a;
import h0.C1025z;
import java.util.ArrayList;
import java.util.HashMap;
import n4.u0;
import y5.AbstractActivityC1764i;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class e implements InterfaceC0852a {

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

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

    public /* synthetic */ e(AbstractActivityC1764i abstractActivityC1764i, int i) {
        this.f11262a = i;
        this.f11263b = abstractActivityC1764i;
    }

    @Override // e.InterfaceC0852a
    public final void a() {
        switch (this.f11262a) {
            case u0.f15495q /* 0 */:
                AbstractActivityC1764i abstractActivityC1764i = this.f11263b;
                Bundle bundleH = ((C0225a) abstractActivityC1764i.f11298u.f5011s).h("android:support:activity-result");
                if (bundleH != null) {
                    g gVar = abstractActivityC1764i.f11289A;
                    gVar.getClass();
                    ArrayList<Integer> integerArrayList = bundleH.getIntegerArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_RCS");
                    ArrayList<String> stringArrayList = bundleH.getStringArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS");
                    if (stringArrayList != null && integerArrayList != null) {
                        gVar.f11271d = bundleH.getStringArrayList("KEY_COMPONENT_ACTIVITY_LAUNCHED_KEYS");
                        Bundle bundle = bundleH.getBundle("KEY_COMPONENT_ACTIVITY_PENDING_RESULT");
                        Bundle bundle2 = gVar.f11274g;
                        bundle2.putAll(bundle);
                        for (int i = 0; i < stringArrayList.size(); i++) {
                            String str = stringArrayList.get(i);
                            HashMap map = gVar.f11269b;
                            boolean zContainsKey = map.containsKey(str);
                            HashMap map2 = gVar.f11268a;
                            if (zContainsKey) {
                                Integer num = (Integer) map.remove(str);
                                if (!bundle2.containsKey(str)) {
                                    map2.remove(num);
                                }
                            }
                            Integer num2 = integerArrayList.get(i);
                            num2.intValue();
                            String str2 = stringArrayList.get(i);
                            map2.put(num2, str2);
                            map.put(str2, num2);
                        }
                        break;
                    }
                }
                break;
            default:
                C1025z c1025z = (C1025z) this.f11263b.f18992I.f11784r;
                c1025z.f13308w.b(c1025z, c1025z, null);
                break;
        }
    }
}
