package io.flutter.plugins.webviewflutter;

import android.view.View;
import android.webkit.HttpAuthHandler;
import android.webkit.WebView;
import io.flutter.plugins.webviewflutter.WebViewClientProxyApi;
import io.sentry.EnumC0738m1;
import io.sentry.ILogger;
import io.sentry.android.core.ViewHierarchyEventProcessor;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;

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

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

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public final /* synthetic */ Object f6795l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final /* synthetic */ View f6796m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final /* synthetic */ Object f6797n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final /* synthetic */ Object f6798o;
    public final /* synthetic */ Object p;

    public /* synthetic */ F(WebViewClientProxyApi.WebViewClientImpl webViewClientImpl, WebView webView, HttpAuthHandler httpAuthHandler, String str, String str2) {
        this.f6794k = 1;
        this.f6795l = webViewClientImpl;
        this.f6796m = webView;
        this.p = httpAuthHandler;
        this.f6797n = str;
        this.f6798o = str2;
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f6794k) {
            case 0:
                ((WebViewClientProxyApi.WebViewClientImpl) this.f6795l).lambda$onReceivedLoginRequest$23((WebView) this.f6796m, (String) this.f6797n, (String) this.f6798o, (String) this.p);
                break;
            case 1:
                ((WebViewClientProxyApi.WebViewClientImpl) this.f6795l).lambda$onReceivedHttpAuthRequest$13((WebView) this.f6796m, (HttpAuthHandler) this.p, (String) this.f6797n, (String) this.f6798o);
                break;
            default:
                AtomicReference atomicReference = (AtomicReference) this.f6795l;
                View view = this.f6796m;
                List list = (List) this.f6797n;
                CountDownLatch countDownLatch = (CountDownLatch) this.f6798o;
                try {
                    ArrayList arrayList = new ArrayList(1);
                    io.sentry.protocol.F f6 = new io.sentry.protocol.F("android_view_system", arrayList);
                    io.sentry.protocol.G gC = ViewHierarchyEventProcessor.c(view);
                    arrayList.add(gC);
                    ViewHierarchyEventProcessor.b(view, gC, list);
                    atomicReference.set(f6);
                    countDownLatch.countDown();
                } catch (Throwable th) {
                    ((ILogger) this.p).p(EnumC0738m1.ERROR, "Failed to process view hierarchy.", th);
                }
                break;
        }
    }

    public /* synthetic */ F(Object obj, View view, Object obj2, Object obj3, Object obj4, int i) {
        this.f6794k = i;
        this.f6795l = obj;
        this.f6796m = view;
        this.f6797n = obj2;
        this.f6798o = obj3;
        this.p = obj4;
    }
}
