正在查看: 95爱播免登录版 v3.1.9 应用的 LoadingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 LoadingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui;
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.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import chat.service.SJChatService;
import com.blankj.utilcode.util.m;
import com.mifeng.ui.R;
import com.showself.domain.GetNotifMediumParser;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.UserAccountInfo;
import com.showself.resource.DefaultResourceProvider;
import com.showself.resource.ResourceManager;
import com.showself.show.bean.LoadingAdBean;
import com.showself.show.utils.download.service.DownloadService;
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.f0;
import com.showself.utils.k0;
import com.showself.utils.l;
import com.showself.utils.l0;
import com.showself.utils.r;
import com.showself.utils.r0;
import com.showself.utils.s;
import com.showself.utils.u0;
import com.showself.view.q;
import java.io.File;
import java.util.HashMap;
import org.apache.commons.httpclient.cookie.Cookie2;
import org.json.JSONObject;
public class LoadingActivity extends com.showself.ui.c {
private int a;
private String b;
private String c;
private String d;
private String f2700e;
private int f2701f;
private int f2702g;
private String f2703h = "";
private String f2704i;
private String f2705j;
private String f2706k;
private int l;
private String[] m;
private com.r.a.a n;
private k0 o;
class a extends com.sjnet.j.b {
a() {
}
@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(LoadingActivity.this);
y.setWhiteUser(c);
r0.b(ShowSelfApp.h(), y);
}
LoadingActivity.this.l0();
}
}
class b implements com.r.c.d {
b() {
}
@Override
public void onRequestFinish(com.r.c.c cVar, Object obj) {
LoadingActivity.this.f0((HashMap) obj);
}
}
class c extends ClickableSpan {
c() {
}
@Override
public void onClick(View view) {
if (Utils.o0()) {
return;
}
LoadingActivity.this.b0("https://pics.beeshow.tv/mobile/userAgreement.html");
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setUnderlineText(false);
}
}
class d extends ClickableSpan {
d() {
}
@Override
public void onClick(View view) {
if (Utils.o0()) {
return;
}
LoadingActivity.this.b0("https://pics.beeshow.tv/mobile/privacyPolicy.html");
}
@Override
public void updateDrawState(TextPaint textPaint) {
textPaint.setUnderlineText(false);
}
}
class e implements l {
e() {
}
@Override
public void a(boolean z) {
if (z) {
Boolean bool = Boolean.TRUE;
r0.h0(bool);
r0.F0(bool);
}
r0.O0(false);
LoadingActivity.this.j0();
}
}
class f implements View.OnClickListener {
final q a;
f(q qVar) {
this.a = qVar;
}
@Override
public void onClick(View view) {
this.a.b();
r0.M0(true);
LoadingActivity.this.g0();
}
}
class g implements com.r.a.b {
g() {
}
@Override
public void a() {
LoadingActivity.this.init();
}
@Override
public void b(String str) {
LoadingActivity.this.init();
}
}
class h implements Runnable {
h() {
}
@Override
public void run() {
if (LoadingActivity.this.isFinishing()) {
return;
}
LoadingActivity.this.o = k0.k();
LoadingActivity loadingActivity = LoadingActivity.this;
loadingActivity.a = loadingActivity.o.m();
HashMap<Object, Object> l = LoadingActivity.this.o.l(LoadingActivity.this.a);
int i2 = LoadingActivity.this.a;
if (i2 == 0) {
LoadingActivity.this.b = (String) l.get("account");
LoadingActivity.this.c = (String) l.get("password");
LoadingActivity.this.c0();
return;
}
if (i2 == 1 || i2 == 2 || i2 == 3) {
LoadingActivity.this.b = (String) l.get("account");
LoadingActivity.this.d = (String) l.get("accesstoken");
LoadingActivity.this.f2700e = (String) l.get("expiretime");
LoadingActivity.this.e0();
return;
}
if (i2 == 4) {
LoadingActivity.this.d0();
return;
}
if (i2 != 5 && i2 != 8) {
LoadingActivity.this.m0();
return;
}
LoadingActivity.this.b = (String) l.get("account");
LoadingActivity.this.d = (String) l.get("accesstoken");
LoadingActivity.this.f2700e = "0";
String str = "LoadingActivity == account:" + LoadingActivity.this.b + " === accesstoken:" + LoadingActivity.this.d;
LoadingActivity.this.e0();
}
}
class i implements com.r.c.d {
i() {
}
@Override
public void onRequestFinish(com.r.c.c cVar, Object obj) {
LoadingActivity.this.Z(obj);
}
}
class j implements l {
j() {
}
@Override
public void a(boolean z) {
LoadingActivity.this.finish();
}
}
class k implements DefaultResourceProvider.GetVersionCallBack {
final int a;
final DefaultResourceProvider b;
class a implements DefaultResourceProvider.GetDataCallBack {
a() {
}
@Override
public void callBackData() {
LoadingActivity.this.T();
}
}
k(int i2, DefaultResourceProvider defaultResourceProvider) {
this.a = i2;
this.b = defaultResourceProvider;
}
@Override
public void callBackVersion(int i2) {
if (i2 == -1) {
LoadingActivity.this.T();
return;
}
int i3 = this.a;
if (i2 == i3) {
LoadingActivity.this.T();
return;
}
if (i3 > i2) {
i3 = 0;
}
this.b.getRsData(i2, i3, new a());
}
}
public LoadingActivity() {
String str = com.showself.net.j.b;
this.f2704i = str;
String str2 = com.showself.net.j.c;
this.f2705j = str2;
String str3 = com.showself.net.j.d;
this.f2706k = str3;
this.l = 0;
this.m = new String[]{str, str2, str3};
}
public void T() {
com.sjnet.i.c.g("/v2/homepage/isGovernmentWhiteUser", new HashMap(), this).b(new a());
}
private void U(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
File file = new File(getCacheDir(), f0.b(str));
if (!file.exists() || file.length() <= 0) {
new com.r.h.a.b().c(str);
String j2 = r0.j(this);
if (!TextUtils.isEmpty(j2)) {
File file2 = new File(getCacheDir(), j2);
if (file2.exists()) {
file2.delete();
}
}
r0.g0(this, f0.b(str));
}
}
private void V(String str) {
if (isFinishing()) {
return;
}
Utils.Q0(this, getString(R.string.dialog_title_notice), str, null, 0, getString(R.string.positive), getResources().getColor(2131099758), new j(), false);
}
private void Y(String str) {
new com.r.c.c(str, new com.r.c.a(), new com.r.c.b(1), this).v(new i());
}
private void a0() {
if (!k0.k().c()) {
h0();
}
W();
new Handler().postDelayed(new h(), 0L);
}
public void b0(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 c0() {
if (this.b == null || this.c == null) {
m0();
return;
}
HashMap hashMap = new HashMap();
hashMap.put("account", this.b);
hashMap.put("password", this.c);
hashMap.put("roomid", Integer.valueOf(this.f2701f));
addTask(new com.showself.service.f(10000, hashMap), this);
}
public void d0() {
addTask(new com.showself.service.f(20015, new HashMap()), this);
}
public void e0() {
if (this.a == -1 || this.b == null || this.d == null || !Utils.r0(this.f2700e)) {
m0();
return;
}
HashMap hashMap = new HashMap();
hashMap.put("roomid", Integer.valueOf(this.f2701f));
hashMap.put("type", Integer.valueOf(this.a));
hashMap.put("account", this.b);
hashMap.put("accesstoken", this.d);
hashMap.put("expiretime", Long.valueOf(Long.parseLong(this.f2700e)));
addTask(new com.showself.service.f(1003, hashMap), this);
}
public void f0(HashMap<Object, Object> hashMap) {
if (hashMap != null) {
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) {
Utils.Z0(this, str);
} else if (hashMap.get("web_address") != null) {
r0.k0((String) hashMap.get("web_address"), this);
}
}
}
public void g0() {
if (this.n == null) {
this.n = new com.r.a.a(this);
}
this.n.c(new String[0], new g());
}
private void h0() {
addTask(new com.showself.service.f(10055, new HashMap()), this);
}
private void i0() {
q qVar = new q();
View inflate = LayoutInflater.from(this).inflate(R.layout.dialog_show_permissions, (ViewGroup) null);
((TextView) inflate.findViewById(R.id.tv_permissions_description)).setText(String.format(getString(R.string.permissions_description), getString(2131689532)));
((TextView) inflate.findViewById(R.id.tv_know)).setOnClickListener(new f(qVar));
qVar.g(false);
qVar.l(this, inflate, 1.0f, 17, r.a(275.0f), r.a(327.0f), 0, 2131755755);
}
public void j0() {
if (r0.U()) {
g0();
} else {
i0();
}
}
private void k0() {
String string = getString(R.string.rule_content_url_note);
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
spannableStringBuilder.append((CharSequence) string);
c cVar = new c();
d dVar = new d();
int indexOf = string.indexOf("阅读完整的") + 5;
int i2 = indexOf + 9;
int indexOf2 = string.indexOf("了解详细内容");
int i3 = i2 - 1;
spannableStringBuilder.setSpan(cVar, indexOf, i3, 33);
spannableStringBuilder.setSpan(dVar, i2, indexOf2, 33);
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(Color.parseColor("#c26afc"));
ForegroundColorSpan foregroundColorSpan2 = new ForegroundColorSpan(Color.parseColor("#c26afc"));
spannableStringBuilder.setSpan(foregroundColorSpan, indexOf, i3, 33);
spannableStringBuilder.setSpan(foregroundColorSpan2, i2, indexOf2, 33);
com.r.i.d.e(this, getString(R.string.agreement_rule), spannableStringBuilder, new e());
}
public void l0() {
if (d.g.b.h().o()) {
d.g.b.h().e();
d.g.a.d(getApplicationContext()).e();
}
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.a);
if (this.a == 8) {
this.b = (String) k0.k().l(this.a).get("account");
}
userAccountInfo.setAccount(this.b);
if (this.a == 0) {
userAccountInfo.setPassword(this.c);
} else {
userAccountInfo.setAccesstoken(this.d);
userAccountInfo.setExpiretime(this.f2700e);
}
if (userAccountInfo.getUid() != 0) {
r0.t0(this, userAccountInfo);
}
} else if (m.a(SJChatService.class)) {
stopService(new Intent(getApplicationContext(), (Class<?>) SJChatService.class));
}
LoginResultInfo y2 = r0.y(this);
c0.c();
if (com.showself.ui.juvenile.a.c.h() && r0.y(this).getSpvswitch() == 1) {
startActivity(new Intent((Context) this, (Class<?>) JuvenileHallActivity.class));
finish();
return;
}
int i2 = this.f2701f;
if (i2 == 0) {
Bundle bundle = new Bundle();
LoadingAdBean loadingAdBean = y2.mLoadingAdBean;
if (loadingAdBean != null && !TextUtils.isEmpty(loadingAdBean.image)) {
String W = Utils.W(y2.mLoadingAdBean.image);
U(W);
bundle.putString("ad_display_url", W);
bundle.putString("ad_hyper_link", y2.mLoadingAdBean.ref_html);
bundle.putInt("time_count", y2.mLoadingAdBean.interv);
}
HomeActivity.l0(this, this.f2703h, this.f2702g, bundle);
} else {
HomeActivity.l0(this, null, i2, null);
}
finish();
}
public void m0() {
n0(0, "");
}
private void n0(int i2, String str) {
Intent intent = new Intent((Context) this, (Class<?>) LoginListActivity.class);
intent.putExtra("roomid", this.f2701f);
intent.putExtra("errorCode", i2);
intent.putExtra("errorMsg", str);
startActivity(intent);
finish();
}
public void W() {
new com.r.c.c(com.r.c.c.k("serv_get_notif_medium.php", 0), new com.r.c.a(), new GetNotifMediumParser(), this).y(new b());
}
public void X() {
DefaultResourceProvider provider = ResourceManager.getProvider();
provider.getRsVersion(new k(provider.refreshAndgetVersion(), provider));
}
protected void Z(Object obj) {
if (obj instanceof JSONObject) {
JSONObject jSONObject = (JSONObject) obj;
if (jSONObject.optInt("statuscode") != 0 || jSONObject.optJSONObject("data") == null) {
int i2 = this.l + 1;
this.l = i2;
if (i2 > 3 || i2 == 3) {
V("从服务器获取不到数据");
return;
} else {
if (i2 < 3) {
Y(this.m[i2]);
return;
}
return;
}
}
String optString = jSONObject.optJSONObject("data").optString("e1");
String optString2 = jSONObject.optJSONObject("data").optString("e2");
String optString3 = jSONObject.optJSONObject("data").optString(Cookie2.DOMAIN);
String optString4 = jSONObject.optJSONObject("data").optString("h5");
com.showself.net.j.g(optString2);
com.showself.net.j.h(optString);
com.sjnet.c cVar = new com.sjnet.c("android_mifeng_appver", d.i.j.h(this).versionName);
cVar.f3865i = false;
cVar.a = Utils.p();
cVar.f3862f = com.showself.net.e.a(this);
cVar.f3863g = r0.b0(this).getIdfa();
cVar.c = "mifeng";
cVar.b = "8fo&*ieX";
cVar.f3861e = r0.b0(this).getBaidu_channelid();
com.sjnet.b.h().n(optString, optString2, cVar, ShowSelfApp.h());
com.showself.net.j.f(optString4);
com.showself.net.j.d(optString3);
a0();
}
}
@Override
public void finish() {
super.finish();
overridePendingTransition(R.anim.activity_zoom_in, R.anim.activity_zoom_out);
}
@Override
public void init() {
Utils.B(this);
if (l0.e()) {
l0.f(this);
s.b(this);
}
Utils.b(this);
int i2 = this.l;
if (i2 < 3) {
Y(this.m[i2]);
}
}
@Override
protected void onActivityResult(int i2, int i3, Intent intent) {
super.onActivityResult(i2, i3, intent);
if (i3 == 0 && i2 == 10000) {
g0();
}
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (!isTaskRoot() && getIntent() != null) {
String action = getIntent().getAction();
if (getIntent().hasCategory("android.intent.category.LAUNCHER") && "android.intent.action.MAIN".equals(action)) {
finish();
return;
}
}
setContentView(R.layout.loading_act);
overridePendingTransition(R.anim.activity_zoom_in, R.anim.activity_zoom_in);
u0.q(this, null);
if (getIntent() != null) {
this.f2701f = getIntent().getIntExtra("roomid", 0);
this.f2703h = getIntent().getStringExtra("custom_url");
}
if (r0.V()) {
k0();
} else if (r0.U()) {
g0();
} else {
j0();
}
}
@Override
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i2, strArr, iArr);
if (this.n.e(i2, strArr, iArr)) {
}
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public void refresh(Object... objArr) {
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) {
int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str2 = "LoadingActivity == status:" + intValue2 + " === message:" + str;
if (intValue2 != com.showself.net.e.m1) {
if (intValue2 != com.showself.net.e.S1) {
Utils.a1(str);
}
n0(intValue2, str);
return;
} else {
if (hashMap.containsKey("downroom") && hashMap.get("downroom") != null) {
this.f2702g = ((Integer) hashMap.get("downroom")).intValue();
}
X();
return;
}
}
if (intValue == 10000) {
int intValue3 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
if (intValue3 != 0) {
if (intValue3 != com.showself.net.e.S1) {
Utils.a1(str);
}
n0(intValue3, str);
return;
} else {
if (hashMap.containsKey("downroom") && hashMap.get("downroom") != null) {
this.f2702g = ((Integer) hashMap.get("downroom")).intValue();
}
X();
return;
}
}
if (intValue == 10055) {
if (((Integer) hashMap.get(com.showself.net.e.n1)).intValue() == com.showself.net.e.m1) {
k0.k().B(true);
}
} else {
if (intValue != 20015) {
return;
}
int intValue4 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
if (intValue4 == 0) {
k0.k().M(4);
X();
} else {
if (intValue4 != com.showself.net.e.S1) {
Toast.makeText(getApplicationContext(), str, 0).show();
}
n0(intValue4, str);
}
}
}
}
}