package o;

import android.text.Editable;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;
import ir.devixor.app.activity.WebViewActivity;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Xh, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final /* synthetic */ class ViewOnClickListenerC0604Xh implements View.OnClickListener {
    public final /* synthetic */ int l;
    public final /* synthetic */ Object m;

    public /* synthetic */ ViewOnClickListenerC0604Xh(int i, Object obj) {
        this.l = i;
        this.m = obj;
    }

    @Override // android.view.View.OnClickListener
    public final void onClick(View view) {
        InterfaceC0220Im interfaceC0220Im = null;
        switch (this.l) {
            case 0:
                C0738ai c0738ai = (C0738ai) this.m;
                EditText editText = c0738ai.i;
                if (editText == null) {
                    return;
                }
                Editable text = editText.getText();
                if (text != null) {
                    text.clear();
                }
                c0738ai.p();
                return;
            case 1:
                ((C0253Jt) this.m).t();
                return;
            case 2:
                ((LinearLayout) this.m).setVisibility(8);
                return;
            case 3:
                ((C0806bO) this.m).g();
                throw null;
            case 4:
                QV qv = (QV) this.m;
                EditText editText2 = qv.f;
                if (editText2 == null) {
                    return;
                }
                int selectionEnd = editText2.getSelectionEnd();
                EditText editText3 = qv.f;
                if (editText3 == null || !(editText3.getTransformationMethod() instanceof PasswordTransformationMethod)) {
                    qv.f.setTransformationMethod(PasswordTransformationMethod.getInstance());
                } else {
                    qv.f.setTransformationMethod(null);
                }
                if (selectionEnd >= 0) {
                    qv.f.setSelection(selectionEnd);
                }
                qv.p();
                return;
            default:
                WebViewActivity webViewActivity = (WebViewActivity) this.m;
                WebViewActivity webViewActivity2 = WebViewActivity.x;
                int i = 1;
                if (!webViewActivity.h()) {
                    Toast.makeText(webViewActivity, "اینترنت متصل نیست!", 1).show();
                    return;
                }
                Toast.makeText(webViewActivity, "در حال اتصال...", 0).show();
                webViewActivity.g();
                WebView webView = webViewActivity.m;
                if (webView == null) {
                    webView = null;
                }
                webView.clearHistory();
                WebView webView2 = webViewActivity.m;
                if (webView2 == null) {
                    webView2 = null;
                }
                webView2.clearCache(true);
                AbstractC1692kh0.C(AbstractC0662Zn.w(webViewActivity), null, new Uk0(webViewActivity, interfaceC0220Im, i), 3);
                return;
        }
    }
}
