酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319
以下内容为反编译后的 ad.java 源代码,内容仅作参考
package com.kugou.common.useraccount.protocol;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.SystemClock;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import c.c.j;
import c.c.o;
import c.c.u;
import c.f;
import c.s;
import c.t;
import com.kugou.android.app.crossplatform.bean.Type;
import com.kugou.common.apm.sdk.YoungApmData;
import com.kugou.common.app.KGCommonApplication;
import com.kugou.common.base.AbsFrameworkFragment;
import com.kugou.common.base.g;
import com.kugou.common.datacollect.vo.h;
import com.kugou.common.event.i;
import com.kugou.common.exceptionreport.b;
import com.kugou.common.network.k;
import com.kugou.common.network.w;
import com.kugou.common.player.kugouplayer.NativeParams;
import com.kugou.common.useraccount.ThirdBindAccountPresenter;
import com.kugou.common.useraccount.app.KgUserLoginAndRegActivity;
import com.kugou.common.useraccount.entity.UserData;
import com.kugou.common.useraccount.entity.af;
import com.kugou.common.useraccount.entity.am;
import com.kugou.common.useraccount.entity.q;
import com.kugou.common.useraccount.entity.r;
import com.kugou.common.useraccount.entity.v;
import com.kugou.common.useraccount.entity.y;
import com.kugou.common.useraccount.event.EventThirdLoginBindPhone;
import com.kugou.common.useraccount.event.EventUserLogin;
import com.kugou.common.utils.ag;
import com.kugou.common.utils.as;
import com.kugou.common.utils.au;
import com.kugou.common.utils.ba;
import com.kugou.common.utils.br;
import com.kugou.common.utils.bs;
import com.kugou.fanxing.allinone.base.bi.agent.EVParam;
import com.qq.e.comm.constants.Constants;
import com.sina.weibo.sdk.web.WebPicUploadResult;
import com.tencent.open.SocialConstants;
import com.tencent.open.SocialOperation;
import com.wandoujia.upgradesdk.UpgradeManager;
import d.ab;
import d.z;
import de.greenrobot.event.EventBus;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.Map;
public class ad {
public static boolean E;
public static boolean L;
private String A;
private com.kugou.common.useraccount.entity.ad I;
private af J;
private String K;
private boolean N;
private boolean O;
private f P;
private String S;
private boolean T;
private int U;
private AbsFrameworkFragment V;
String f53286c;
String f53287d;
private Context g;
private String h;
private String i;
private v j;
private y k;
private boolean l;
private String n;
private int o;
private String p;
private com.kugou.common.event.f q;
private Bundle r;
private com.kugou.common.event.b.a s;
private boolean x;
private String y;
private static final String D = ad.class.getSimpleName();
public static String f53283a = "1487151178";
public static String f53284b = "liuxin@kugou.com";
public static int f53285e = 0;
public static final Object f = new Object();
public static boolean F = false;
public static boolean G = true;
private int H = -1;
private int m = 1;
private long t = 0;
private long u = 0;
private long v = 0;
private long w = 0;
private BroadcastReceiver Q = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (as.f54365e) {
as.f("UserLogin", "onReceive:" + action);
}
if ("real_name_verify_success".equals(action)) {
ad.this.S = intent.getStringExtra("key_real_name_verity_token");
ad.this.T = true;
ad.a(ad.this);
synchronized (ad.this.R) {
ad.this.R.notify();
}
return;
}
if ("real_name_verify_cancel".equals(action)) {
ad.this.S = "";
ad.this.T = true;
ad.this.U = 0;
synchronized (ad.this.R) {
ad.this.R.notify();
}
}
}
};
boolean M = false;
private final Object R = new Object();
private a B = null;
private boolean C = false;
private boolean z = false;
public interface a {
void a();
void a(UserData userData);
void a(UserData userData, int i);
void a(boolean z, String str, String str2, String str3, String str4);
}
public interface d {
@o
c.b<String> a(@j Map<String, String> map, @u Map<String, String> map2, @c.c.a String str);
}
public interface f {
void a(UserData userData, int i);
void a(UserData userData, int i, ThirdBindAccountPresenter.SimpleThirdEntity simpleThirdEntity, boolean z);
}
static int a(ad adVar) {
int i = adVar.U;
adVar.U = i + 1;
return i;
}
public ad(String str) {
this.S = "";
this.T = false;
this.U = 0;
this.S = "";
this.T = false;
this.U = 0;
if (TextUtils.isEmpty(KgUserLoginAndRegActivity.f52767c)) {
this.q = new com.kugou.common.event.a.d(KGCommonApplication.getContext(), str);
} else {
this.q = new com.kugou.common.event.a.d(KGCommonApplication.getContext(), KgUserLoginAndRegActivity.f52767c, str);
}
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("real_name_verify_success");
intentFilter.addAction("real_name_verify_cancel");
com.kugou.common.b.a.b(this.Q, intentFilter);
}
public void a(String str, String str2, Context context) {
a(str, str2, context, (String) null);
}
public void a(String str, String str2, Context context, String str3) {
a(str, str2, context, str3, -1);
}
public void a(String str, String str2, Context context, String str3, int i) {
this.m = 4;
this.g = context;
this.r = new Bundle();
this.f53286c = str;
this.f53287d = str2;
this.H = i;
a(false, 4, null, null, str3, context);
}
public void a(boolean z, int i, String str, String str2, String str3, Context context) {
a(z, i, str, str2, str3, (af) null, context);
}
public void a(boolean z, int i, String str, String str2, String str3, af afVar, Context context) {
this.g = context;
this.l = z;
this.h = str;
this.n = str2;
this.i = str3;
this.m = i;
this.J = afVar;
this.r = new Bundle();
this.r.putString("sap", z ? "1" : "2");
this.t = SystemClock.elapsedRealtime();
au.a().a(new Runnable() {
@Override
public void run() {
if (as.f54365e) {
as.b("zlx_user", "start login");
}
EventBus.getDefault().post(new EventUserLogin(1, ad.this.l));
ad adVar = ad.this;
adVar.a(adVar.l, ad.this.h, ad.this.n, ad.this.i);
EventBus.getDefault().post(new EventUserLogin(2));
if (as.f54365e) {
as.b("zlx_user", "end login");
}
}
});
}
public void a(boolean z, String str, int i, String str2, Context context, long j, long j2) {
a(z, str, i, str2, context, j, j2, null, null, null);
}
public void a(boolean z, String str, int i, String str2, Context context, long j, long j2, String str3, String str4) {
a(z, str, i, str2, context, j, j2, str3, str4, null);
}
public void a(Context context, am amVar) {
a(amVar.f53593a, amVar.f53594b, amVar.f53595c, amVar.f53596d, context, amVar.f53597e, amVar.f, amVar.g, amVar.h, amVar.i);
}
public void a(boolean z, String str, int i, final String str2, Context context, long j, long j2, String str3, String str4, String str5) {
this.g = context;
this.m = 3;
this.l = z;
this.p = str;
this.o = i;
this.K = str5;
this.t = j;
this.u = SystemClock.elapsedRealtime();
this.v = j2;
this.w = j2;
this.r = new Bundle();
this.f53286c = str3;
this.f53287d = str4;
String str6 = z ? "1" : "2";
if (i == 3) {
this.y = "2";
} else if (i == 1) {
this.y = "1";
} else if (i == 36) {
this.y = "3";
}
this.r.putString("sap", str6);
au.a().a(new Runnable() {
@Override
public void run() {
EventBus.getDefault().post(new EventUserLogin(1, false));
ad adVar = ad.this;
adVar.a(false, adVar.p, ad.this.o + "", str2);
EventBus.getDefault().post(new EventUserLogin(2));
if (as.f54365e) {
as.b("zlx_user", "end login");
}
}
});
}
public void a(boolean z, String str, String str2, String str3) {
com.kugou.common.apm.sdk.c.a a2;
b.a a3;
StringBuilder sb;
long j;
boolean z2;
f fVar;
L = true;
E = z;
this.l = z;
this.h = str;
this.i = str3;
this.n = str2;
this.M = false;
if (as.f54365e) {
as.b("login_token", "登录上传的token:" + str3);
}
t b2 = new t.a().b("LOGIN").a(new e()).a(c()).b();
b bVar = new b(this.S);
UserData G2 = UserData.G();
com.kugou.common.environment.a.h(this.l);
System.out.println("isAutuLogin: " + this.l);
com.kugou.common.statistics.c.d dVar = !this.l ? new com.kugou.common.statistics.c.d(6) : new com.kugou.common.statistics.c.d(5);
try {
try {
Map<String, String> b3 = com.kugou.common.network.v.a().d().b();
String b4 = bVar.b();
b3.put(SocialOperation.GAME_SIGNATURE, w.a(br.aB(), b3, b4));
HashMap hashMap = new HashMap();
if (this.I != null && this.I.b() != null && this.I.b().f53591d && !TextUtils.isEmpty(this.I.b().f)) {
hashMap.put("VerifyData", this.I.b().f);
}
s<String> a4 = ((d) b2.a(d.class)).a(hashMap, b3, b4).a();
String d2 = a4.d();
r rVar = new r();
rVar.c(d2);
rVar.getResponseData(G2);
if (G2 != null && !TextUtils.isEmpty(G2.C()) && G2.a() == 0) {
if (!TextUtils.isEmpty(G2.N()) && G2.b() == 34123) {
Bundle bundle = new Bundle();
bundle.putString("web_url", G2.N());
bundle.putString("web_title", "实名认证");
bundle.putBoolean("felxo_fragment_has_playing_bar", false);
bundle.putBoolean("extra_force_verity_realname", true);
Context activity = g.b().getActivity();
com.kugou.framework.i.f a5 = com.kugou.framework.i.f.a();
if (activity == null) {
activity = this.g;
}
a5.a(activity, "kugou@common@KGFlexoWebActivity", bundle);
synchronized (this.R) {
try {
this.R.wait();
} catch (InterruptedException e2) {
as.e(e2);
}
}
if (!TextUtils.isEmpty(this.S)) {
L = false;
a(z, str, str2, str3);
return;
}
} else if (!TextUtils.isEmpty(this.S)) {
com.kugou.common.b.a.a(new Intent("com.kugou.android.login_faild").putExtra("key_real_name_verity_token", G2.C()).putExtra("key_real_name_verity_num", this.U));
synchronized (this.R) {
try {
this.R.wait();
} catch (InterruptedException e3) {
as.e(e3);
}
}
if (!TextUtils.isEmpty(this.S)) {
L = false;
a(z, str, str2, str3);
if (as.f54365e) {
as.b("zkzhou", "手机酷狗登录次数");
}
com.kugou.common.exceptionreport.b.a().a(11761303, "login," + this.M + "," + br.S(this.g));
return;
}
}
}
a2 = w.a(a4);
if (as.f54365e) {
as.b("zkzhou", "手机酷狗登录次数");
}
a3 = com.kugou.common.exceptionreport.b.a();
sb = new StringBuilder();
} finally {
if (as.f54365e) {
as.b("zkzhou", "手机酷狗登录次数");
}
com.kugou.common.exceptionreport.b.a().a(11761303, "login," + this.M + "," + br.S(this.g));
}
} catch (Exception e4) {
dVar.a(com.kugou.common.useraccount.entity.f.f53620c);
this.M = true;
a2 = w.a(e4);
if (as.f54365e) {
as.b("zkzhou", "手机酷狗登录次数");
}
a3 = com.kugou.common.exceptionreport.b.a();
sb = new StringBuilder();
}
sb.append("login,");
sb.append(this.M);
sb.append(",");
sb.append(br.S(this.g));
a3.a(11761303, sb.toString());
int i = 2;
if (z) {
if (com.kugou.common.q.b.a().z() > 0) {
com.kugou.common.q.b.a().q(3);
}
} else if (com.kugou.common.useraccount.d.d(str)) {
com.kugou.common.q.b.a().q(2);
} else if (this.m == 3) {
com.kugou.common.q.b.a().q(3);
} else {
com.kugou.common.q.b.a().q(1);
}
if (G2 == null || TextUtils.isEmpty(G2.C()) || G2.a() != 1) {
com.kugou.common.datacollect.a.b().a(0, z, false);
} else {
com.kugou.common.datacollect.a.b().a(G2.ad(), z, true);
int i2 = this.m;
if ((i2 == 3 || i2 == 4) && G2.E() == 1) {
com.kugou.common.datacollect.a.b().a(G2.ad(), h.a.CLASSIFY_THIRD_RESISTER, true);
}
}
if (G2 == null || TextUtils.isEmpty(G2.C())) {
this.r.putString("fs", a2 != null ? a2.b() : "2");
this.w = SystemClock.elapsedRealtime();
this.x = false;
a aVar = this.B;
if (aVar != null) {
aVar.a();
}
com.kugou.common.event.f fVar2 = this.q;
if (fVar2 != null) {
fVar2.a(this.h, this.o, 0, (k) null);
}
com.kugou.common.environment.a.i(false);
dVar.b(c()[0]);
if (!this.M) {
dVar.a(com.kugou.common.useraccount.entity.f.f53618a);
}
dVar.b(a2.d());
com.kugou.common.statistics.h.a(new com.kugou.common.statistics.c.b(KGCommonApplication.getContext(), dVar));
} else if (G2.a() == 1) {
this.w = SystemClock.elapsedRealtime();
this.x = true;
try {
NativeParams.setToken(G2.O());
} catch (Exception e5) {
as.e(e5);
if (as.f54365e) {
as.d("UserLogin", "token 设置失败!");
}
}
if (as.f54365e) {
as.b("login_token", "登录成功之后获取到的新token:" + G2.B());
}
bs.b(G2);
String B = G2.B();
long X = G2.X();
if (TextUtils.isEmpty(B) || X <= 0) {
com.kugou.common.userinfo.b.a.a().f();
} else {
com.kugou.common.environment.a.b(B);
com.kugou.common.environment.a.g(X);
com.kugou.common.environment.a.c(G2.f());
com.kugou.common.environment.a.e(G2.d());
com.kugou.common.environment.a.r(G2.L());
com.kugou.common.q.b.a().D(G2.R());
com.kugou.common.q.b.a().E(G2.V());
com.kugou.common.q.b.a().b(G2.ae());
if (as.f54365e) {
as.b("zhpu_fx", "uid : " + com.kugou.common.environment.a.Y() + " nick : " + com.kugou.common.environment.a.A() + " name: " + com.kugou.common.environment.a.D());
}
com.kugou.common.userinfo.b.a.a().a(B, X);
com.kugou.common.userinfo.b.a.a().a(X, G2.d());
F = true;
if (TextUtils.isEmpty(com.kugou.common.userinfo.b.a.a().h())) {
G = false;
com.kugou.common.exceptionreport.b.a().a(11922699, com.kugou.android.support.dexfail.d.i() + ",uid:" + X + ",username:" + G2.d());
}
int i3 = this.o;
if (i3 == 3) {
com.kugou.common.q.c.b().I("PLATFORM_SINA");
} else if (i3 == 1) {
com.kugou.common.q.c.b().I("PLATFORM_QQ");
} else if (i3 == 36) {
com.kugou.common.q.c.b().I("PLATFORM_WECHAT");
}
com.kugou.framework.mymusic.c.a().b(com.kugou.common.environment.a.Y(), G2.n());
}
if (z) {
String bL = com.kugou.common.q.c.b().bL();
if (!"PLATFORM_SINA".equals(bL)) {
if (!"PLATFORM_QQ".equals(bL)) {
if (!"PLATFORM_WECHAT".equals(bL)) {
if (!"ACCOUND_PWD".equals(bL)) {
}
i = 0;
}
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
}
if (TextUtils.isEmpty(G2.N())) {
}
if (this.z) {
}
if (G2.E() == 1) {
}
if (!TextUtils.isEmpty(G2.N())) {
}
}
i = 3;
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
}
if (TextUtils.isEmpty(G2.N())) {
}
if (this.z) {
}
if (G2.E() == 1) {
}
if (!TextUtils.isEmpty(G2.N())) {
}
}
i = 4;
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
}
if (TextUtils.isEmpty(G2.N())) {
}
if (this.z) {
}
if (G2.E() == 1) {
}
if (!TextUtils.isEmpty(G2.N())) {
}
} else {
int i4 = this.m;
if (i4 == 4) {
com.kugou.common.q.c.b().I("PHONE_PWD");
} else {
if (i4 == 3) {
int i5 = this.o;
if (i5 != 3) {
if (i5 != 1) {
}
i = 3;
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
a();
this.q.a(G2.X(), this.h, this.o, (k) null);
this.q.a(this.m, this.j, b());
this.s = new com.kugou.common.event.b.a(KGCommonApplication.getContext());
this.s.a(G2.X(), this.h);
}
if (TextUtils.isEmpty(G2.N())) {
new com.kugou.common.useraccount.utils.o().a(this.m);
}
if (this.z) {
if (G2.E() == 1 && this.m == 3) {
com.kugou.common.statistics.e.a.a(new com.kugou.framework.statistics.easytrace.task.d(com.kugou.framework.statistics.easytrace.c.f61643a));
} else {
com.kugou.common.statistics.e.a.a(new com.kugou.framework.statistics.easytrace.task.d(com.kugou.framework.statistics.easytrace.c.f61645c));
}
}
if (G2.E() == 1 && this.m == 3 && (fVar = this.P) != null) {
fVar.a(G2, this.o);
}
if (!TextUtils.isEmpty(G2.N())) {
Bundle bundle2 = new Bundle();
bundle2.putString("web_url", G2.N());
bundle2.putString("web_title", "酷狗安全验证");
bundle2.putBoolean("felxo_fragment_has_playing_bar", false);
AbsFrameworkFragment b5 = g.b();
FragmentActivity activity2 = b5 != null ? b5.getActivity() : null;
com.kugou.framework.i.f.a().a(activity2 != null ? activity2 : this.g, "kugou@common@KGFlexoWebActivity", bundle2);
}
}
i = 4;
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
}
if (TextUtils.isEmpty(G2.N())) {
}
if (this.z) {
}
if (G2.E() == 1) {
fVar.a(G2, this.o);
}
if (!TextUtils.isEmpty(G2.N())) {
}
}
i = 0;
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
}
if (TextUtils.isEmpty(G2.N())) {
}
if (this.z) {
}
if (G2.E() == 1) {
}
if (!TextUtils.isEmpty(G2.N())) {
}
}
i = 1;
com.kugou.common.userinfo.b.a.a().a(G2.d(), i);
com.kugou.common.userinfo.b.a.a().a(G2.d(), G2.B(), G2.X(), G2.h());
com.kugou.common.environment.a.m(G2.E() == 1);
a(z, G2);
com.kugou.common.environment.a.a(this.h);
if (this.q != null) {
}
if (TextUtils.isEmpty(G2.N())) {
}
if (this.z) {
}
if (G2.E() == 1) {
}
if (!TextUtils.isEmpty(G2.N())) {
}
}
} else {
if (this.m == 3 && G2.b() == 30798) {
EventBus.getDefault().post(new EventThirdLoginBindPhone(this.o, this.p, this.i));
L = false;
return;
}
if (this.m == 3 && G2.b() == 34182) {
f fVar3 = this.P;
if (fVar3 != null) {
fVar3.a(G2, this.o, new ThirdBindAccountPresenter.SimpleThirdEntity(this.p, this.i, ""), this.O);
}
L = false;
return;
}
if (this.m == 3 && G2.b() == 34258) {
f fVar4 = this.P;
if (fVar4 != null) {
fVar4.a(G2, this.o, new ThirdBindAccountPresenter.SimpleThirdEntity(this.p, this.i, ""), this.O);
}
L = false;
return;
}
this.r.putString("fs", G2.b() + "");
this.w = SystemClock.elapsedRealtime();
this.x = false;
com.kugou.common.event.f fVar5 = this.q;
if (fVar5 != null) {
fVar5.a(this.h, this.o, G2.b(), (k) null);
}
a(G2, dVar, c()[0], a2);
}
long j2 = this.t;
long j3 = this.w;
Bundle bundle3 = this.r;
boolean z3 = this.x;
long j4 = this.u;
long j5 = this.v;
String str4 = this.y;
int i6 = this.m;
com.kugou.common.useraccount.entity.ad adVar = this.I;
if (G2 == null || G2.E() != 1) {
j = j5;
z2 = false;
} else {
j = j5;
z2 = true;
}
c cVar = new c(j2, j3, bundle3, z3, j4, j, str4, i6, adVar, z2);
if (G2 == null || G2.b() != 34175) {
au.a().a(cVar);
}
com.kugou.common.b.a.b(this.Q);
L = false;
}
public void c(boolean z) {
this.N = z;
}
public void d(boolean z) {
this.O = z;
}
private void a() {
com.kugou.common.useraccount.entity.t a2;
boolean Y = com.kugou.common.q.b.a().Y();
boolean E2 = com.kugou.common.environment.a.E();
boolean equals = com.kugou.common.config.c.a().b(com.kugou.common.config.a.ov).equals("1");
if (!E2 && !this.C && Y && equals && (a2 = new m().a()) != null) {
if ("1".equals(a2.a())) {
EventBus.getDefault().postSticky(new i(i.f48556b));
} else if (as.f54365e) {
as.f("UserLogin", "vip赠送失败原因:" + a2.b());
}
}
if (this.C) {
return;
}
com.kugou.common.q.b.a().l(false);
com.kugou.common.environment.a.m(false);
}
private void a(final boolean z, UserData userData) {
com.kugou.common.entity.e<UserData> a2 = GetYoungVipInfoProtocol.f53477a.a();
if (a2.d() != null && a2.a()) {
userData.a(a2.d().c());
}
com.kugou.common.environment.a.F(false);
bs.a(userData);
com.kugou.common.environment.a.h(userData.A());
com.kugou.common.environment.a.b(userData);
com.kugou.common.environment.a.i(true);
au.a().a(new Runnable() {
@Override
public void run() {
com.kugou.common.network.a.b.a().a(false, 1);
if (com.kugou.common.environment.a.E()) {
new com.kugou.common.i.b.b.c().a();
Intent intent = new Intent("com.kugou.android.action.music_package_state_change");
intent.putExtra("key_login_type", z);
com.kugou.common.b.a.a(intent);
}
}
});
com.kugou.common.useraccount.privilege.b.a().a(z);
if (com.kugou.common.q.b.a().y() < 1) {
com.kugou.common.q.b.a().i(1);
ag.e(com.kugou.common.q.b.a().x());
ag.e(com.kugou.common.q.b.a().e(com.kugou.common.q.b.a().w()));
}
if (as.f54365e) {
as.d("test", "ProcessUtil.isCover(context)==" + br.P(this.g));
}
if (br.P(this.g) && com.kugou.common.environment.a.ag()) {
com.kugou.common.q.b.a().l(true);
}
com.kugou.common.msgcenter.d.e();
if (as.f54365e) {
as.d("unicorntest", "登录成功广播:USER_LOGIN_SUCCESS_ACTION");
}
Intent intent = new Intent("com.kugou.android.user_login_success");
intent.putExtra("key_login_type", z);
intent.putExtra("key_login_mode", this.m);
intent.putExtra("key_real_name_verity_token", this.S);
com.kugou.common.statistics.e.a.a(new com.kugou.common.statistics.easytrace.task.b(2, "login").a(Type.state, com.kugou.common.environment.a.v() ? "1" : "2"));
if (!TextUtils.isEmpty(this.A)) {
intent.putExtra(SocialConstants.PARAM_SOURCE, this.A);
}
intent.putExtra("key_login_jump_url", !TextUtils.isEmpty(userData.N()));
if (as.f54365e) {
as.b("wuhq", "UserLogin 发出登录成功广播");
}
synchronized (f) {
com.kugou.common.b.a.b(new Intent("com.kugou.android.user_x5_login_success"));
com.kugou.common.b.a.a(intent);
f53285e = 1;
}
if (as.f54365e) {
as.f("OrderUtils", "登录成功");
}
com.kugou.common.service.a.c.c();
com.kugou.common.b.a.a(new Intent("local_broadcasr_action"));
a aVar = this.B;
if (aVar != null) {
aVar.a(userData, this.m);
this.B.a(z, userData.d(), this.i, this.n, userData.B());
}
com.kugou.common.q.b.a().c(true);
com.kugou.common.q.b.a().d(true);
com.kugou.datacollect.d.b(Long.toString(com.kugou.common.environment.a.Y()));
if (as.f54365e) {
as.f("bisdk", String.format("KGConfigure.setUserId:%s", Long.valueOf(com.kugou.common.environment.a.Y())));
}
}
private void a(UserData userData, com.kugou.common.statistics.c.d dVar, String str, com.kugou.common.apm.sdk.c.a aVar) {
String valueOf = userData == null ? "" : String.valueOf(userData.b());
com.kugou.common.environment.a.i(false);
com.kugou.common.environment.a.y();
ag.k(com.kugou.common.constant.c.k + "login.log", "手动登录失败重置用户信息");
if (this.B != null) {
userData.a(this.T);
this.B.a(userData);
}
com.kugou.common.b.a.a(new Intent("com.kugou.android.login_faild").putExtra("key_real_name_verity_token", userData.C()).putExtra("key_real_name_verity_num", this.U));
if (valueOf.equals("30702") || valueOf.equals("30703")) {
return;
}
dVar.b(str);
dVar.a(com.kugou.common.useraccount.entity.f.f53619b);
dVar.b(aVar.d());
dVar.a(valueOf);
com.kugou.common.statistics.h.a(new com.kugou.common.statistics.c.b(KGCommonApplication.getContext(), dVar));
}
public void a(v vVar) {
this.j = vVar;
}
public void a(com.kugou.common.useraccount.entity.ad adVar) {
this.I = adVar;
}
public void a(AbsFrameworkFragment absFrameworkFragment) {
this.V = absFrameworkFragment;
}
public class b extends q {
String f;
@Override
public String getGetRequestParams() {
return "";
}
@Override
public String getUrl() {
return null;
}
public b(String str) {
super(true, true);
this.f = "";
this.f = str;
}
public String b() {
try {
ba baVar = new ba();
this.f53648a.put("dfid", com.kugou.common.q.b.a().cQ());
this.f53648a.put("plat", 1);
if (ad.this.m == 2) {
this.f53648a.put("userid", ad.this.n);
HashMap hashMap = new HashMap();
hashMap.put("clienttime", Integer.valueOf(this.f53649b));
hashMap.put(UpgradeManager.PARAM_TOKEN, ad.this.i);
this.f53648a.put("p3", NativeParams.encryptWithT0(hashMap));
} else if (ad.this.m != 1) {
if (ad.this.m == 3) {
this.f53648a.put("access_token", ad.this.i);
if (ad.this.o != 1) {
if (ad.this.o == 3) {
this.f53648a.put("m_account", ad.f53284b);
} else {
this.f53648a.put("m_account", ad.f53283a);
}
} else {
this.f53648a.put("m_account", ad.f53283a);
this.f53648a.put("third_appid", "101706348");
}
HashMap hashMap2 = new HashMap();
hashMap2.put("clienttime_ms", this.p);
hashMap2.put("openid", ad.this.p);
hashMap2.put("partnerid", Integer.valueOf(ad.this.o));
if (!TextUtils.isEmpty(ad.this.K)) {
this.f53648a.put("to_verify", 1);
hashMap2.put("userid", ad.this.K);
}
this.f53648a.put(EVParam.p2, NativeParams.getEncryptText(hashMap2));
this.f53648a.put("force_bind", 1);
if (!TextUtils.isEmpty(ad.this.f53286c) && !TextUtils.isEmpty(ad.this.f53287d)) {
HashMap hashMap3 = new HashMap();
hashMap3.put("clienttime", Integer.valueOf(this.f53649b));
hashMap3.put("mobile", ad.this.f53286c);
hashMap3.put(WebPicUploadResult.RESP_UPLOAD_PIC_PARAM_CODE, ad.this.f53287d);
this.f53648a.put(EVParam.p1, NativeParams.getEncryptText(hashMap3));
}
if (!ad.this.O) {
if (ad.this.N) {
this.f53648a.put("force_login", 1);
} else {
this.f53648a.put("force_login", Integer.valueOf(com.kugou.common.userinfo.b.a.a().a(3, -1).isEmpty() ? 1 : 0));
}
} else {
this.f53648a.put("force_login", 2);
}
} else if (ad.this.m == 4) {
this.f53648a.put("mobile", ad.this.f53286c);
HashMap hashMap4 = new HashMap();
hashMap4.put("clienttime_ms", this.p);
hashMap4.put(WebPicUploadResult.RESP_UPLOAD_PIC_PARAM_CODE, ad.this.f53287d);
hashMap4.put("mobile", ad.this.f53286c);
if (ad.this.I != null && !TextUtils.isEmpty(ad.this.I.a())) {
hashMap4.put("userid", ad.this.I.a());
}
if (ad.this.I != null && !TextUtils.isEmpty(ad.this.I.i())) {
this.f53648a.put("to_verify", 1);
hashMap4.put("userid", ad.this.I.i());
}
if (ad.this.I != null && ad.this.I.g()) {
HashMap hashMap5 = new HashMap();
hashMap5.put("clienttime_ms", this.p);
hashMap5.put("access_id", ad.this.I.d());
hashMap5.put("access_key", ad.this.I.e());
hashMap5.put("comm_oper", Integer.valueOf(ad.this.I.f()));
this.f53648a.put("m_token_1", NativeParams.getEncryptText(hashMap5));
}
if (ad.this.I != null) {
if (ad.this.I.g()) {
HashMap hashMap6 = new HashMap();
hashMap6.put("clienttime_ms", this.p);
hashMap6.put("access_token", ad.this.I.c());
this.f53648a.put("m_token_2", NativeParams.getEncryptText(hashMap6));
}
if (ad.this.I.b() != null) {
this.f53648a.put("nickname", ad.this.I.b().f53590c);
this.f53648a.put("sex", Integer.valueOf(ad.this.I.b().f53589b));
this.f53648a.put("photo", ad.this.I.b().f53588a);
this.f53648a.put("third", Integer.valueOf(ad.this.I.b().f53591d ? ad.this.I.b().f53592e : 0));
}
}
if (ad.this.I != null && ad.this.I.g() && ad.this.I.h() != null) {
HashMap hashMap7 = new HashMap();
hashMap7.put("atExpiresIn", ad.this.I.h().f53514b);
hashMap7.put("loginMode", ad.this.I.h().f53516d);
hashMap7.put("refreshToken", ad.this.I.h().f53515c);
hashMap7.put("rfExpiresIn", ad.this.I.h().f53513a);
this.f53648a.put("m_param", NativeParams.getEncryptText(hashMap7));
}
if (!TextUtils.isEmpty(ad.this.i)) {
hashMap4.put("pwd", baVar.a(ad.this.i));
}
if (ad.this.H > 0) {
this.f53648a.put("businessid", Integer.valueOf(ad.this.H));
}
if (ad.this.N) {
this.f53648a.put("force_login", 1);
}
this.f53648a.put(EVParam.p2, NativeParams.getEncryptText(hashMap4));
this.f53648a.put("support_multi", 1);
this.f53648a.put("key", com.kugou.common.useraccount.utils.d.a(this.q, this.r, this.s, String.valueOf(this.p)));
}
} else {
this.f53648a.put("username", com.kugou.common.useraccount.utils.d.a(ad.this.h));
HashMap hashMap8 = new HashMap();
hashMap8.put("clienttime_ms", this.p);
hashMap8.put("pwd", baVar.a(ad.this.i));
if (ad.this.j != null) {
hashMap8.put(WebPicUploadResult.RESP_UPLOAD_PIC_PARAM_CODE, ad.this.j.f53667b);
hashMap8.put("mobile", ad.this.j.f53666a);
hashMap8.put("force", Integer.valueOf(ad.this.j.a()));
}
this.f53648a.put(EVParam.p2, NativeParams.getEncryptText(hashMap8));
if (ad.this.b() != null && !TextUtils.isEmpty(ad.this.b().f53677c)) {
this.f53648a.put("verifycode", ad.this.b().f53677c);
this.f53648a.put("verifykey", ad.this.b().f53676b);
} else if (ad.this.b() != null && !TextUtils.isEmpty(ad.this.b().f53675a) && !TextUtils.isEmpty(ad.this.b().f53676b)) {
this.f53648a.put("verifycode", ad.this.b().f53675a);
this.f53648a.put("verifykey", ad.this.b().f53676b);
}
if (ad.this.J != null) {
HashMap hashMap9 = new HashMap();
hashMap9.put("clienttime_ms", this.p);
hashMap9.put("openid", ad.this.J.b());
hashMap9.put("partnerid", Integer.valueOf(ad.this.J.a()));
this.f53648a.put(Constants.PORTRAIT, NativeParams.getEncryptText(hashMap9));
this.f53648a.put("access_token", ad.this.J.c());
}
this.f53648a.put("support_third", "3");
this.f53648a.put("support_multi", 1);
this.f53648a.put("support_verify", 1);
this.f53648a.put("key", com.kugou.common.useraccount.utils.d.a(this.q, this.r, this.s, String.valueOf(this.p)));
}
this.f53648a.put("dev", TextUtils.isEmpty(br.f()) ? "" : br.f());
this.f53648a.put("gitversion", com.kugou.android.support.dexfail.d.i());
String a2 = com.kugou.common.useraccount.utils.d.a(this.f53648a);
if (!TextUtils.isEmpty(this.f)) {
this.f = "\"data\":" + this.f;
a2 = a2.substring(0, a2.length() - 1) + "," + this.f + "}";
}
if (as.f54365e) {
as.f("USERLOGIN", a2);
}
return a2;
} catch (Exception e2) {
as.e(e2);
return null;
}
}
}
public void b(boolean z) {
this.z = z;
}
public void a(boolean z) {
this.C = z;
}
public void a(a aVar) {
this.B = aVar;
}
public static class c implements Runnable {
private long f53295a;
private long f53296b;
private long f53297c;
private long f53298d;
private String f53299e;
private Bundle f;
private boolean g;
private int h;
private boolean i;
private com.kugou.common.useraccount.entity.ad j;
public c(long j, long j2, Bundle bundle, boolean z, long j3, long j4, String str, int i, com.kugou.common.useraccount.entity.ad adVar, boolean z2) {
this.f53295a = j;
this.f53298d = j2;
this.f53296b = j3;
this.f53297c = j4;
this.f = bundle;
this.g = z;
this.f53299e = str;
this.h = i;
this.i = z2;
this.j = adVar;
}
@Override
public void run() {
a(this.f53295a, this.f53298d, this.f, this.g, this.f53296b, this.f53297c, this.f53299e, this.h, this.j, this.i);
}
private static void a(long j, long j2, Bundle bundle, boolean z, long j3, long j4, String str, int i, com.kugou.common.useraccount.entity.ad adVar, boolean z2) {
YoungApmData youngApmData = new YoungApmData(Integer.parseInt("40505"));
youngApmData.b(j2 - j);
if (j3 > 0) {
youngApmData.b(str);
} else if (i == 4) {
if (adVar != null && adVar.g()) {
youngApmData.b("4");
} else {
youngApmData.b("5");
}
}
if (z2 || (adVar != null && adVar.b() != null)) {
youngApmData.a("1");
} else {
youngApmData.a("0");
}
youngApmData.setState(z ? 1 : 0);
if (br.ak()) {
com.kugou.datacollect.e.a(youngApmData);
}
if (as.f54365e) {
as.f("YoungApmSessionModelImpl", String.format("login apm:%s", youngApmData.toMap()));
}
}
}
public void c(String str) {
this.A = str;
}
public y b() {
return this.k;
}
public void a(y yVar) {
this.k = yVar;
}
public void a(f fVar) {
this.P = fVar;
}
public String[] c() {
int i = this.m;
if (i == 1) {
return w.a(com.kugou.common.config.a.Iu, "http://login.user.kugou.com/v8/login_by_pwd");
}
if (i == 2) {
return w.a(com.kugou.common.config.a.HO, "http://login.user.kugou.com/v4/login_by_token");
}
if (i == 3) {
return w.a(com.kugou.common.config.a.HQ, "http://login.user.kugou.com/v5/login_by_openplat");
}
if (i != 4) {
return null;
}
com.kugou.common.useraccount.entity.ad adVar = this.I;
if (adVar != null && adVar.g()) {
return w.a(com.kugou.common.config.a.It, "http://login.user.kugou.com/v3/login_by_mobile");
}
return w.a(com.kugou.common.config.a.Ir, "http://login.user.kugou.com/v6/login_by_verifycode");
}
public static class e extends f.a {
private e() {
}
@Override
public c.f<ab, String> a(java.lang.reflect.Type type, Annotation[] annotationArr, t tVar) {
return new c.f<ab, String>() {
@Override
public String a(ab abVar) throws IOException {
return abVar.f();
}
};
}
@Override
public c.f<String, z> a(java.lang.reflect.Type type, Annotation[] annotationArr, Annotation[] annotationArr2, t tVar) {
return new c.f<String, z>() {
@Override
public z a(String str) throws IOException {
return z.a(d.u.b("application/json; charset=UTF-8"), str);
}
};
}
}
}