package defpackage;

import android.os.Bundle;
import android.os.RemoteException;
import android.text.TextUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicReference;

/* renamed from: ᵺᵴᵛᵟ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final /* synthetic */ class RunnableC5152 implements Runnable {

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public final /* synthetic */ Object f19180;

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ String f19181;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final /* synthetic */ Object f19182;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f19183 = 2;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final /* synthetic */ Object f19184;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final /* synthetic */ C1331 f19185;

    public RunnableC5152(C0323 c0323, String str, String str2, C1331 c1331, InterfaceC5008 interfaceC5008) {
        this.f19181 = str;
        this.f19184 = str2;
        this.f19185 = c1331;
        this.f19182 = interfaceC5008;
        this.f19180 = c0323;
    }

    public RunnableC5152(C0323 c0323, AtomicReference atomicReference, String str, String str2, C1331 c1331) {
        this.f19184 = atomicReference;
        this.f19181 = str;
        this.f19182 = str2;
        this.f19185 = c1331;
        this.f19180 = c0323;
    }

    public /* synthetic */ RunnableC5152(BinderC0769 binderC0769, C1331 c1331, Bundle bundle, InterfaceC2339 interfaceC2339, String str) {
        this.f19184 = binderC0769;
        this.f19185 = c1331;
        this.f19182 = bundle;
        this.f19180 = interfaceC2339;
        this.f19181 = str;
    }

    @Override // java.lang.Runnable
    public final void run() {
        AtomicReference atomicReference;
        C0323 c0323;
        InterfaceC3519 interfaceC3519;
        C4864 c4864;
        InterfaceC3519 interfaceC35192;
        switch (this.f19183) {
            case 0:
                BinderC0769 binderC0769 = (BinderC0769) this.f19184;
                C1331 c1331 = this.f19185;
                Bundle bundle = (Bundle) this.f19182;
                InterfaceC2339 interfaceC2339 = (InterfaceC2339) this.f19180;
                String str = this.f19181;
                C0524 c0524 = binderC0769.f3656;
                c0524.m2263();
                try {
                    interfaceC2339.mo5190(c0524.m2280(bundle, c1331));
                    return;
                } catch (RemoteException e) {
                    c0524.mo2272().f6937.m6037("Failed to return trigger URIs for app", str, e);
                    return;
                }
            case 1:
                AtomicReference atomicReference2 = (AtomicReference) this.f19184;
                synchronized (atomicReference2) {
                    try {
                        try {
                            c0323 = (C0323) this.f19180;
                            interfaceC3519 = c0323.f2002;
                        } catch (RemoteException e2) {
                            C1736 c1736 = ((C4205) ((ᵢˇᵭ) ((C0323) this.f19180)).ᵧᵾˀˈ).f15715;
                            C4205.m9132(c1736);
                            c1736.f6937.m6040("(legacy) Failed to get conditional properties; remote exception", null, this.f19181, e2);
                            ((AtomicReference) this.f19184).set(Collections.EMPTY_LIST);
                            atomicReference = (AtomicReference) this.f19184;
                        }
                        if (interfaceC3519 == null) {
                            C1736 c17362 = ((C4205) ((ᵢˇᵭ) c0323).ᵧᵾˀˈ).f15715;
                            C4205.m9132(c17362);
                            c17362.f6937.m6040("(legacy) Failed to get conditional properties; not connected to service", null, this.f19181, (String) this.f19182);
                            atomicReference2.set(Collections.EMPTY_LIST);
                            atomicReference2.notify();
                            return;
                        }
                        if (TextUtils.isEmpty(null)) {
                            atomicReference2.set(interfaceC3519.mo2198(this.f19181, (String) this.f19182, this.f19185));
                        } else {
                            atomicReference2.set(interfaceC3519.mo2204(null, this.f19181, (String) this.f19182));
                        }
                        c0323.m1736();
                        atomicReference = (AtomicReference) this.f19184;
                        atomicReference.notify();
                        return;
                    } catch (Throwable th) {
                        ((AtomicReference) this.f19184).notify();
                        throw th;
                    }
                }
            default:
                InterfaceC5008 interfaceC5008 = (InterfaceC5008) this.f19182;
                String str2 = (String) this.f19184;
                String str3 = this.f19181;
                C0323 c03232 = (C0323) this.f19180;
                ArrayList arrayList = new ArrayList();
                try {
                    try {
                        interfaceC35192 = c03232.f2002;
                    } catch (Throwable th2) {
                        C4864 c48642 = ((C4205) ((ᵢˇᵭ) c03232).ᵧᵾˀˈ).f15708;
                        C4205.m9134(c48642);
                        c48642.m10215(interfaceC5008, arrayList);
                        throw th2;
                    }
                } catch (RemoteException e3) {
                    C1736 c17363 = ((C4205) ((ᵢˇᵭ) c03232).ᵧᵾˀˈ).f15715;
                    C4205.m9132(c17363);
                    c17363.f6937.m6040("Failed to get conditional properties; remote exception", str3, str2, e3);
                }
                if (interfaceC35192 != null) {
                    arrayList = C4864.m10203(interfaceC35192.mo2198(str3, str2, this.f19185));
                    c03232.m1736();
                    c4864 = ((C4205) ((ᵢˇᵭ) c03232).ᵧᵾˀˈ).f15708;
                    C4205.m9134(c4864);
                    c4864.m10215(interfaceC5008, arrayList);
                    return;
                }
                C4205 c4205 = (C4205) ((ᵢˇᵭ) c03232).ᵧᵾˀˈ;
                C1736 c17364 = c4205.f15715;
                C4205.m9132(c17364);
                c17364.f6937.m6037("Failed to get conditional properties; not connected to service", str3, str2);
                c4864 = c4205.f15708;
                C4205.m9134(c4864);
                c4864.m10215(interfaceC5008, arrayList);
                return;
        }
    }
}
