正在查看: 95爱播免登录版 v3.1.9 应用的 AddAccountActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 AddAccountActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui.activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import chat.service.SJChatService;
import com.blankj.utilcode.util.m;
import com.mifeng.ui.R;
import com.r.m.b.e;
import com.showself.domain.GetWXLoginParser;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.UserAccountInfo;
import com.showself.resource.DefaultResourceProvider;
import com.showself.resource.ResourceManager;
import com.showself.show.utils.download.service.DownloadService;
import com.showself.ui.HtmlDisplayActivity;
import com.showself.ui.ShowSelfApp;
import com.showself.ui.h.b.a;
import com.showself.ui.juvenile.activity.JuvenileHallActivity;
import com.showself.ui.login.LoginListActivity;
import com.showself.utils.Utils;
import com.showself.utils.c0;
import com.showself.utils.k0;
import com.showself.utils.l0;
import com.showself.utils.r;
import com.showself.utils.r0;
import com.showself.view.q;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.tencent.connect.common.Constants;
import java.util.HashMap;
public class AddAccountActivity extends com.showself.ui.c implements View.OnClickListener {
private ImageView a;
private RelativeLayout b;
private RelativeLayout c;
private RelativeLayout d;
private RelativeLayout f2947e;
private RelativeLayout f2948f;
private CheckBox f2949g;
private TextView f2950h;
private int f2951i;
private String f2952j;
private String f2953k;
private String l;
class a implements l0.i {
a() {
}
@Override
public void a(boolean z) {
if (z) {
AddAccountActivity.this.f2949g.setChecked(true);
} else {
com.showself.ui.c.exit();
}
}
}
class b extends ClickableSpan {
b() {
}
@Override
public void onClick(View view) {
AddAccountActivity.this.P("https://pics.beeshow.tv/mobile/userAgreement.html");
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setUnderlineText(false);
}
}
class c implements a.c {
c() {
}
@Override
public void a(com.showself.ui.h.a.a aVar) {
if (aVar != null) {
AddAccountActivity.this.U(aVar);
}
}
}
class d implements com.r.c.d {
d() {
}
@Override
public void onRequestFinish(com.r.c.c cVar, Object obj) {
Utils.n(AddAccountActivity.this);
AddAccountActivity.this.N((HashMap) obj);
}
}
class e implements Runnable {
e() {
}
@Override
public void run() {
HashMap hashMap = new HashMap();
hashMap.put("roomid", 0);
hashMap.put("type", Integer.valueOf(AddAccountActivity.this.f2951i));
hashMap.put("account", AddAccountActivity.this.f2952j);
hashMap.put("accesstoken", AddAccountActivity.this.f2953k);
hashMap.put("expiretime", Long.valueOf(Long.parseLong(AddAccountActivity.this.l)));
com.showself.service.f fVar = new com.showself.service.f(1003, hashMap);
?? r0 = AddAccountActivity.this;
r0.addTask(fVar, r0);
}
}
class f implements DefaultResourceProvider.GetVersionCallBack {
final int a;
final DefaultResourceProvider b;
class a implements DefaultResourceProvider.GetDataCallBack {
a() {
}
@Override
public void callBackData() {
AddAccountActivity.this.K();
}
}
f(int i2, DefaultResourceProvider defaultResourceProvider) {
this.a = i2;
this.b = defaultResourceProvider;
}
@Override
public void callBackVersion(int i2) {
if (i2 == -1) {
AddAccountActivity.this.K();
return;
}
int i3 = this.a;
if (i2 == i3) {
AddAccountActivity.this.K();
return;
}
if (i3 > i2) {
i3 = 0;
}
this.b.getRsData(i2, i3, new a());
}
}
class g extends com.sjnet.j.b {
g() {
}
@Override
public void e(int i2, String str, com.sjnet.j.a aVar) {
if (i2 == 0) {
boolean c = aVar.c("success");
LoginResultInfo y = r0.y(AddAccountActivity.this);
y.setWhiteUser(c);
r0.b(ShowSelfApp.h(), y);
}
AddAccountActivity.this.O();
}
}
private boolean J() {
if (r0.k()) {
CheckBox checkBox = this.f2949g;
if (checkBox != null && checkBox.isChecked()) {
return true;
}
X();
} else {
l0.b(this, new a());
}
return false;
}
public void K() {
com.sjnet.i.c.g("/v2/homepage/isGovernmentWhiteUser", new HashMap(), this).b(new g());
}
private void M(String str) {
Utils.U0(this);
com.r.c.a aVar = new com.r.c.a();
aVar.e("code", str);
aVar.b("type", 5);
aVar.e("account", "1111");
new com.r.c.c(com.r.c.c.k(com.showself.net.e.P, 0), aVar, new GetWXLoginParser(this), this).y(new d());
}
public void N(HashMap<Object, Object> hashMap) {
int intValue = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue == com.showself.net.e.m1) {
W(hashMap);
V();
} else if (intValue != com.showself.net.e.S1 || TextUtils.isEmpty(str)) {
Utils.Z0(this, str);
} else {
Utils.a1("切换失败,该账号已被封禁");
}
}
public void O() {
k0.k().d0(ResourceManager.getConstantsInt("login.visitor.enable") == 1);
if (!k0.y()) {
d.g.b.h().k(getApplicationContext());
d.c.a.n().z(ResourceManager.getServiceCenterMinUid(), ResourceManager.getServiceCenterMaxUid(), Utils.M() + System.currentTimeMillis());
d.c.a.n().A(ResourceManager.getVideoMaxDuration(), ResourceManager.getServiceCenterAvatar(), ResourceManager.getServiceCenterNickname(), ResourceManager.getEmojiJsonUrl());
startService(new Intent(getApplicationContext(), (Class<?>) SJChatService.class));
if (ResourceManager.getPreLoadEnable() && !com.r.m.d.a0.c.k()) {
startService(new Intent((Context) this, (Class<?>) DownloadService.class));
}
LoginResultInfo y = r0.y(this);
UserAccountInfo userAccountInfo = new UserAccountInfo();
userAccountInfo.setUid(y.getUserId());
userAccountInfo.setAvatar(y.getAvatar());
userAccountInfo.setUserName(y.getUserName());
userAccountInfo.setShowId(y.getShowid());
userAccountInfo.setLevelUrl(ResourceManager.getWealthUrl(y.getCredit_level()));
userAccountInfo.setLoginType(this.f2951i);
if (this.f2951i == 8) {
this.f2952j = (String) k0.k().l(this.f2951i).get("account");
}
userAccountInfo.setAccount(this.f2952j);
userAccountInfo.setAccesstoken(this.f2953k);
userAccountInfo.setExpiretime(this.l);
if (userAccountInfo.getUid() != 0) {
r0.t0(this, userAccountInfo);
}
} else if (m.a(SJChatService.class)) {
stopService(new Intent(getApplicationContext(), (Class<?>) SJChatService.class));
}
c0.c();
if (com.showself.ui.juvenile.a.c.h() && r0.y(this).getSpvswitch() == 1) {
startActivity(new Intent((Context) this, (Class<?>) JuvenileHallActivity.class));
finish();
} else {
finish();
org.greenrobot.eventbus.c.c().k(new com.r.m.b.e(e.a.ADD_ACCOUNT));
}
}
public void P(String str) {
Intent intent = new Intent((Context) this, (Class<?>) HtmlDisplayActivity.class);
intent.putExtra("title", "条款");
intent.putExtra("currentType", 2);
intent.putExtra("url", str);
startActivity(intent);
}
public void S(q qVar, View view) {
qVar.b();
this.f2949g.setChecked(true);
r0.h0(Boolean.TRUE);
}
private void T(int i2) {
com.showself.ui.h.d.c.c(i2, this, new com.showself.ui.h.b.a(this, new c()), "SwitchAccountAdd");
}
public void U(com.showself.ui.h.a.a aVar) {
String str;
if (aVar.b() == 5) {
M(aVar.f());
return;
}
int i2 = 2;
if (aVar.b() == 1) {
str = aVar.e();
i2 = 1;
} else if (aVar.b() == 2) {
str = aVar.c();
} else if (aVar.b() == 8) {
str = aVar.c();
i2 = 8;
} else {
str = null;
i2 = -1;
}
String d2 = aVar.d();
long a2 = aVar.a();
if (i2 == -1 || TextUtils.isEmpty(d2)) {
return;
}
this.f2951i = i2;
this.f2952j = str;
this.f2953k = d2;
if (i2 == 8) {
this.l = "0";
} else {
this.l = a2 + "";
}
V();
}
private void V() {
if (this.f2952j == null || this.f2953k == null || !Utils.r0(this.l)) {
Utils.a1("请稍后重试");
return;
}
Utils.U0(this);
Utils.B0();
new Handler().postDelayed(new e(), 300L);
}
private void W(HashMap<Object, Object> hashMap) {
this.f2951i = 5;
this.f2952j = (String) hashMap.get("union_id");
this.f2953k = (String) hashMap.get(Oauth2AccessToken.KEY_REFRESH_TOKEN);
this.l = "0";
}
private void X() {
final q qVar = new q();
View inflate = LayoutInflater.from(this).inflate(R.layout.dialog_login_show_rule, (ViewGroup) null);
TextView textView = (TextView) inflate.findViewById(R.id.tv_rule_content);
View findViewById = inflate.findViewById(R.id.tv_rule_exit);
View findViewById2 = inflate.findViewById(R.id.tv_rule_agree);
String string = getString(R.string.login_rule_content);
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
spannableStringBuilder.append((CharSequence) string);
b bVar = new b();
int indexOf = string.indexOf("《");
int indexOf2 = string.indexOf("》") + 1;
spannableStringBuilder.setSpan(bVar, indexOf, indexOf2, 33);
textView.setText(spannableStringBuilder);
spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#c26afc")), indexOf, indexOf2, 33);
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setText(spannableStringBuilder);
textView.setHighlightColor(0);
findViewById.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
q.this.b();
}
});
findViewById2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
AddAccountActivity.this.S(qVar, view);
}
});
qVar.g(false);
qVar.l(this, inflate, 1.0f, 17, r.a(275.0f), r.a(152.0f), 0, 2131755755);
}
private void Y(int i2, String str, boolean z) {
com.showself.ui.c.exit();
Intent intent = new Intent(ShowSelfApp.f(), (Class<?>) LoginListActivity.class);
intent.addFlags(268435456);
intent.putExtra("errorCode", i2);
intent.putExtra("errorMsg", str);
intent.putExtra("showBannedDialog", z);
startActivity(intent);
}
public void L() {
DefaultResourceProvider provider = ResourceManager.getProvider();
provider.getRsVersion(new f(provider.refreshAndgetVersion(), provider));
}
@Override
public void init() {
this.a = (ImageView) findViewById(R.id.iv_add_account_back);
this.b = (RelativeLayout) findViewById(R.id.rl_one_key_login);
this.c = (RelativeLayout) findViewById(R.id.rl_wechat_login);
this.d = (RelativeLayout) findViewById(R.id.rl_qq_login);
this.f2947e = (RelativeLayout) findViewById(R.id.rl_login_list_sina_login);
this.f2948f = (RelativeLayout) findViewById(R.id.rl_login_list_phone_login);
this.f2949g = (CheckBox) findViewById(R.id.agreement_check_box);
this.f2950h = (TextView) findViewById(R.id.tv_yujia_agreement);
this.a.setOnClickListener(this);
this.b.setOnClickListener(this);
this.c.setOnClickListener(this);
this.d.setOnClickListener(this);
this.f2947e.setOnClickListener(this);
this.f2948f.setOnClickListener(this);
this.f2950h.setOnClickListener(this);
}
@Override
protected void onActivityResult(int i2, int i3, Intent intent) {
super.onActivityResult(i2, i3, intent);
com.showself.ui.h.d.c.d(i2, i3, intent);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.iv_add_account_back:
finish();
break;
case R.id.rl_login_list_phone_login:
if (J()) {
startActivity(new Intent(getApplicationContext(), (Class<?>) AddAccountPhoneActivity.class));
break;
}
break;
case R.id.rl_login_list_sina_login:
if (J()) {
com.r.n.g j2 = com.r.n.g.j();
com.r.n.d c2 = com.r.n.d.c();
c2.e("Login");
c2.f("LoginPage");
c2.d("LoginButton");
c2.h(com.r.n.e.Click);
c2.a("type", "Weibo");
c2.a("LoginType", "SwitchAccountAdd");
j2.u(c2.b());
T(3);
break;
}
break;
case R.id.rl_one_key_login:
if (J()) {
com.r.n.g j3 = com.r.n.g.j();
com.r.n.d c3 = com.r.n.d.c();
c3.e("Login");
c3.f("FastLoginPage");
c3.d("LoginButton");
c3.h(com.r.n.e.Click);
c3.a("LoginType", "SwitchAccountAdd");
j3.u(c3.b());
T(6);
break;
}
break;
case R.id.rl_qq_login:
if (J()) {
com.r.n.g j4 = com.r.n.g.j();
com.r.n.d c4 = com.r.n.d.c();
c4.e("Login");
c4.f("LoginPage");
c4.d("LoginButton");
c4.h(com.r.n.e.Click);
c4.a("type", Constants.SOURCE_QQ);
c4.a("LoginType", "SwitchAccountAdd");
j4.u(c4.b());
T(1);
break;
}
break;
case R.id.rl_wechat_login:
if (J()) {
com.r.n.g j5 = com.r.n.g.j();
com.r.n.d c5 = com.r.n.d.c();
c5.e("Login");
c5.f("LoginPage");
c5.d("LoginButton");
c5.h(com.r.n.e.Click);
c5.a("type", "WeChat");
c5.a("LoginType", "SwitchAccountAdd");
j5.u(c5.b());
T(2);
break;
}
break;
case R.id.tv_yujia_agreement:
P("https://pics.beeshow.tv/mobile/userAgreement.html");
break;
}
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_add_account);
init();
}
@Override
protected void onResume() {
super.onResume();
if (Utils.j0()) {
this.b.setVisibility(0);
} else {
this.b.setVisibility(8);
}
}
@Override
public void refresh(Object... objArr) {
Utils.n(this);
int intValue = ((Integer) objArr[0]).intValue();
HashMap hashMap = (HashMap) objArr[1];
if (hashMap != null) {
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue != 1003) {
return;
}
int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
if (intValue2 != com.showself.net.e.m1) {
Y(intValue2, str, false);
if (intValue2 != com.showself.net.e.S1) {
Utils.a1(str);
return;
}
return;
}
k0 k2 = k0.k();
k2.M(this.f2951i);
k2.L(this.f2951i, this.f2952j, this.f2953k, this.l);
if (hashMap.containsKey("downroom") && hashMap.get("downroom") != null) {
((Integer) hashMap.get("downroom")).intValue();
}
L();
}
}
}