package com.tencent.mm.plugin.webview.ui.tools.widget;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import java.util.regex.Pattern;

public class k$a {
    private static final Pattern hnu = Pattern.compile(".*#.*wechat_redirect");
    private String jVi = null;

    static {
        AppMethodBeat.i(9965);
        AppMethodBeat.o(9965);
    }

    public k$a(String str) {
        this.jVi = str;
    }

    public final int ael(String str) {
        AppMethodBeat.i(9964);
        if (bo.isNullOrNil(str)) {
            ab.e("MicroMsg.MMWebViewClient", "getReason fail, url is null");
            AppMethodBeat.o(9964);
            return 0;
        } else if (str.equals(this.jVi)) {
            AppMethodBeat.o(9964);
            return 0;
        } else if (hnu.matcher(str).find()) {
            AppMethodBeat.o(9964);
            return 2;
        } else {
            AppMethodBeat.o(9964);
            return 1;
        }
    }
}
