星辰影院解锁vip v1.0.4版本的 MD5 值为:3d99bbcbb0d5d5e568b9f6134424c24e
以下内容为反编译后的 QYVerificationCenter.java 源代码,内容仅作参考
package com.iqiyi.qyverificationcenter;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import androidx.annotation.Keep;
import com.iqiyi.biologicalprobe.LogMgr;
import com.iqiyi.biologicalprobe.QYBioDetector;
import com.iqiyi.biologicalprobe.bean.BioCacheManager;
import com.iqiyi.biologicalprobe.bean.BioConstant;
import com.iqiyi.biologicalprobe.utils.Utils;
import com.iqiyi.qyverificationcenter.bean.QYVerifyConstants;
import com.iqiyi.qyverificationcenter.bean.http.ResponseBean;
import com.iqiyi.qyverificationcenter.bean.http.VerifiyConfig;
import com.iqiyi.qyverificationcenter.interfaces.VerifyCallBack;
import com.iqiyi.qyverificationcenter.util.VerifyPingBackManager;
import com.iqiyi.qyverificationcenter.webview.JSWebView;
import com.iqiyi.webcontainer.webview.QYWebviewCoreBridgerAgent;
import org.json.JSONException;
import org.json.JSONObject;
@Keep
public class QYVerificationCenter {
private static boolean alreadyInit;
private static String mDataCaptcha;
private static VerifyCallBack mVerifyCallBackCurr;
public static class a implements QYWebviewCoreBridgerAgent.Callback {
a() {
}
}
public static class b implements QYWebviewCoreBridgerAgent.Callback {
b() {
}
}
public static class c implements QYWebviewCoreBridgerAgent.Callback {
c() {
}
}
public static class d implements com.iqiyi.qyverificationcenter.interfaces.a {
d() {
}
@Override
public void a(JSONObject jSONObject, JSWebView jSWebView) {
LogMgr.d("JSBridgerRegister 1");
QYVerificationCenter.jsStartCollectBioData(jSWebView);
}
}
public static class e implements com.iqiyi.qyverificationcenter.interfaces.a {
e() {
}
@Override
public void a(JSONObject jSONObject, JSWebView jSWebView) {
LogMgr.d("JSBridgerRegister 2");
QYVerificationCenter.jsGetBioData(jSWebView);
}
}
public static class f implements com.iqiyi.qyverificationcenter.interfaces.a {
f() {
}
@Override
public void a(JSONObject jSONObject, JSWebView jSWebView) {
LogMgr.d("JSBridgerRegister 3");
jSWebView.callJSMethod(QYVerifyConstants.JsBridge.kVerifyCenterInitPage, 1, null, QYVerificationCenter.mDataCaptcha);
}
}
public static class g implements com.iqiyi.qyverificationcenter.interfaces.b {
g() {
}
@Override
public void a(String str) {
VerifyPingBackManager.verifyError(QYVerifyConstants.VerifyResponCode.kError10006, "JS_LOAD_ERROR", str);
if (QYVerificationCenter.mVerifyCallBackCurr != null) {
QYVerificationCenter.mVerifyCallBackCurr.onFail(QYVerifyConstants.VerifyResponCode.kErrorJSRespense, "js response err");
}
}
@Override
public void onSuccess(String str) {
String str2;
try {
str2 = new JSONObject(str).getString(QYVerifyConstants.PingbackKeys.kToken);
} catch (JSONException e2) {
VerifyPingBackManager.verifyError(QYVerifyConstants.VerifyResponCode.kError10005, "PARSE_DATA_ERROR", e2.getMessage());
str2 = "";
}
if (QYVerificationCenter.mVerifyCallBackCurr != null) {
QYVerificationCenter.mVerifyCallBackCurr.onSuccess(str2);
}
}
}
public static class h implements com.iqiyi.qyverificationcenter.clound.a {
final Activity a;
h(Activity activity) {
this.a = activity;
}
@Override
public void a() {
LogMgr.d("", "onCloudReady 1");
if (com.iqiyi.qyverificationcenter.clound.b.g().n()) {
QYBioDetector.startActiveCollect(this.a, BioConstant.ModuleId.kActiveNative);
}
}
@Override
public void b() {
LogMgr.d("", "onCloudReady 2");
}
}
public static class i implements Runnable {
final VerifiyConfig a;
final String f8054b;
i(VerifiyConfig verifiyConfig, String str) {
this.a = verifiyConfig;
this.f8054b = str;
}
@Override
public void run() {
try {
QYVerificationCenter.safeVerify(this.a, this.f8054b);
} catch (Throwable th) {
th.printStackTrace();
}
}
}
private static void doVerification(VerifiyConfig verifiyConfig, VerifyCallBack verifyCallBack) {
VerifyPingBackManager.setConfig(verifiyConfig);
String bioData = com.iqiyi.qyverificationcenter.clound.b.g().f(verifiyConfig.getScene()) ? QYBioDetector.getBioData(BioConstant.ModuleId.kActiveNative) : "";
LogMgr.i("verify bioData: " + bioData);
if (com.iqiyi.qyverificationcenter.clound.b.g().f(verifiyConfig.getScene())) {
QYBioDetector.stopActiveCollect(BioConstant.ModuleId.kActiveNative);
}
mVerifyCallBackCurr = verifyCallBack;
Utils.startThread(new i(verifiyConfig, bioData));
}
public static void init(Application application, String str, String str2, String str3) {
QYBioDetector.init(application, str, str2);
BioCacheManager.getInstance().setPtid(str3);
initVerify();
}
public static void initData(Activity activity, String str, String str2) {
if (activity == null) {
return;
}
BioCacheManager bioCacheManager = BioCacheManager.getInstance();
if (bioCacheManager.getApplication() == null) {
bioCacheManager.setApplication(activity);
}
initVerify();
QYBioDetector.initUidAndDfp(str, str2);
com.iqiyi.qyverificationcenter.clound.b.g().h(new h(activity));
}
private static void initVerify() {
if (alreadyInit) {
return;
}
alreadyInit = true;
com.iqiyi.qyverificationcenter.clound.b.g().a();
if (BioCacheManager.getInstance().getApplication() != null && BioCacheManager.getInstance().getApplication().getApplicationContext() != null) {
VerifyPingBackManager.initPingBack(BioCacheManager.getInstance().getApplication().getApplicationContext());
}
registerWithQYContainer();
com.iqiyi.qyverificationcenter.webview.a.d().c(QYVerifyConstants.JsBridge.kVerifyCenterStartCollectBioData, new d());
com.iqiyi.qyverificationcenter.webview.a.d().c(QYVerifyConstants.JsBridge.kVerifyCenterGetBioData, new e());
com.iqiyi.qyverificationcenter.webview.a.d().c(QYVerifyConstants.JsBridge.kVerifyCenterInitPage, new f());
JSWebView.setJSResponseCallback(new g());
}
public static void jsGetBioData(JSWebView jSWebView) {
String str;
if (com.iqiyi.qyverificationcenter.clound.b.g().n()) {
str = QYBioDetector.getBioData(BioConstant.ModuleId.kActiveNative);
LogMgr.d("jsGetBioData bioData:" + str);
} else {
str = null;
}
if (jSWebView == null || str == null || str.isEmpty()) {
return;
}
LogMgr.d("jsGetBioData webView:" + str);
jSWebView.callJSMethod(QYVerifyConstants.JsBridge.kVerifyCenterGetBioData, 1, null, str);
}
public static void jsStartCollectBioData(JSWebView jSWebView) {
LogMgr.d("", "======jsStartCollectBioData 1");
if (jSWebView == null || !(jSWebView.getContext() instanceof Activity)) {
return;
}
LogMgr.d("", "======jsStartCollectBioData 2");
initData((Activity) jSWebView.getContext(), "", "");
}
private static void registerWithQYContainer() {
try {
QYWebviewCoreBridgerAgent.shareIntance().register(QYVerifyConstants.JsBridge.kVerifyCenterStartCollectBioData, new a());
QYWebviewCoreBridgerAgent.shareIntance().register(QYVerifyConstants.JsBridge.kVerifyCenterGetBioData, new b());
QYWebviewCoreBridgerAgent.shareIntance().register(QYVerifyConstants.JsBridge.kVerifyCenterInitPage, new c());
} catch (Throwable th) {
th.printStackTrace();
}
}
public static void safeVerify(VerifiyConfig verifiyConfig, String str) {
if (!verifiyConfig.getCaptchaType().equals("auto")) {
startWebViewActivity(verifiyConfig);
VerifyCallBack verifyCallBack = mVerifyCallBackCurr;
if (verifyCallBack != null) {
verifyCallBack.onCaptcha("");
return;
}
return;
}
ResponseBean b2 = com.iqiyi.qyverificationcenter.util.a.b(str, verifiyConfig);
String str2 = b2.code;
if (str2.equals(QYVerifyConstants.VerifyResponCode.kSuccess)) {
VerifyCallBack verifyCallBack2 = mVerifyCallBackCurr;
if (verifyCallBack2 != null) {
verifyCallBack2.onSuccess(b2.desc);
return;
}
return;
}
if (!str2.equals("B00008")) {
VerifyCallBack verifyCallBack3 = mVerifyCallBackCurr;
if (verifyCallBack3 != null) {
verifyCallBack3.onFail(b2.code, b2.desc);
return;
}
return;
}
try {
mDataCaptcha = b2.desc;
verifiyConfig.setCaptchaType(new JSONObject(mDataCaptcha).optString(QYVerifyConstants.PingbackKeys.kCaptchaType));
startWebViewActivity(verifiyConfig);
} catch (Exception e2) {
if (mVerifyCallBackCurr != null) {
VerifyPingBackManager.initPageError(QYVerifyConstants.VerifyResponCode.kError10005, "PARSE_DATA_ERROR", e2.getMessage());
mVerifyCallBackCurr.onFail(QYVerifyConstants.VerifyResponCode.kError10005, e2.getMessage());
return;
}
}
VerifyCallBack verifyCallBack4 = mVerifyCallBackCurr;
if (verifyCallBack4 != null) {
verifyCallBack4.onCaptcha(b2.desc);
}
}
public static void setIsDebug(boolean z) {
LogMgr.setIsDebug(z);
}
private static void startWebViewActivity(VerifiyConfig verifiyConfig) {
Context applicationContext = BioCacheManager.getInstance().getApplication().getApplicationContext();
if (applicationContext == null) {
return;
}
Intent intent = new Intent(applicationContext, (Class<?>) WebViewActivity.class);
StringBuilder sb = new StringBuilder();
sb.append("https://security.iqiyi.com/static/v2/verifycenter/page/native-slide.html?token=");
sb.append(verifiyConfig.getToken());
sb.append("&dfp=");
sb.append(verifiyConfig.getDfp());
sb.append("&hasWrapper=true&captchaType=");
sb.append(verifiyConfig.getCaptchaType());
sb.append(verifiyConfig.isDarkMode() ? "&mode=dark" : "");
intent.putExtra(QYVerifyConstants.IntentExtra.kUrl, sb.toString());
intent.putExtra(QYVerifyConstants.IntentExtra.kShowType, verifiyConfig.getShowType() == 2);
intent.putExtra(QYVerifyConstants.IntentExtra.kDarkMode, verifiyConfig.isDarkMode());
intent.putExtra(QYVerifyConstants.IntentExtra.kAlignMode, verifiyConfig.getAlignMode());
intent.addFlags(65536);
intent.addFlags(268435456);
applicationContext.startActivity(intent);
}
public static void userCancel() {
VerifyCallBack verifyCallBack = mVerifyCallBackCurr;
if (verifyCallBack != null) {
verifyCallBack.onFail("B00008", "user cancel");
}
}
public static void verification(VerifiyConfig verifiyConfig, VerifyCallBack verifyCallBack) {
try {
doVerification(verifiyConfig, verifyCallBack);
} catch (Throwable th) {
th.printStackTrace();
}
}
@Deprecated
private static void verification(String str, String str2, String str3, String str4, boolean z, VerifyCallBack verifyCallBack) {
verification(new VerifiyConfig.Bulider().setDfp(str3).setToken(str4).setScene(str).setCallType(2).setShowType(2).setCaptchaType(str2).setDarkMode(z).createVerifiyConfig(), verifyCallBack);
}
}