调研通 v3.0.3版本的 MD5 值为:fe075d21227d488bdb9f6aa09d3b3f35

以下内容为反编译后的 a0.java 源代码,内容仅作参考


package com.yyt.common.custom;

import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import java.io.FileInputStream;
import java.io.IOException;
import org.apache.cordova.engine.SystemWebViewClient;
import org.apache.cordova.engine.SystemWebViewEngine;
import org.apache.http.protocol.HTTP;
import org.eclipse.paho.client.mqttv3.MqttTopic;

public class a0 extends SystemWebViewClient {
    public a0(SystemWebViewEngine systemWebViewEngine) {
        super(systemWebViewEngine);
    }

    @Override
    public WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
        try {
            if (str.lastIndexOf("?") > 0) {
                str = str.substring(0, str.lastIndexOf("?"));
            }
            if (str != null && str.startsWith("file:///ycmobileupdate/resources/default/apps/")) {
                String substring = str.substring(str.indexOf("file:///ycmobileupdate/resources/default/apps/") + 46, str.length());
                String i = com.yyt.common.o.s.i(webView.getContext(), substring.split(MqttTopic.TOPIC_LEVEL_SEPARATOR)[0]);
                if (i != null) {
                    if (str.endsWith(".css")) {
                        return new WebResourceResponse("text/css", "UTF8", new FileInputStream(i + substring));
                    }
                    return new WebResourceResponse("application/javascript", "UTF8", new FileInputStream(i + substring));
                }
            } else if (str != null && str.startsWith("file:///ycmobileupdate/resources/")) {
                if (!com.yyt.common.resources.plugin.q.d(this.parentEngine.getView().getContext())) {
                    String substring2 = str.substring(str.indexOf("file:///ycmobileupdate/resources/") + 33, str.length());
                    if (str.endsWith(".css")) {
                        return new WebResourceResponse("text/css", "UTF8", webView.getContext().getAssets().open("www/" + substring2));
                    }
                    return new WebResourceResponse("application/javascript", "UTF8", webView.getContext().getAssets().open("www/" + substring2));
                }
                String replace = str.replace("file:///ycmobileupdate/resources", com.yyt.common.resources.plugin.q.b(this.parentEngine.getView().getContext()));
                if (replace.endsWith(".css")) {
                    return new WebResourceResponse("text/css", "UTF8", new FileInputStream(replace));
                }
                return new WebResourceResponse("application/javascript", "UTF8", new FileInputStream(replace));
            }
            if (str != null && str.contains("/yytinjection/")) {
                return new WebResourceResponse("application/javascript", "UTF8", webView.getContext().getAssets().open(str.substring(str.indexOf("/yytinjection/") + 14, str.length())));
            }
            return super.shouldInterceptRequest(webView, str);
        } catch (IOException unused) {
            return new WebResourceResponse(HTTP.PLAIN_TEXT_TYPE, "UTF-8", null);
        }
    }
}