星辰影院解锁vip v1.0.4版本的 MD5 值为:3d99bbcbb0d5d5e568b9f6134424c24e
以下内容为反编译后的 ThirdpartyWebView.java 源代码,内容仅作参考
package com.iqiyi.passportsdk.thirdparty;
import android.content.Context;
import android.net.Uri;
import android.util.AttributeSet;
import android.webkit.CookieManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.iqiyi.passportsdk.utils.l;
import com.iqiyi.passportsdk.v.f;
import com.iqiyi.psdk.base.j.k;
import com.iqiyi.qyverificationcenter.bean.QYVerifyConstants;
import com.sensorsdata.analytics.android.sdk.SensorsDataAutoTrackHelper;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Objects;
import org.json.JSONObject;
public class ThirdpartyWebView extends EzWebView {
private g a;
private e f6884b;
private int f6885c;
private int f6886d;
private String f6887e;
private boolean f6888f;
public class a extends WebViewClient {
a() {
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
if (ThirdpartyWebView.this.h()) {
return ThirdpartyWebView.this.f(webView, str);
}
return ThirdpartyWebView.this.e(webView, str);
}
}
public class b implements com.iqiyi.passportsdk.o.j.b<String> {
final String a;
b(String str) {
this.a = str;
}
@Override
public void b(String str) {
f.d r = new com.iqiyi.passportsdk.thirdparty.j.b().r(str);
com.iqiyi.psdk.base.j.d.f().r(r.a, r.f7006i, this.a);
if (!"P01119".equals(r.a)) {
f.c(this.a, ThirdpartyWebView.this.f6886d, r.a, r.f7006i, ThirdpartyWebView.this.getThirdpartyLoginCallback());
} else {
ThirdpartyWebView thirdpartyWebView = ThirdpartyWebView.this;
thirdpartyWebView.j(thirdpartyWebView.f6886d);
}
}
@Override
public void c(Object obj) {
ThirdpartyWebView.this.getThirdpartyLoginCallback().a("", "");
com.iqiyi.psdk.base.j.c.a("ThirdpartyWebView", obj, this.a);
}
}
public class c implements com.iqiyi.passportsdk.o.j.b<String> {
final String a;
c(String str) {
this.a = str;
}
@Override
public void b(String str) {
String r = new com.iqiyi.passportsdk.thirdparty.j.a().r(ThirdpartyWebView.this.f6885c, str);
com.iqiyi.psdk.base.j.d.f().r(r, "", this.a);
if (QYVerifyConstants.VerifyResponCode.kSuccess.equals(r)) {
com.iqiyi.psdk.base.j.e.p("");
ThirdpartyWebView.this.getThirdpartyBindCallback().onSuccess();
} else {
ThirdpartyWebView.this.getThirdpartyBindCallback().b();
com.iqiyi.psdk.base.j.e.g("ThirdpartyWebView");
}
}
@Override
public void c(Object obj) {
ThirdpartyWebView.this.getThirdpartyBindCallback().b();
com.iqiyi.psdk.base.j.c.a("ThirdpartyWebView", obj, this.a);
}
}
public class d implements com.iqiyi.passportsdk.o.j.d<String> {
private d() {
}
@Override
public String a(JSONObject jSONObject) {
return jSONObject.toString();
}
d(ThirdpartyWebView thirdpartyWebView, a aVar) {
this();
}
}
public ThirdpartyWebView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.f6888f = true;
g();
}
private boolean d(String str, String str2) {
int indexOf = str.indexOf(str2);
return indexOf >= 0 && indexOf < 10;
}
private void g() {
setWebViewClient(new a());
}
private void i(String str) {
String queryParameter = Uri.parse(str).getQueryParameter("qd_sf");
HashMap hashMap = new HashMap(1);
if (!k.h0(queryParameter)) {
hashMap.put("pass-sign", queryParameter);
str = str.substring(0, str.lastIndexOf("&qd_sf="));
}
loadUrl(str, hashMap);
SensorsDataAutoTrackHelper.loadUrl2(this, str, hashMap);
}
public void j(int i2) {
this.f6886d = i2;
this.f6887e = l.d1(i2);
com.iqiyi.passportsdk.u.c.a().j0();
if (i2 == 28) {
i(k.b("https://passport.iqiyi.com/apis/thirdparty/facebook_login.action", com.iqiyi.passportsdk.thirdparty.a.a("app_version=" + k.Z(com.iqiyi.psdk.base.a.b()) + "&envinfo=" + k.k(com.iqiyi.psdk.base.j.f.c()) + "&verifyPhone=1")));
return;
}
i(k.b("https://passport.iqiyi.com/apis/thirdparty/mobile_login.action", com.iqiyi.passportsdk.thirdparty.a.a("isapp=1&type=" + i2 + "&app_version=" + k.Z(com.iqiyi.psdk.base.a.b()) + "&envinfo=" + k.k(com.iqiyi.psdk.base.j.f.c()) + "&verifyPhone=1")));
}
private void l(int i2) {
this.f6886d = i2;
this.f6887e = l.d1(i2);
com.iqiyi.passportsdk.u.c.a().j0();
i(k.b("https://passport.iqiyi.com/apis/thirdparty/nlogin.action?", com.iqiyi.passportsdk.thirdparty.a.a("isapp=1&ppage=qiyi&type=" + i2 + "&app_version=" + k.Z(com.iqiyi.psdk.base.a.b()) + "&envinfo=" + k.k(com.iqiyi.psdk.base.j.f.c()))));
}
public boolean e(WebView webView, String str) {
com.iqiyi.passportsdk.u.c.a().k1(this.f6887e);
com.iqiyi.passportsdk.u.c.a().a1(str);
com.iqiyi.passportsdk.utils.e.b("ThirdpartyWebView--->", "h5NormalLogin url is : " + str);
a aVar = null;
if (!d(str, "passport.iqiyi.com/apis/thirdparty/callback.action") && !d(str, "passport.iqiyi.com/apis/thirdparty/wxcallback.action") && !d(str, "passport.pps.tv/apis/thirdparty/pps_oauth_callback.action") && !d(str, "passport.iqiyi.com/apis/thirdparty/facebook_callback.action") && !d(str, "passport.iqiyi.com/oauth/callback.php") && !d(str, "i.pps.tv/oauth/iqiyi_oauth_callback.php") && !d(str, "passport.iqiyi.com/oauth/closepage.php")) {
if (d(str, "passport.iqiyi.com/sns/oauthcallback.php")) {
getThirdpartyBindCallback().a();
Hashtable hashtable = new Hashtable();
hashtable.put("Cookie", l.c1(CookieManager.getInstance().getCookie(str), ""));
com.iqiyi.psdk.base.a.j().f(com.iqiyi.passportsdk.o.j.a.e(String.class).B(str).r(hashtable).x(new d(this, aVar)).u(1).f().d(new c(str)));
} else if (webView != null) {
webView.loadUrl(str);
SensorsDataAutoTrackHelper.loadUrl2(webView, str);
}
} else {
getThirdpartyLoginCallback().h();
HashMap hashMap = new HashMap();
hashMap.put("Cookie", l.c1(CookieManager.getInstance().getCookie(str), ""));
com.iqiyi.psdk.base.a.j().f(com.iqiyi.passportsdk.o.j.a.e(String.class).B(com.iqiyi.passportsdk.q.c.a(str)).r(hashMap).x(new d(this, aVar)).u(1).f().d(new b(str)));
}
return true;
}
public boolean f(WebView webView, String str) {
com.iqiyi.passportsdk.utils.e.b("ThirdpartyWebView--->", "h5QrScanTypeLogin url is : " + str);
return e(webView, str);
}
public e getThirdpartyBindCallback() {
e eVar = this.f6884b;
Objects.requireNonNull(eVar, "must call thirdpartyWebView.setThirdpartyBindCallback");
return eVar;
}
public g getThirdpartyLoginCallback() {
g gVar = this.a;
Objects.requireNonNull(gVar, "must call thirdpartyWebView.setThirdpartyLoginCallback");
return gVar;
}
public boolean h() {
return this.f6888f;
}
public void k(int i2, boolean z) {
com.iqiyi.psdk.base.j.b.a("ThirdpartyWebView--->", "loginType is : " + i2);
setQrScanMode(z);
if (z) {
l(i2);
} else {
j(i2);
}
}
public void setQrScanMode(boolean z) {
this.f6888f = z;
}
public void setThirdpartyBindCallback(e eVar) {
this.f6884b = eVar;
}
public void setThirdpartyLoginCallback(g gVar) {
this.a = gVar;
}
}