热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e
以下内容为反编译后的 CtAccountJsBridge.java 源代码,内容仅作参考
package cn.com.chinatelecom.account.api;
import android.os.Handler;
import android.os.Looper;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import com.sensorsdata.analytics.android.sdk.jsbridge.JSHookAop;
public class CtAccountJsBridge implements cn.com.chinatelecom.account.api.b.a {
private static final String TAG = "CtAccountJsBridge";
public static Handler mHandler = new Handler(Looper.getMainLooper());
private a callback;
private WebView mWebView;
public interface a {
void a(String str);
}
public CtAccountJsBridge(WebView webView) {
this.mWebView = webView;
}
public CtAccountJsBridge(a aVar) {
this.callback = aVar;
}
@Override
public void callbackPreCode(final String str) {
String str2 = TAG;
CtAuth.info(str2, "callbackPreCode:" + str);
mHandler.post(new Runnable() {
@Override
public void run() {
if (CtAccountJsBridge.this.mWebView != null) {
WebView webView = CtAccountJsBridge.this.mWebView;
String str3 = "javascript:ejsBridge.callbackPreCode('" + str + "')";
webView.loadUrl(str3);
JSHookAop.loadUrl(webView, str3);
} else if (CtAccountJsBridge.this.callback != null) {
CtAccountJsBridge.this.callback.a("javascript:ejsBridge.callbackPreCode('" + str + "')");
}
}
});
}
@Override
public void callbackPreCodeParams(final String str) {
String str2 = TAG;
CtAuth.info(str2, "callbackPreCodeParams:" + str);
mHandler.post(new Runnable() {
@Override
public void run() {
if (CtAccountJsBridge.this.mWebView != null) {
WebView webView = CtAccountJsBridge.this.mWebView;
String str3 = "javascript:ejsBridge.callbackPreCodeParams('" + str + "')";
webView.loadUrl(str3);
JSHookAop.loadUrl(webView, str3);
} else if (CtAccountJsBridge.this.callback != null) {
CtAccountJsBridge.this.callback.a("javascript:ejsBridge.callbackPreCodeParams('" + str + "')");
}
}
});
}
@JavascriptInterface
public void getPreCodeParams(String str) {
String str2 = TAG;
CtAuth.info(str2, "getPreCodeParams:" + str);
CtAuth.getInstance().getPreCodeParamsByJs(str, this);
}
@JavascriptInterface
public void requestPreCode(String str) {
String str2 = TAG;
CtAuth.info(str2, "requestPreCode:" + str);
CtAuth.getInstance().requestPreCodeByJs(str, this);
}
}