惠合 v3.0.0版本的 MD5 值为:0eb47ffc7a53a6b708a3b4e3f9ed0e8c
以下内容为反编译后的 ServicesWebActivity$initWebView$1.java 源代码,内容仅作参考
package com.payeasenet.service.sdk.ui.activity;
import android.text.TextUtils;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import com.ehking.sdk.wepay.constant.Constants;
import com.ehking.sdk.wepay.interfaces.WalletPay;
import com.ehking.sdk.wepay.net.bean.AuthType;
import com.ehking.sdk.wepay.utlis.LogUtil;
import com.google.gson.Gson;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0017\n\u0000\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0019\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0007¢\u0006\u0004\b\u0005\u0010\u0006J\u0017\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0002H\u0007¢\u0006\u0004\b\b\u0010\u0006¨\u0006\t"}, d2 = {"com/payeasenet/service/sdk/ui/activity/ServicesWebActivity$initWebView$1", "", "", "token", "", "servicesPayEvent", "(Ljava/lang/String;)V", "title", "setNavigationTitle", "ServiceSdk_release"}, k = 1, mv = {1, 4, 0})
public final class ServicesWebActivity$initWebView$1 {
public final ServicesWebActivity this$0;
public ServicesWebActivity$initWebView$1(ServicesWebActivity servicesWebActivity) {
this.this$0 = servicesWebActivity;
}
@JavascriptInterface
public final void servicesPayEvent(@Nullable final String str) {
if (TextUtils.isEmpty(str)) {
return;
}
this.this$0.runOnUiThread(new Runnable() {
@Override
public final void run() {
WalletPay companion = WalletPay.Companion.getInstance();
companion.init(ServicesWebActivity$initWebView$1.this.this$0);
String str2 = Constants.merchantId;
if (str2 == null) {
Intrinsics.throwNpe();
}
String str3 = Constants.walletId;
if (str3 == null) {
Intrinsics.throwNpe();
}
String str4 = str;
if (str4 == null) {
Intrinsics.throwNpe();
}
WalletPay.evoke$default(companion, str2, str3, str4, AuthType.APP_PAY.name(), null, null, new WalletPay.ServicePayCallback() {
@Override
public void callback(@Nullable String str5, @Nullable String str6, @Nullable String str7) {
WebView webView;
HashMap hashMap = new HashMap();
if (str5 != null) {
hashMap.put("source", str5);
}
if (str6 != null) {
hashMap.put("status", str6);
}
if (str7 != null) {
hashMap.put("errorMessage", str7);
}
String json = new Gson().toJson(hashMap);
webView = ServicesWebActivity$initWebView$1.this.this$0.mWebView;
if (webView == null) {
Intrinsics.throwNpe();
}
webView.loadUrl("javascript:payResult('" + json + "')");
LogUtil.i(json);
}
}, 48, null);
}
});
}
@JavascriptInterface
public final void setNavigationTitle(@NotNull String title) {
Intrinsics.checkParameterIsNotNull(title, "title");
this.this$0.setTopTitle(title);
}
}