package defpackage;

import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Pair;

/* renamed from: ːˑʚ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final /* synthetic */ class RunnableC1962 implements Runnable {

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

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

    public /* synthetic */ RunnableC1962(C1757 c1757, int i) {
        this.f7896 = i;
        this.f7895 = c1757;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i = this.f7896;
        C1757 c1757 = this.f7895;
        switch (i) {
            case 0:
                c1757.m5014();
                break;
            case 1:
                C2954 c2954 = c1757.f7078;
                C4205 c4205 = (C4205) c2954.f11438;
                C1325 c1325 = c4205.f15698;
                C1757 c17572 = c4205.f15724;
                C4180 c4180 = c4205.f15717;
                C4205.m9132(c1325);
                c1325.m4042();
                if (c2954.m7225()) {
                    if (c2954.m7229()) {
                        C4205.m9134(c4180);
                        c4180.f15628.m9885(null);
                        Bundle bundle = new Bundle();
                        bundle.putString("source", "(not set)");
                        bundle.putString("medium", "(not set)");
                        bundle.putString("_cis", "intent");
                        bundle.putLong("_cc", 1L);
                        C4205.m9130(c17572);
                        c17572.m5008("auto", "_cmpx", bundle);
                    } else {
                        C4205.m9134(c4180);
                        C4699 c4699 = c4180.f15628;
                        String strM9880 = c4699.m9880();
                        if (TextUtils.isEmpty(strM9880)) {
                            C1736 c1736 = c4205.f15715;
                            C4205.m9132(c1736);
                            c1736.f6932.m6038("Cache still valid but referrer not found");
                        } else {
                            long j = 3600000;
                            long jM9666 = c4180.f15636.m9666() / 3600000;
                            Uri uri = Uri.parse(strM9880);
                            Bundle bundle2 = new Bundle();
                            Pair pair = new Pair(uri.getPath(), bundle2);
                            for (String str : uri.getQueryParameterNames()) {
                                bundle2.putString(str, uri.getQueryParameter(str));
                                j = j;
                            }
                            ((Bundle) pair.second).putLong("_cc", (jM9666 - 1) * j);
                            Object obj = pair.first;
                            String str2 = obj == null ? "app" : (String) obj;
                            C4205.m9130(c17572);
                            c17572.m5008(str2, "_cmp", (Bundle) pair.second);
                        }
                        c4699.m9885(null);
                    }
                    C4205.m9134(c4180);
                    c4180.f15636.m9668(0L);
                    break;
                }
                break;
            case 2:
                c1757.m6590();
                C4205 c42052 = (C4205) ((ᵢˇᵭ) c1757).ᵧᵾˀˈ;
                C4180 c41802 = c42052.f15717;
                C1736 c17362 = c42052.f15715;
                C4205.m9134(c41802);
                C3825 c3825 = c41802.f15632;
                if (c3825.m8467()) {
                    C4205.m9132(c17362);
                    c17362.f6941.m6038("Deferred Deep Link already retrieved. Not fetching again.");
                    break;
                } else {
                    C4550 c4550 = c41802.f15629;
                    long jM96662 = c4550.m9666();
                    c4550.m9668(1 + jM96662);
                    if (jM96662 >= 5) {
                        C4205.m9132(c17362);
                        c17362.f6934.m6038("Permanently failed to retrieve Deferred Deep Link. Reached maximum retries.");
                        c3825.m8468(true);
                        break;
                    } else {
                        if (c1757.f7069 == null) {
                            c1757.f7069 = new C1501(c1757, c42052, 3);
                        }
                        c1757.f7069.m11113(0L);
                        break;
                    }
                }
            default:
                c1757.m5014();
                break;
        }
    }
}
