汉雅星空 v0.91.26版本的 MD5 值为:fb6fa60ca638fef7705b9184d8991e21
以下内容为反编译后的 LoginActivity.java 源代码,内容仅作参考
package com.ddtx.dingdatacontact.login;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.C2824;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.OTEKD6PAAmi7762i7iL8.VTbgspDO79hQuPi5UTaf.C2604;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.wqJ2NmXeBPvAgdCererd.QOgyztI3PognN1fbgSC9.C2739;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.xdCSMyHoFqmONqyxcH4k.B2rebCwAL8RBInXnf8ZJ.C2786;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.xdCSMyHoFqmONqyxcH4k.B2rebCwAL8RBInXnf8ZJ.C2787;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.xdCSMyHoFqmONqyxcH4k.C2815;
import VTbgspDO79hQuPi5UTaf.D3xb4FRHBOMBe4Hy2ejU.MyOtCDZXecx36WZT1nGV.xdCSMyHoFqmONqyxcH4k.CountDownTimerC2822;
import VTbgspDO79hQuPi5UTaf.VTbgspDO79hQuPi5UTaf.MyOtCDZXecx36WZT1nGV.ComponentCallbacks2C3781;
import VTbgspDO79hQuPi5UTaf.dwrGtHm6Ix7GBKpd4ToA.MyOtCDZXecx36WZT1nGV.jOx17wX8wySbgrAMIF6Q.C4209;
import VTbgspDO79hQuPi5UTaf.edyeMRDmMrLBwmB2Gf6t.MyOtCDZXecx36WZT1nGV.MyOtCDZXecx36WZT1nGV.C4282;
import VTbgspDO79hQuPi5UTaf.edyeMRDmMrLBwmB2Gf6t.MyOtCDZXecx36WZT1nGV.MyOtCDZXecx36WZT1nGV.VTbgspDO79hQuPi5UTaf.C4252;
import VTbgspDO79hQuPi5UTaf.edyeMRDmMrLBwmB2Gf6t.MyOtCDZXecx36WZT1nGV.MyOtCDZXecx36WZT1nGV.plfsYuBjtgY1nLbR6D4m.AbstractC4269;
import VTbgspDO79hQuPi5UTaf.wqJ2NmXeBPvAgdCererd.MyOtCDZXecx36WZT1nGV.QOgyztI3PognN1fbgSC9.C4726;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.PopupWindow;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.widget.AppCompatSpinner;
import androidx.constraintlayout.widget.ConstraintLayout;
import cn.bmob.v3.Bmob;
import cn.bmob.v3.BmobQuery;
import cn.bmob.v3.BmobUser;
import cn.bmob.v3.exception.BmobException;
import cn.bmob.v3.listener.FindListener;
import com.alibaba.fastjson.JSON;
import com.ddtx.dingdatacontact.AppConstant;
import com.ddtx.dingdatacontact.Entity.AppSettingBean;
import com.ddtx.dingdatacontact.Entity.DomainBean;
import com.ddtx.dingdatacontact.Entity.LoginBean;
import com.ddtx.dingdatacontact.Entity.UrlsData;
import com.ddtx.dingdatacontact.Entity.WalletQuestionBean;
import com.ddtx.dingdatacontact.Entity.WxInfoBean;
import com.ddtx.dingdatacontact.LogoutService;
import com.ddtx.dingdatacontact.R;
import com.ddtx.dingdatacontact.login.LoginActivity;
import com.ddtx.dingdatacontact.main.activity.MainActivity;
import com.ddtx.dingdatacontact.service.PhoneIntercepterService;
import com.google.gson.Gson;
import com.huawei.hms.actions.SearchIntents;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.meizu.cloud.pushsdk.notification.model.NotifyType;
import com.netease.nim.uikit.AppConfig;
import com.netease.nim.uikit.CodeBean;
import com.netease.nim.uikit.GetChildAc;
import com.netease.nim.uikit.IsmustmobileBean;
import com.netease.nim.uikit.LoginTypeBean;
import com.netease.nim.uikit.api.NimUIKit;
import com.netease.nim.uikit.api.wrapper.NimToolBarOptions;
import com.netease.nim.uikit.business.preference.UIkitUserPreferences;
import com.netease.nim.uikit.business.robot.parser.elements.base.ElementTag;
import com.netease.nim.uikit.business.session.constant.Extras;
import com.netease.nim.uikit.common.ToastHelper;
import com.netease.nim.uikit.common.activity.UI;
import com.netease.nim.uikit.common.media.picker.PickImageHelper;
import com.netease.nim.uikit.common.ui.dialog.CustomAlertDialog;
import com.netease.nim.uikit.common.ui.dialog.DialogMaker;
import com.netease.nim.uikit.common.ui.dialog.EasyAlertDialogHelper;
import com.netease.nim.uikit.common.ui.widget.ClearableEditTextWithIcon;
import com.netease.nim.uikit.common.util.log.sdk.wrapper.AbsNimLog;
import com.netease.nim.uikit.common.util.sys.NetworkUtil;
import com.netease.nim.uikit.common.util.sys.TimeUtil;
import com.netease.nim.uikit.rest.Host;
import com.netease.nim.uikit.rest.JsonCallback;
import com.netease.nim.uikit.rest.SignUtil;
import com.netease.nim.uikit.rest.entity.BaseBean;
import com.netease.nim.uikit.support.permission.MPermission;
import com.netease.nim.uikit.support.permission.annotation.OnMPermissionDenied;
import com.netease.nim.uikit.support.permission.annotation.OnMPermissionGranted;
import com.netease.nim.uikit.support.permission.annotation.OnMPermissionNeverAskAgain;
import com.netease.nim.uikit.utils.net.HttpListener;
import com.netease.nim.uikit.utils.net.OkUtil;
import com.netease.nim.uikit.widget.CircleView;
import com.netease.nimlib.sdk.AbortableFuture;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.RequestCallbackWrapper;
import com.netease.nimlib.sdk.StatusBarNotificationConfig;
import com.netease.nimlib.sdk.auth.AuthService;
import com.netease.nimlib.sdk.auth.LoginInfo;
import com.netease.nimlib.sdk.nos.NosService;
import com.netease.nimlib.sdk.uinfo.constant.UserInfoFieldEnum;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.Character;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.regex.Pattern;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormBody;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import p4lwnLDXTC6D4YR7s2W3.p4lwnLDXTC6D4YR7s2W3.InterfaceC8544;
import p4lwnLDXTC6D4YR7s2W3.yVwwADdgUVk67DULYXLD.xdCSMyHoFqmONqyxcH4k.C9201;
public class LoginActivity extends UI implements View.OnKeyListener, View.OnClickListener {
private static final String f15039 = "KICK_OUT";
private static final String f15040 = LoginActivity.class.getSimpleName();
public List<WalletQuestionBean.Question> f15041;
private ConstraintLayout f15043;
private TextView f15044;
private boolean f15045;
private File f15046;
private TextView f15047;
private TextView f15049;
private TextView f15050;
private TextView f15051;
private PopupWindow f15052;
private EditText f15053;
private ConstraintLayout f15055;
private EditText f15057;
private ClearableEditTextWithIcon f15058;
public ConstraintLayout f15061;
private TextView f15064;
private AbortableFuture<LoginInfo> f15069;
private TextView f15070;
private ListView f15072;
private View f15073;
private ConstraintLayout f15076;
private CheckBox f15077;
private ClearableEditTextWithIcon f15078;
private AppCompatSpinner f15079;
private boolean f15083;
private ClearableEditTextWithIcon f15084;
private ClearableEditTextWithIcon f15085;
private int f15086;
private View f15087;
private ConstraintLayout f15089;
private EditText f15090;
private int f15091;
private ClearableEditTextWithIcon f15092;
private ImageView f15094;
private TextView f15097;
private TextView f15098;
private TextView f15100;
private String f15101;
private ClearableEditTextWithIcon f15102;
private C2739 f15103;
private CircleView f15104;
private boolean f15105;
public Button f15106;
private String f15107;
private int f15060 = C9201.f30930;
private final int f15081 = 0;
private final int f15048 = 1;
private final int f15062 = 110;
private boolean f15071 = false;
private boolean f15074 = false;
private boolean f15042 = true;
private boolean f15082 = true;
public Handler f15066 = new Handler(new C5500());
private String f15093 = "";
private final String[] f15059 = {"android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE", "android.permission.READ_PHONE_STATE", "android.permission.CALL_PHONE", "android.permission.ANSWER_PHONE_CALLS", "android.permission.READ_CALL_LOG", "android.permission.WRITE_CALL_LOG"};
private String f15065 = "";
private List<DomainBean.DataBean> f15099 = new ArrayList();
public String f15054 = "";
public int f15068 = 0;
private int f15095 = 1990;
private int f15075 = 10;
private int f15067 = 10;
public List<DomainBean.DataBean> f15080 = new ArrayList();
public List<DomainBean.DataBean> f15096 = new ArrayList();
public List<DomainBean.DataBean> f15088 = new ArrayList();
public int f15063 = 0;
private int f15056 = 0;
public class C5498 extends AbstractC4269 {
public C5498() {
}
@Override
public void onError(Call call, Exception exc, int i) {
}
@Override
public void onResponse(String str, int i) {
try {
if (new JSONObject(str).getInt(C4209.f10076) != 0) {
LoginActivity.this.f15100.setVisibility(8);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}
public class C5499 implements CustomAlertDialog.onSeparateItemClickListener {
public final WalletQuestionBean.Question f15110;
public C5499(WalletQuestionBean.Question question) {
this.f15110 = question;
}
@Override
public void onClick() {
LoginActivity.this.f15057.setText(this.f15110.question);
}
}
public class C5500 implements Handler.Callback {
public C5500() {
}
@Override
public boolean handleMessage(@InterfaceC8544 Message message) {
int i = message.what;
if (i == 101) {
LoginActivity.this.showProgressDialog("线路检测中...");
} else if (i == 102) {
LoginActivity.this.hideProgressDialog();
if (message.arg1 == 1) {
Toast.makeText(LoginActivity.this, "当前线路稳定!", 0).show();
} else {
Toast.makeText(LoginActivity.this, "当前线路不稳定,请选择其它线路!", 0).show();
}
if (!LoginActivity.this.f15042) {
boolean unused = LoginActivity.this.f15082;
}
}
return false;
}
}
public class C5501 implements InputFilter {
public C5501() {
}
@Override
public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
while (i < i2) {
if (!LoginActivity.m20569(charSequence.charAt(i))) {
return "";
}
i++;
}
return null;
}
}
public class C5502 extends JsonCallback<BaseBean> {
public final String f15113;
public final String f15114;
public C5502(String str, String str2) {
this.f15114 = str;
this.f15113 = str2;
}
@Override
public void onError(Call call, Exception exc, int i) {
LoginActivity.this.hideProgressDialog();
if (LoginActivity.this.f15056 == 0) {
LoginActivity.this.m20628();
} else {
LoginActivity.this.m20629();
}
}
@Override
public void onResponse(BaseBean baseBean) {
LoginActivity.this.hideProgressDialog();
if (baseBean.getCode() == 0) {
Toast.makeText(LoginActivity.this, R.string.register_success, 0).show();
LoginActivity.this.m20539();
LoginActivity.this.f15090.setText(this.f15114);
LoginActivity.this.f15053.setText(this.f15113);
LoginActivity.this.f15078.setText("");
LoginActivity.this.f15085.setText("");
LoginActivity.this.f15102.setText("");
LoginActivity.this.f15084.setText("");
LoginActivity.this.m20552();
return;
}
LoginActivity.this.toast("" + baseBean.getMsg());
}
}
public class C5503 extends JsonCallback<IsmustmobileBean> {
public C5503() {
}
@Override
public void onResponse(IsmustmobileBean ismustmobileBean) {
ismustmobileBean.getData().getIsmustmobile();
}
}
public class C5504 extends JsonCallback<CodeBean> {
public C5504() {
}
@Override
public void onResponse(CodeBean codeBean) {
int code = codeBean.getCode();
if (code == 0) {
LoginActivity.this.toast("发送成功");
new CountDownTimerC2822(60L, 1L, LoginActivity.this.f15098, "重新发送").start();
} else {
if (code != 1) {
return;
}
LoginActivity.this.toast(codeBean.getMsg());
}
}
}
public class C5505 extends RequestCallbackWrapper<String> {
public class C5506 extends RequestCallbackWrapper<Void> {
public final String f15120;
public C5506(String str) {
this.f15120 = str;
}
@Override
public void onResult(int i, Void r3, Throwable th) {
if (i == 200) {
AbsNimLog.i(LoginActivity.f15040, "upload avatar to 云信服务端 成功, url =" + this.f15120);
return;
}
AbsNimLog.i(LoginActivity.f15040, "upload avatar to 云信服务端 失败, code =" + i);
}
}
public C5505() {
}
@Override
public void onResult(int i, String str, Throwable th) {
if (i != 200 || TextUtils.isEmpty(str)) {
AbsNimLog.i(LoginActivity.f15040, "upload avatar fail, code =" + i);
return;
}
AbsNimLog.i(LoginActivity.f15040, "upload avatar success, url =" + str);
C2604.m8934(UserInfoFieldEnum.AVATAR, str, new C5506(str));
LoginActivity.this.m20574(str);
}
}
public class ViewOnClickListenerC5507 implements View.OnClickListener {
public ViewOnClickListenerC5507() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, (Class<?>) GetChildAc.getParentAc("ForgetActivity")));
}
}
public class C5508 implements Callback {
public final String f15123;
public C5508(String str) {
this.f15123 = str;
}
@Override
public void onFailure(Call call, IOException iOException) {
iOException.toString();
}
@Override
public void onResponse(Call call, Response response) {
try {
WxInfoBean wxInfoBean = (WxInfoBean) new Gson().fromJson(response.body().string(), WxInfoBean.class);
LoginActivity.this.f15091 = wxInfoBean.getSex();
LoginActivity.this.f15093 = "1990-01-01";
File file = ComponentCallbacks2C3781.m13432(LoginActivity.this).mo13418(wxInfoBean.getHeadimgurl()).m13488(500, 500).get();
LoginActivity.this.m20545(file, new File(LoginActivity.this.getExternalFilesDir("Wxcache").getAbsolutePath() + File.separator + "WxheadCache.jpg"));
LoginActivity.this.m20571(wxInfoBean.getNickname(), file, this.f15123);
} catch (Exception e) {
e.toString();
}
}
}
public class C5509 implements DatePickerDialog.OnDateSetListener {
public C5509() {
}
@Override
public void onDateSet(DatePicker datePicker, int i, int i2, int i3) {
LoginActivity.this.f15095 = i;
LoginActivity.this.f15075 = i2;
LoginActivity.this.f15067 = i3;
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f15093 = TimeUtil.getFormatDatetime(loginActivity.f15095, LoginActivity.this.f15075, LoginActivity.this.f15067);
LoginActivity.this.f15064.setText(LoginActivity.this.f15093);
}
}
public class C5510 extends JsonCallback<BaseBean> {
public final long f15125;
public final DomainBean.DataBean f15126;
public C5510(DomainBean.DataBean dataBean, long j) {
this.f15126 = dataBean;
this.f15125 = j;
}
@Override
public void onError(Call call, Exception exc, int i) {
super.onError(call, exc, i);
this.f15126.setExeTime(2147483647L);
LoginActivity.this.f15096.add(this.f15126);
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f15063++;
loginActivity.m20540();
}
@Override
public void onResponse(BaseBean baseBean) {
this.f15126.setExeTime(System.currentTimeMillis() - this.f15125);
LoginActivity.this.f15096.add(this.f15126);
LoginActivity.this.f15088.add(this.f15126);
LoginActivity.this.m20540();
}
}
public class RunnableC5511 implements Runnable {
public final View f15129;
public RunnableC5511(View view) {
this.f15129 = view;
}
@Override
public void run() {
LoginActivity.this.f15052.showAtLocation(this.f15129, 17, 0, 0);
}
}
public class C5512 extends AbstractC4269 {
public final ConstraintLayout f15131;
public C5512(ConstraintLayout constraintLayout) {
this.f15131 = constraintLayout;
}
@Override
public void onError(Call call, Exception exc, int i) {
}
@Override
public void onResponse(String str, int i) {
String unused = LoginActivity.f15040;
String str2 = "onResponse: " + str;
try {
LoginTypeBean loginTypeBean = (LoginTypeBean) JSON.parseObject(new JSONObject(str).getJSONObject("data").toString(), LoginTypeBean.class);
if (!TextUtils.isEmpty(loginTypeBean.getNimAppKey())) {
C2787.m9317("appkey", loginTypeBean.getNimAppKey());
}
int ismustmobile = loginTypeBean.getIsmustmobile();
LoginActivity.this.f15086 = loginTypeBean.getIsinvitecode();
LoginActivity.this.f15083 = loginTypeBean.getIsweixinlogin() == 1;
LoginActivity.this.f15105 = loginTypeBean.getIssecret() == 1;
LoginActivity.this.f15045 = loginTypeBean.getIsavatar() == 1;
if (loginTypeBean.getLogininfo() != null && !TextUtils.isEmpty(loginTypeBean.getLogininfo())) {
LoginActivity.this.f15065 = loginTypeBean.getLogininfo();
}
LoginActivity.this.f15104.setVisibility(LoginActivity.this.f15045 ? 0 : 8);
LoginActivity.this.f15055.setVisibility(LoginActivity.this.f15105 ? 0 : 8);
if (LoginActivity.this.f15105) {
LoginActivity.this.m20617();
}
LoginActivity.this.f15076.setVisibility(LoginActivity.this.f15105 ? 0 : 8);
LoginActivity.this.f15049.setVisibility(LoginActivity.this.f15105 ? 0 : 8);
AppConfig.LIMIT_SPEAK = loginTypeBean.getIsspeakingtime() == 1;
if (ismustmobile == 1) {
LoginActivity.this.f15078.setHint("请输入手机号");
LoginActivity.this.f15061.setVisibility(0);
} else if (ismustmobile == 0) {
if (C2824.m9459().isUserphoneHint()) {
LoginActivity.this.f15078.setHint("请输入手机号");
}
LoginActivity.this.f15061.setVisibility(8);
}
if (LoginActivity.this.f15086 == 1) {
this.f15131.setVisibility(0);
} else {
this.f15131.setVisibility(8);
}
if (LoginActivity.this.f15083) {
LoginActivity.this.f15043.setVisibility(0);
}
String unused2 = LoginActivity.f15040;
} catch (Exception e) {
e.printStackTrace();
String unused3 = LoginActivity.f15040;
}
}
}
public class C5513 extends JsonCallback<WalletQuestionBean> {
public C5513() {
}
@Override
public void onResponse(WalletQuestionBean walletQuestionBean) {
if (walletQuestionBean.getCode() != 0) {
LoginActivity.this.toast(walletQuestionBean.getMsg());
return;
}
LoginActivity loginActivity = LoginActivity.this;
List<WalletQuestionBean.Question> list = walletQuestionBean.data;
loginActivity.f15041 = list;
if (list.size() > 0) {
double random = Math.random();
double size = LoginActivity.this.f15041.size();
Double.isNaN(size);
LoginActivity.this.f15057.setText(LoginActivity.this.f15041.get((int) (random * size)).question);
}
}
}
public class ViewOnLayoutChangeListenerC5514 implements View.OnLayoutChangeListener {
public final TextView f15134;
public ViewOnLayoutChangeListenerC5514(TextView textView) {
this.f15134 = textView;
}
@Override
public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
float width = view.getWidth() - LoginActivity.this.getResources().getDimension(R.dimen.dp_20);
float measureText = this.f15134.getPaint().measureText(this.f15134.getText().toString());
float textSize = this.f15134.getTextSize();
if (measureText == width || this.f15134.getLineCount() <= 1) {
return;
}
this.f15134.setTextSize(0, (width * textSize) / measureText);
}
}
public class C5515 extends JsonCallback<BaseBean> {
public C5515() {
}
@Override
public void onError(Call call, Exception exc, int i) {
}
@Override
public void onResponse(BaseBean baseBean) {
if (baseBean.getCode() == 0) {
LoginActivity.this.toast("发送成功");
new CountDownTimerC2822(60L, 1L, LoginActivity.this.f15098, "重新发送").start();
}
}
}
public class C5516 implements PopupWindow.OnDismissListener {
public C5516() {
}
@Override
public void onDismiss() {
LoginActivity.this.m20634(1.0f);
}
}
public class C5517 extends AbstractC4269 {
public C5517() {
}
@Override
public void onError(Call call, Exception exc, int i) {
LoginActivity loginActivity = LoginActivity.this;
if (loginActivity.f15068 < 10) {
loginActivity.m20633();
}
LoginActivity.this.f15068++;
}
@Override
public void onResponse(String str, int i) {
try {
JSONObject jSONObject = new JSONObject(str);
LoginActivity.this.f15054 = jSONObject.getString(SearchIntents.EXTRA_QUERY);
} catch (Exception e) {
e.printStackTrace();
LoginActivity.this.f15054 = "";
}
}
}
public class C5518 implements HttpListener {
public C5518() {
}
@Override
public void error(String str) {
}
@Override
public void result(Object obj) {
if (obj == null || !(obj instanceof AppSettingBean)) {
return;
}
C2824.f6673 = ((AppSettingBean) obj).phones;
String str = "" + C2824.f6673.toString();
}
}
public class DialogInterfaceOnCancelListenerC5519 implements DialogInterface.OnCancelListener {
public DialogInterfaceOnCancelListenerC5519() {
}
@Override
public void onCancel(DialogInterface dialogInterface) {
if (LoginActivity.this.f15069 != null) {
LoginActivity.this.f15069.abort();
LoginActivity.this.m20611();
}
}
}
public class C5520 implements AdapterView.OnItemSelectedListener {
public C5520() {
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long j) {
LoginActivity.this.f15091 = i;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
}
public class ViewOnClickListenerC5521 implements View.OnClickListener {
public ViewOnClickListenerC5521() {
}
@Override
public void onClick(View view) {
if (LoginActivity.this.f15071) {
LoginActivity.this.m20579();
} else {
LoginActivity.this.m20552();
}
}
}
public class C5522 extends JsonCallback<LoginBean> {
public final String f15142;
public final String f15143;
public class RunnableC5523 implements Runnable {
public RunnableC5523() {
}
@Override
public void run() {
LoginActivity loginActivity = LoginActivity.this;
loginActivity.m20534(loginActivity.f15107);
}
}
public C5522(String str, String str2) {
this.f15143 = str;
this.f15142 = str2;
}
@Override
public void onError(Call call, Exception exc, int i) {
LoginActivity.this.hideProgressDialog();
LoginActivity.this.toast("登录失败,请切换线路后再试");
exc.printStackTrace();
}
@Override
public void onResponse(LoginBean loginBean) {
LoginActivity.this.hideProgressDialog();
if (loginBean.getCode() == 0 && loginBean.getData() != null) {
LogoutService.f14728 = loginBean.getData().issup == 1;
UIkitUserPreferences.saveToken(loginBean.getData().token);
C2787.m9333(this.f15143);
C2787.m9325(loginBean.getData().friendcover);
C4726.m17071(this.f15143);
if (LoginActivity.this.f15077.isChecked()) {
String m9324 = C2787.m9324("rbPwd");
if (TextUtils.isEmpty(m9324) || "{}".equals(m9324)) {
m9324 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
try {
JSONArray jSONArray = new JSONArray(m9324);
JSONObject jSONObject = new JSONObject();
jSONObject.put("account", this.f15143);
jSONObject.put("pwd", this.f15142);
int i = 0;
while (true) {
if (i >= jSONArray.length()) {
i = -1;
break;
} else if (jSONArray.getJSONObject(i).getString("account").equals(this.f15143)) {
break;
} else {
i++;
}
}
if (i == -1) {
if (jSONArray.length() > 5) {
jSONArray.remove(0);
}
} else {
jSONArray.remove(i);
}
jSONArray.put(jSONObject);
C2787.m9317("rbPwd", jSONArray.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
if (!TextUtils.isEmpty(LoginActivity.this.f15107)) {
new Thread(new RunnableC5523()).run();
}
LoginActivity.this.m20631(loginBean.getData().id + "", loginBean.getData().nimtoken);
return;
}
LoginActivity.this.toast(loginBean.getMsg());
}
}
public class C5524 extends JsonCallback<BaseBean> {
public C5524() {
}
@Override
public void onError(Call call, Exception exc, int i) {
AbsNimLog.i(LoginActivity.f15040, "updateIconToServer fail, Exception =" + exc.toString());
}
@Override
public void onResponse(BaseBean baseBean) {
if (baseBean.getCode() == 0) {
AbsNimLog.i(LoginActivity.f15040, "更新头像到自己服务器 success");
} else {
AbsNimLog.i(LoginActivity.f15040, "更新头像到自己服务器 fail");
}
}
}
public class C5525 implements TextWatcher {
public C5525() {
}
@Override
public void afterTextChanged(Editable editable) {
if (TextUtils.isEmpty(editable)) {
LoginActivity.this.f15106.setBackgroundResource(R.drawable.login_new_btn);
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f15106.setTextColor(loginActivity.getResources().getColor(R.color.element_color));
} else {
LoginActivity.this.f15106.setBackgroundResource(R.drawable.login_new_btn_can_login);
LoginActivity loginActivity2 = LoginActivity.this;
loginActivity2.f15106.setTextColor(loginActivity2.getResources().getColor(R.color.white));
}
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
public class DatePickerDialogC5526 extends DatePickerDialog {
private int f15148;
private int f15149;
private int f15150;
private int f15151;
private int f15152;
public DatePickerDialogC5526(Context context, DatePickerDialog.OnDateSetListener onDateSetListener, int i, int i2, int i3) {
super(context, onDateSetListener, i, i2, i3);
this.f15152 = 2015;
this.f15150 = 1900;
this.f15149 = i;
this.f15148 = i2;
this.f15151 = i3;
}
@Override
public void onDateChanged(DatePicker datePicker, int i, int i2, int i3) {
int i4 = this.f15150;
if (i >= i4 && i <= this.f15152) {
this.f15149 = i;
this.f15148 = i2;
this.f15151 = i3;
return;
}
int i5 = this.f15149;
int i6 = this.f15152;
if (i5 > i6) {
this.f15149 = i6;
} else if (i5 < i4) {
this.f15149 = i4;
}
updateDate(this.f15149, this.f15148, this.f15151);
}
@Override
public void setTitle(CharSequence charSequence) {
super.setTitle("生 日");
}
public void m20640(int i) {
this.f15150 = i;
}
public void m20641(int i) {
this.f15152 = i;
}
}
public class ViewOnClickListenerC5527 implements View.OnClickListener {
public ViewOnClickListenerC5527() {
}
@Override
public void onClick(View view) {
LoginActivity.this.f15053.setText("");
LoginActivity.this.f15106.setBackgroundResource(R.drawable.login_new_btn);
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f15106.setTextColor(loginActivity.getResources().getColor(R.color.element_color));
LoginActivity.this.m20539();
}
}
public class C5528 extends FindListener<UrlsData> {
public C5528() {
}
@Override
public void done(List<UrlsData> list, BmobException bmobException) {
LoginActivity.this.hideProgressDialog();
if (bmobException == null) {
if (list.size() > 0) {
UrlsData urlsData = list.get(0);
String unused = LoginActivity.f15040;
String str = "done: " + urlsData.getName();
ArrayList arrayList = new ArrayList();
if (!TextUtils.isEmpty(urlsData.getUrl1())) {
arrayList.add(urlsData.getUrl1());
}
if (!TextUtils.isEmpty(urlsData.getUrl2())) {
arrayList.add(urlsData.getUrl2());
}
if (!TextUtils.isEmpty(urlsData.getUrl3())) {
arrayList.add(urlsData.getUrl3());
}
if (!TextUtils.isEmpty(urlsData.getUrl4())) {
arrayList.add(urlsData.getUrl4());
}
if (!TextUtils.isEmpty(urlsData.getUrl5())) {
arrayList.add(urlsData.getUrl5());
}
LoginActivity.this.f15080.clear();
String m9324 = C2787.m9324("mylines");
String str2 = "initDomains: " + m9324;
if (!TextUtils.isEmpty(m9324)) {
LoginActivity.this.f15080.addAll(JSON.parseArray(m9324, DomainBean.DataBean.class));
}
for (int i = 0; i < arrayList.size(); i++) {
DomainBean.DataBean dataBean = new DomainBean.DataBean();
dataBean.setUrl((String) arrayList.get(i));
dataBean.setId(i);
dataBean.setName("线路" + LoginActivity.this.f15080.size() + 1);
LoginActivity.this.f15080.add(dataBean);
}
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (DomainBean.DataBean dataBean2 : LoginActivity.this.f15080) {
linkedHashMap.put(dataBean2.url, dataBean2);
}
LoginActivity.this.f15080.clear();
Iterator it = linkedHashMap.keySet().iterator();
while (it.hasNext()) {
LoginActivity.this.f15080.add(linkedHashMap.get((String) it.next()));
}
LoginActivity.this.f15096.clear();
LoginActivity.this.f15088.clear();
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f15063 = 0;
Iterator<DomainBean.DataBean> it2 = loginActivity.f15080.iterator();
while (it2.hasNext()) {
LoginActivity.this.m20623(it2.next());
}
return;
}
LoginActivity.this.m20627();
return;
}
LoginActivity.this.m20627();
}
}
public class ViewOnClickListenerC5529 implements View.OnClickListener {
public ViewOnClickListenerC5529() {
}
@Override
public void onClick(View view) {
LoginActivity.this.m20567();
}
}
public class C5530 extends JsonCallback<BaseBean> {
public C5530() {
}
@Override
public void onError(Call call, Exception exc, int i) {
exc.toString();
LoginActivity.this.toast("微信注册异常:" + exc.toString());
}
@Override
public void onResponse(BaseBean baseBean) {
if (baseBean.getCode() == 0) {
LoginActivity.this.m20532();
} else {
LoginActivity.this.toast(baseBean.getMsg());
}
}
}
public class ViewOnClickListenerC5531 implements View.OnClickListener {
public ViewOnClickListenerC5531() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, (Class<?>) GetChildAc.getParentAc("SetHostActivity")));
}
}
public class C5532 implements Callback {
public class RunnableC5533 implements Runnable {
public final Response f15161;
public class RunnableC5534 implements Runnable {
public RunnableC5534() {
}
@Override
public void run() {
LoginActivity loginActivity = LoginActivity.this;
loginActivity.m20534(loginActivity.f15107);
}
}
public RunnableC5533(Response response) {
this.f15161 = response;
}
@Override
public void run() {
try {
LoginBean loginBean = (LoginBean) new Gson().fromJson(this.f15161.body().string(), LoginBean.class);
if (loginBean.getMsg().equals("openid_nothingness")) {
LoginActivity.this.m20537("");
return;
}
if (loginBean.getCode() == 0 && loginBean.getData() != null) {
boolean z = true;
if (loginBean.getData().issup != 1) {
z = false;
}
LogoutService.f14728 = z;
UIkitUserPreferences.saveToken(loginBean.getData().token);
C2787.m9333(loginBean.getData().account);
C2787.m9325(loginBean.getData().friendcover);
if (!TextUtils.isEmpty(LoginActivity.this.f15107)) {
new Thread(new RunnableC5534()).run();
}
LoginActivity.this.m20631(loginBean.getData().id + "", loginBean.getData().nimtoken);
return;
}
LoginActivity.this.toast(loginBean.getMsg());
} catch (Exception e) {
e.toString();
}
}
}
public C5532() {
}
@Override
public void onFailure(Call call, IOException iOException) {
iOException.toString();
}
@Override
public void onResponse(Call call, Response response) {
LoginActivity.this.f15066.post(new RunnableC5533(response));
}
}
public class ViewOnClickListenerC5535 implements View.OnClickListener {
public class C5536 implements AdapterView.OnItemClickListener {
public final AlertDialog f15165;
public final JSONArray f15166;
public C5536(JSONArray jSONArray, AlertDialog alertDialog) {
this.f15166 = jSONArray;
this.f15165 = alertDialog;
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
try {
LoginActivity.this.f15090.setText(this.f15166.getJSONObject(i).getString("account"));
LoginActivity.this.f15053.setText(this.f15166.getJSONObject(i).getString("pwd"));
this.f15165.dismiss();
} catch (JSONException e) {
e.printStackTrace();
}
}
}
public class C5537 extends BaseAdapter {
public final AlertDialog f15168;
public final CharSequence[] f15169;
public class ViewOnClickListenerC5538 implements View.OnClickListener {
public final int f15171;
public ViewOnClickListenerC5538(int i) {
this.f15171 = i;
}
@Override
public void onClick(View view) {
String m9324 = C2787.m9324("rbPwd");
if (TextUtils.isEmpty(m9324) || "{}".equals(m9324)) {
m9324 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
JSONArray jSONArray = null;
try {
jSONArray = new JSONArray(m9324);
} catch (Exception e) {
e.printStackTrace();
}
if (this.f15171 < jSONArray.length()) {
jSONArray.remove(this.f15171);
C2787.m9317("rbPwd", jSONArray.toString());
}
C5537.this.f15168.dismiss();
}
}
public C5537(CharSequence[] charSequenceArr, AlertDialog alertDialog) {
this.f15169 = charSequenceArr;
this.f15168 = alertDialog;
}
@Override
public int getCount() {
return this.f15169.length;
}
@Override
public Object getItem(int i) {
return this.f15169[i];
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int i, View view, ViewGroup viewGroup) {
View inflate = View.inflate(LoginActivity.this, R.layout.adapter_login_account_item, null);
((TextView) inflate.findViewById(R.id.name)).setText(this.f15169[i]);
inflate.findViewById(R.id.delete_btn).setOnClickListener(new ViewOnClickListenerC5538(i));
return inflate;
}
}
public ViewOnClickListenerC5535() {
}
@Override
public void onClick(View view) {
JSONArray jSONArray;
new ArrayList();
String m9324 = C2787.m9324("rbPwd");
if (TextUtils.isEmpty(m9324) || "{}".equals(m9324)) {
m9324 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
CharSequence[] charSequenceArr = new CharSequence[0];
JSONArray jSONArray2 = null;
try {
jSONArray = new JSONArray(m9324);
try {
charSequenceArr = new CharSequence[jSONArray.length()];
for (int i = 0; i < jSONArray.length(); i++) {
charSequenceArr[i] = jSONArray.getJSONObject(i).getString("account");
}
} catch (Exception e) {
e = e;
jSONArray2 = jSONArray;
e.printStackTrace();
jSONArray = jSONArray2;
if (jSONArray != null) {
return;
} else {
return;
}
}
} catch (Exception e2) {
e = e2;
}
if (jSONArray != null || jSONArray.length() == 0) {
return;
}
ListView listView = new ListView(LoginActivity.this);
AlertDialog create = new AlertDialog.Builder(LoginActivity.this).setTitle("请选择账号").setView(listView).create();
listView.setAdapter((ListAdapter) new C5537(charSequenceArr, create));
create.show();
listView.setOnItemClickListener(new C5536(jSONArray, create));
}
}
public class C5539 implements AdapterView.OnItemClickListener {
public class RunnableC5540 implements Runnable {
public RunnableC5540() {
}
@Override
public void run() {
Message obtain = Message.obtain();
obtain.what = 101;
LoginActivity.this.f15066.sendMessage(obtain);
}
}
public C5539() {
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
DomainBean.DataBean dataBean = (DomainBean.DataBean) LoginActivity.this.f15099.get(i);
if (dataBean != null) {
LoginActivity.this.f15103.m9166(i);
LoginActivity.this.f15103.notifyDataSetChanged();
C2787.m9329(dataBean.getUrl());
Host.setBaseUrl(dataBean.getUrl());
String str = "选择线路:" + dataBean.getName();
new Thread(new RunnableC5540()).start();
}
}
}
public class C5541 implements RequestCallback<LoginInfo> {
public final String f15174;
public final String f15175;
public C5541(String str, String str2) {
this.f15175 = str;
this.f15174 = str2;
}
@Override
public void onException(Throwable th) {
Toast.makeText(LoginActivity.this, R.string.login_exception, 1).show();
LoginActivity.this.m20611();
}
@Override
public void onFailed(int i) {
LoginActivity.this.m20611();
String unused = LoginActivity.f15040;
String str = "onFailed: " + i;
if (i != 302 && i != 404) {
Toast.makeText(LoginActivity.this, "登录失败: " + i, 0).show();
return;
}
Toast.makeText(LoginActivity.this, R.string.login_failed, 0).show();
}
@Override
public void onSuccess(LoginInfo loginInfo) {
AbsNimLog.i(LoginActivity.f15040, "login success");
LoginActivity.this.m20611();
C2824.m9462(this.f15175);
LoginActivity.this.m20612(this.f15175, this.f15174);
LoginActivity.this.m20606();
new C2815().m9435();
MainActivity.m20704(LoginActivity.this, null);
LoginActivity.this.finish();
}
}
public class ViewOnClickListenerC5542 implements View.OnClickListener {
public ViewOnClickListenerC5542() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, (Class<?>) GetChildAc.getParentAc("AgreementActivity")));
}
}
private void onParseIntent() {
String str;
if (getIntent().getBooleanExtra(f15039, false)) {
int kickedClientType = ((AuthService) NIMClient.getService(AuthService.class)).getKickedClientType();
if (kickedClientType != 4) {
if (kickedClientType == 16) {
str = "网页端";
} else if (kickedClientType == 32) {
str = "服务端";
} else if (kickedClientType != 64) {
str = "移动端";
}
EasyAlertDialogHelper.showOneButtonDiolag((Context) this, (CharSequence) getString(R.string.kickout_notify), (CharSequence) String.format(getString(R.string.kickout_content), str), (CharSequence) getString(R.string.ok), true, (View.OnClickListener) null);
}
str = "电脑端";
EasyAlertDialogHelper.showOneButtonDiolag((Context) this, (CharSequence) getString(R.string.kickout_notify), (CharSequence) String.format(getString(R.string.kickout_content), str), (CharSequence) getString(R.string.ok), true, (View.OnClickListener) null);
}
}
public static void start(Context context) {
m20550(context, false);
}
public void m20532() {
new OkHttpClient().newCall(new Request.Builder().url(Host.getApi_UserLogin()).post(new FormBody.Builder().add("type", BmobUser.BmobThirdUserAuth.SNS_TYPE_WEIXIN).add("account", C2824.m9458()).add("password", "").build()).build()).enqueue(new C5532());
}
private void m20533() {
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_Ismustmobile()).mo15984(hashMap).mo15987().m15968(new C5503());
}
public void m20534(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
File file = new File(str);
AbsNimLog.i(f15040, "start upload avatar, local file path=" + file.getAbsolutePath());
((NosService) NIMClient.getService(NosService.class)).upload(file, "image/jpeg").setCallback(new C5505());
}
public void m20537(String str) {
new OkHttpClient().newCall(new Request.Builder().url("https://api.weixin.qq.com/sns/userinfo?access_token=" + C2824.m9454() + "&openid=" + C2824.m9458()).build()).enqueue(new C5508(str));
}
private boolean m20538(String str) {
if (str.isEmpty()) {
toast("请输入账号");
return false;
}
if (!str.startsWith("1")) {
toast("请输入正确的手机号码");
return false;
}
if (str.length() == 11) {
return true;
}
toast("请输入正确的手机号码");
return false;
}
public void m20539() {
Resources resources;
int i;
Resources resources2;
int i2;
boolean z = !this.f15071;
this.f15071 = z;
m20609(!z);
TextView textView = this.f15070;
if (this.f15071) {
resources = getResources();
i = R.string.register_welcome;
} else {
resources = getResources();
i = R.string.login_welcome;
}
textView.setText(resources.getText(i));
if (this.f15105) {
this.f15049.setVisibility(!this.f15071 ? 0 : 8);
}
if (this.f15071 && !this.f15074) {
this.f15085 = (ClearableEditTextWithIcon) findView(R.id.edit_register_nickname);
this.f15102 = (ClearableEditTextWithIcon) findView(R.id.edit_register_password);
this.f15084 = (ClearableEditTextWithIcon) findView(R.id.edit_register_invite_code);
this.f15098 = (TextView) findView(R.id.tv_code);
this.f15058 = (ClearableEditTextWithIcon) findView(R.id.edit_code);
this.f15078.setIconResource(R.drawable.user_account_icon);
ClearableEditTextWithIcon clearableEditTextWithIcon = this.f15058;
int i3 = R.drawable.icon_yanzhengma;
clearableEditTextWithIcon.setIconResource(i3);
this.f15085.setIconResource(R.drawable.nick_name_icon);
ClearableEditTextWithIcon clearableEditTextWithIcon2 = this.f15085;
if (AppConstant.NICKNAME_TYPE) {
resources2 = getResources();
i2 = R.string.input_nickname;
} else {
resources2 = getResources();
i2 = R.string.input_nickname_zh;
}
clearableEditTextWithIcon2.setHint(resources2.getString(i2));
this.f15102.setIconResource(R.drawable.user_pwd_lock_icon);
this.f15084.setIconResource(i3);
this.f15078.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20)});
this.f15085.setFilters(AppConstant.NICKNAME_TYPE ? new InputFilter[]{new InputFilter.LengthFilter(10)} : new InputFilter[]{new C5501(), new InputFilter.LengthFilter(10)});
this.f15102.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20)});
this.f15084.setFilters(new InputFilter[]{new InputFilter.LengthFilter(6)});
this.f15074 = true;
}
if (this.f15071) {
this.f15106.setTextColor(-1);
int i4 = R.id.logo;
if (findViewById(i4) != null) {
findViewById(i4).setVisibility(8);
}
this.f15106.setBackgroundResource(R.drawable.login_new_btn_can_login);
} else {
int i5 = R.id.logo;
if (findViewById(i5) != null) {
findViewById(i5).setVisibility(0);
}
}
this.f15098.setOnClickListener(new ViewOnClickListenerC5529());
this.f15106.setText(this.f15071 ? R.string.register : R.string.login);
this.f15073.setVisibility(this.f15071 ? 8 : 0);
this.f15087.setVisibility(this.f15071 ? 0 : 8);
this.f15100.setText(this.f15071 ? R.string.login_has_account : R.string.register_btn);
}
public void m20540() {
if (this.f15096.size() == this.f15080.size()) {
hideProgressDialog();
if (this.f15088.size() > 0) {
int i = this.f15056;
if (i != 0 && i != 1) {
Host.setBaseUrl(this.f15088.get(0).getUrl());
ToastHelper.showToast(getApplicationContext(), "网络正在连接中~已自动选择云端线路,请重新点击注册!");
return;
} else {
Host.setBaseUrl(this.f15088.get(0).getUrl());
ToastHelper.showToast(getApplicationContext(), "网络正在连接中~已自动选择优质线路,请重新点击注册!");
return;
}
}
int i2 = this.f15056;
if (i2 != 0 && i2 != 1) {
m20627();
} else {
m20629();
}
}
}
public void m20545(File file, File file2) {
FileOutputStream fileOutputStream;
FileInputStream fileInputStream = null;
try {
try {
FileInputStream fileInputStream2 = new FileInputStream(file);
try {
fileOutputStream = new FileOutputStream(file2);
try {
byte[] bArr = new byte[1024];
while (fileInputStream2.read(bArr) > 0) {
fileOutputStream.write(bArr);
}
fileInputStream2.close();
fileOutputStream.close();
} catch (Exception e) {
e = e;
fileInputStream = fileInputStream2;
try {
e.printStackTrace();
if (fileInputStream != null) {
fileInputStream.close();
}
if (fileOutputStream != null) {
fileOutputStream.close();
}
} catch (Throwable th) {
th = th;
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (IOException e2) {
e2.printStackTrace();
throw th;
}
}
if (fileOutputStream != null) {
fileOutputStream.close();
}
throw th;
}
} catch (Throwable th2) {
th = th2;
fileInputStream = fileInputStream2;
if (fileInputStream != null) {
}
if (fileOutputStream != null) {
}
throw th;
}
} catch (Exception e3) {
e = e3;
fileOutputStream = null;
} catch (Throwable th3) {
th = th3;
fileOutputStream = null;
}
} catch (IOException e4) {
e4.printStackTrace();
}
} catch (Exception e5) {
e = e5;
fileOutputStream = null;
} catch (Throwable th4) {
th = th4;
fileOutputStream = null;
}
}
public static void m20550(Context context, boolean z) {
Intent intent = new Intent(context, (Class<?>) GetChildAc.getParentAc("LoginActivity"));
intent.addFlags(603979776);
intent.putExtra(f15039, z);
context.startActivity(intent);
}
public void m20552() {
String obj = this.f15090.getText().toString();
String obj2 = this.f15053.getText().toString();
if (TextUtils.isEmpty(obj)) {
toast("请输入账号");
return;
}
if (TextUtils.isEmpty(obj2)) {
toast("请输入密码");
return;
}
DialogMaker.showProgressDialog(this, null, getString(R.string.logining), true, new DialogInterfaceOnCancelListenerC5519()).setCanceledOnTouchOutside(false);
Host.getApi_UserLogin();
HashMap hashMap = new HashMap();
hashMap.put("account", obj);
hashMap.put("password", obj2);
hashMap.put("os", "android");
hashMap.put("deviceNo", C2824.m9463());
if (!TextUtils.isEmpty(this.f15054)) {
hashMap.put("ip", this.f15054);
}
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_UserLogin()).mo15984(hashMap).mo15987().m15968(new C5522(obj, obj2));
}
private void m20555(View view) {
PopupWindow popupWindow = new PopupWindow(view, (int) getResources().getDimension(R.dimen.dp_290), (int) getResources().getDimension(R.dimen.dp_300));
this.f15052 = popupWindow;
popupWindow.setContentView(view);
this.f15052.setOutsideTouchable(true);
this.f15052.setFocusable(true);
this.f15052.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.transparent)));
m20634(0.5f);
this.f15052.setOnDismissListener(new C5516());
this.f15066.post(new RunnableC5511(view));
}
private void m20558() {
this.f15089 = (ConstraintLayout) findViewById(R.id.user_info);
this.f15079 = (AppCompatSpinner) findViewById(R.id.user_info_sex);
this.f15077 = (CheckBox) findView(R.id.cb_pwd);
this.f15079.setOnItemSelectedListener(new C5520());
TextView textView = (TextView) findViewById(R.id.user_info_date);
this.f15064 = textView;
textView.setOnClickListener(this);
this.f15076 = (ConstraintLayout) findViewById(R.id.lin_forget_answer);
this.f15092 = (ClearableEditTextWithIcon) findViewById(R.id.edit_forget_answer);
this.f15055 = (ConstraintLayout) findViewById(R.id.lin_forget_question);
this.f15057 = (EditText) findViewById(R.id.edit_forget_question);
TextView textView2 = (TextView) findViewById(R.id.register_select_question);
this.f15044 = textView2;
textView2.setOnClickListener(this);
this.f15050 = (TextView) findViewById(R.id.login_bottom_version);
this.f15051 = (TextView) findViewById(R.id.login_bottom_changedemon);
CircleView circleView = (CircleView) findViewById(R.id.register_head);
this.f15104 = circleView;
circleView.setOnClickListener(this);
this.f15070 = (TextView) findView(R.id.login_welcome_tip);
this.f15047 = (TextView) findViewById(R.id.login_bottom_tip);
this.f15043 = (ConstraintLayout) findViewById(R.id.login_channel_layout);
ImageView imageView = (ImageView) findViewById(R.id.login_channel_wx);
this.f15094 = imageView;
imageView.setOnClickListener(this);
this.f15051.setOnClickListener(this);
this.f15050.setText("V" + C2824.m9449(C2824.m9461()));
findView(R.id.more_account).setOnClickListener(new ViewOnClickListenerC5535());
m20581();
}
private void m20564() {
if (Build.VERSION.SDK_INT >= 26) {
startForegroundService(new Intent(this, (Class<?>) PhoneIntercepterService.class));
} else {
startService(new Intent(this, (Class<?>) PhoneIntercepterService.class));
}
}
public void m20567() {
String obj = this.f15078.getText().toString();
if (m20538(obj)) {
HashMap hashMap = new HashMap();
hashMap.put("mobile", obj);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_SendCode()).mo15984(hashMap).mo15987().m15968(new C5504());
}
}
public static boolean m20569(char c) {
Character.UnicodeBlock of = Character.UnicodeBlock.of(c);
return of == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS || of == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS || of == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || of == Character.UnicodeBlock.GENERAL_PUNCTUATION || of == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION || of == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS;
}
private void m20570() {
}
public void m20571(String str, File file, String str2) {
HashMap hashMap = new HashMap();
hashMap.put("type", BmobUser.BmobThirdUserAuth.SNS_TYPE_WEIXIN);
hashMap.put("openid", C2824.m9458());
hashMap.put("nickname", str);
hashMap.put("invitecode", str2);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_UserRegister()).mo15984(hashMap).m15986("image", System.currentTimeMillis() + ".jpg", file).mo15987().m15968(new C5530());
}
public void m20574(String str) {
HashMap hashMap = new HashMap();
hashMap.put(RemoteMessageConst.Notification.ICON, str);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_UserEdit()).mo15984(hashMap).mo15987().m15968(new C5524());
}
public void m20579() {
if (this.f15071 && this.f15074 && m20626()) {
if (!NetworkUtil.isNetAvailable(this)) {
Toast.makeText(this, R.string.network_is_not_available, 0).show();
return;
}
if (this.f15105 && TextUtils.isEmpty(this.f15092.getText().toString())) {
Toast.makeText(this, "请填写密保答案!", 0).show();
return;
}
DialogMaker.showProgressDialog(this, getString(R.string.registering), false);
String obj = this.f15078.getText().toString();
String obj2 = this.f15085.getText().toString();
String obj3 = this.f15102.getText().toString();
String obj4 = this.f15084.getText().toString();
this.f15101 = this.f15058.getText().toString();
HashMap hashMap = new HashMap();
hashMap.put("account", obj);
hashMap.put("password", obj3);
hashMap.put("nickname", obj2);
hashMap.put("invitecode", obj4);
if (!TextUtils.isEmpty(this.f15054)) {
hashMap.put("ip", this.f15054);
}
hashMap.put("deviceNo", C2824.m9463());
hashMap.put("mobilecode", this.f15101);
hashMap.put("question", this.f15057.getText().toString());
hashMap.put("answer", this.f15092.getText().toString());
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4252 mo15984 = C4282.m16036().m16001(Host.getApi_UserRegister()).mo15984(hashMap);
if (this.f15046 != null) {
mo15984.m15986("image", obj + ".jpg", this.f15046);
} else if (this.f15045) {
ToastHelper.showToast(this, "请上传头像!");
hideProgressDialog();
return;
}
mo15984.mo15987().m15968(new C5502(obj, obj3));
}
}
private void m20581() {
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
OkUtil.getInstance().post(Host.getApi_AppSetting(), hashMap, AppSettingBean.class, new C5518());
}
private void m20585() {
MPermission.with(this).setRequestCode(110).permissions(this.f15059).request();
}
private void m20586() {
this.f15073 = findView(R.id.login_layout);
this.f15087 = findView(R.id.register_layout);
this.f15061 = (ConstraintLayout) findViewById(R.id.re_code);
this.f15078 = (ClearableEditTextWithIcon) findView(R.id.edit_register_account);
ConstraintLayout constraintLayout = (ConstraintLayout) findViewById(R.id.lin_invite_code);
if (C2824.m9459().isDefaultShowInviteCode()) {
constraintLayout.setVisibility(0);
} else {
constraintLayout.setVisibility(8);
}
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_Ismustmobile()).mo15984(hashMap).mo15987().m15968(new C5512(constraintLayout));
TextView textView = (TextView) findView(R.id.register_login_tip);
this.f15100 = textView;
if (!AppConstant.SHOW_REGISTER) {
textView.setVisibility(8);
}
this.f15100.setOnClickListener(new ViewOnClickListenerC5527());
}
private void m20589() {
this.f15090 = (EditText) findView(R.id.edit_login_account);
this.f15053 = (EditText) findView(R.id.edit_login_password);
((CheckBox) findView(R.id.che_box)).setChecked(true);
TextView textView = (TextView) findView(R.id.tv_shouming);
this.f15097 = textView;
textView.setOnClickListener(new ViewOnClickListenerC5542());
TextView textView2 = (TextView) findView(R.id.register_pwd_tip);
this.f15049 = textView2;
textView2.setOnClickListener(new ViewOnClickListenerC5507());
this.f15106 = (Button) findView(R.id.bt_commit);
this.f15053.addTextChangedListener(new C5525());
this.f15090.setFilters(new InputFilter[]{new InputFilter.LengthFilter(32)});
this.f15053.setFilters(new InputFilter[]{new InputFilter.LengthFilter(32)});
this.f15053.setOnKeyListener(this);
this.f15106.setOnClickListener(new ViewOnClickListenerC5521());
}
private void m20595() {
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_UserCanRegister()).mo15984(hashMap).mo15987().m15968(new C5498());
}
private void m20597() {
String obj = this.f15078.getText().toString();
if (m20538(obj)) {
HashMap hashMap = new HashMap();
hashMap.put("mobile", obj);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_OtherSendCode()).mo15984(hashMap).mo15987().m15968(new C5515());
}
}
private void m20604(Context context) {
View inflate = LayoutInflater.from(context).inflate(R.layout.login_changdomain_layout_dialog, (ViewGroup) getWindow().getDecorView().findViewById(android.R.id.content), false);
m20555(inflate);
this.f15072 = (ListView) inflate.findViewById(R.id.domain_listview);
C2739 c2739 = new C2739(this, this.f15099);
this.f15103 = c2739;
this.f15072.setAdapter((ListAdapter) c2739);
inflate.findViewById(R.id.self).setOnClickListener(new ViewOnClickListenerC5531());
this.f15072.setOnItemClickListener(new C5539());
inflate.findViewById(R.id.iv_popup_close).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
LoginActivity.this.m20632(view);
}
});
}
public void m20606() {
NIMClient.toggleNotification(C2786.m9297());
StatusBarNotificationConfig m9281 = C2786.m9281();
if (m9281 == null) {
m9281 = C2824.m9453();
C2786.m9286(m9281);
}
NIMClient.updateStatusBarNotificationConfig(m9281);
}
private void m20609(boolean z) {
if (this.f15083) {
this.f15043.setVisibility(z ? 0 : 4);
}
}
public void m20611() {
this.f15069 = null;
DialogMaker.dismissProgressDialog();
}
public void m20612(String str, String str2) {
C2787.m9321(str);
C2787.m9316(str2);
}
private void m20614(TextView textView) {
textView.addOnLayoutChangeListener(new ViewOnLayoutChangeListenerC5514(textView));
}
public void m20617() {
HashMap hashMap = new HashMap();
hashMap.put("rand", "1");
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C2824.m9449(C2824.m9461()));
SignUtil.genParams(hashMap);
C4282.m16036().m16001(Host.getApi_WalletQuestionList()).mo15984(hashMap).mo15987().m15968(new C5513());
}
public void m20632(View view) {
this.f15052.dismiss();
}
public void m20623(DomainBean.DataBean dataBean) {
long currentTimeMillis = System.currentTimeMillis();
C4282.m16036().m16001(dataBean.getUrl() + "/api").mo15987().m15968(new C5510(dataBean, currentTimeMillis));
}
private boolean m20626() {
if (this.f15071 && this.f15074) {
String trim = this.f15078.getText().toString().trim();
if (this.f15061.getVisibility() == 0) {
if (trim.length() != 11) {
Toast.makeText(this, "请输入正确的手机号", 0).show();
}
} else if (trim.length() <= 0 || trim.length() > 20) {
if (C2824.m9459().isUserphoneHint()) {
if (trim.length() != 11) {
Toast.makeText(this, "请输入正确的手机号", 0).show();
return false;
}
} else {
Toast.makeText(this, R.string.register_account_tip, 0).show();
}
}
String trim2 = this.f15085.getText().toString().trim();
if (trim2.length() > 0 && trim2.length() <= 10) {
String trim3 = this.f15102.getText().toString().trim();
if (trim3.length() >= 6 && trim3.length() <= 20) {
if (trim.equals(trim3)) {
Toast.makeText(this, "账号和密码不可相同,请重新输入密码", 0).show();
this.f15102.setText("");
return false;
}
if (trim3.length() >= 8 && m20630(trim3)) {
return true;
}
Toast.makeText(this, "密码过于简单:请输入至少8位字符,且必须包含英文字母", 0).show();
return false;
}
Toast.makeText(this, R.string.register_password_tip, 0).show();
return false;
}
Toast.makeText(this, R.string.register_nick_name_tip, 0).show();
return false;
}
return false;
}
@Override
public boolean displayHomeAsUpEnabled() {
return false;
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i2 == -1 && i == this.f15060) {
String stringExtra = intent.getStringExtra(Extras.EXTRA_FILE_PATH);
this.f15107 = stringExtra;
ComponentCallbacks2C3781.m13432(this).mo13418(stringExtra).m13470(this.f15104);
this.f15046 = new File(stringExtra);
}
}
@OnMPermissionDenied(110)
@OnMPermissionNeverAskAgain(110)
public void onBasicPermissionFailed() {
Toast.makeText(this, "授权失败", 0).show();
}
@OnMPermissionGranted(110)
public void onBasicPermissionSuccess() {
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id == R.id.register_select_question) {
CustomAlertDialog customAlertDialog = new CustomAlertDialog(this);
customAlertDialog.setTitle("选择问题");
for (WalletQuestionBean.Question question : this.f15041) {
customAlertDialog.addItem(question.question, new C5499(question));
}
customAlertDialog.show();
return;
}
if (id == R.id.register_head) {
PickImageHelper.PickImageOption pickImageOption = new PickImageHelper.PickImageOption();
pickImageOption.titleResId = R.string.set_head_image;
pickImageOption.crop = true;
pickImageOption.multiSelect = false;
pickImageOption.cropOutputImageWidth = 720;
pickImageOption.cropOutputImageHeight = 720;
PickImageHelper.pickImage(this, this.f15060, pickImageOption);
return;
}
if (id == R.id.login_channel_wx) {
return;
}
if (id == R.id.user_info_date) {
new DatePickerDialogC5526(this, new C5509(), this.f15095, this.f15075, this.f15067).show();
} else if (id == R.id.login_bottom_changedemon) {
startActivity(new Intent(this, (Class<?>) GetChildAc.getParentAc("HostActivity")));
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (C2824.m9459().getVipState() == 3) {
setContentView(R.layout.login_activity_new1);
} else {
setContentView(R.layout.login_activity_new);
}
m20558();
NimToolBarOptions nimToolBarOptions = new NimToolBarOptions();
nimToolBarOptions.isNeedNavigate = false;
setToolBar(R.id.toolbar, nimToolBarOptions);
m20585();
m20564();
onParseIntent();
m20589();
String m9324 = C2787.m9324("rbPwd");
if (TextUtils.isEmpty(m9324) || "{}".equals(m9324)) {
m9324 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
try {
JSONArray jSONArray = new JSONArray(m9324);
if (jSONArray.length() > 0) {
JSONObject jSONObject = jSONArray.getJSONObject(jSONArray.length() - 1);
this.f15090.setText(jSONObject.getString("account"));
this.f15053.setText(jSONObject.getString("pwd"));
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public boolean onKey(View view, int i, KeyEvent keyEvent) {
return false;
}
@Override
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
MPermission.onRequestPermissionsResult(this, i, strArr, iArr);
}
@Override
public void onResume() {
if (C2824.m9458() != null) {
m20532();
}
m20586();
m20595();
m20633();
super.onResume();
}
public void m20627() {
ToastHelper.showToast(getApplicationContext(), "线路不可用,请联系客服自定义线路");
startActivity(new Intent(this, (Class<?>) GetChildAc.getParentAc("SetHostActivity")));
}
public void m20628() {
this.f15056++;
String m9324 = C2787.m9324("mylines");
if (!TextUtils.isEmpty(m9324)) {
this.f15080 = JSON.parseArray(m9324, DomainBean.DataBean.class);
} else {
this.f15080 = new ArrayList();
}
DomainBean.DataBean dataBean = new DomainBean.DataBean();
dataBean.setUrl(C2824.m9459().getUrl1());
dataBean.setId(0);
dataBean.setName("线路" + this.f15080.size() + 1);
this.f15080.add(dataBean);
DomainBean.DataBean dataBean2 = new DomainBean.DataBean();
dataBean2.setUrl(C2824.m9459().getUrl2());
dataBean2.setId(1);
dataBean2.setName("线路" + this.f15080.size() + 1);
this.f15080.add(dataBean2);
HashMap hashMap = new HashMap();
for (DomainBean.DataBean dataBean3 : this.f15080) {
hashMap.put(dataBean3.url, dataBean3);
}
this.f15080.clear();
showProgressDialog("正在选择线路");
Iterator<DomainBean.DataBean> it = this.f15080.iterator();
while (it.hasNext()) {
m20623(it.next());
}
}
public void m20629() {
showProgressDialog("正在选择线路");
Bmob.resetDomain(C2824.m9459().getBmobUrl());
Bmob.initialize(this, "0d4826087d31755748c767515c367b99");
BmobQuery bmobQuery = new BmobQuery();
bmobQuery.addWhereEqualTo(ElementTag.ELEMENT_ATTRIBUTE_NAME, getApplication().getString(R.string.app_name));
bmobQuery.findObjects(new C5528());
}
public boolean m20630(String str) {
return Pattern.compile(".*[a-zA-Z]+.*").matcher(str).matches();
}
public void m20631(String str, String str2) {
this.f15069 = NimUIKit.login(new LoginInfo(str, str2, C2787.m9327("appkey", C2824.m9459().getS1_key())), new C5541(str, str2));
}
public void m20633() {
C4282.m16036().m16001("http://ip-api.com/json/?lang=zh-CN").mo15987().m15968(new C5517());
}
public void m20634(float f) {
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.alpha = f;
getWindow().setAttributes(attributes);
}
}