新浪彩票 v0.96.37版本的 MD5 值为:0c7ddce345383506e2959f5d75bdceab
以下内容为反编译后的 LoginActivity.java 源代码,内容仅作参考
package com.ddtx.dingdatacontact.login;
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 ewUlBWKNoApzb1Mnhgn4.Hs3z8m4Zk5vN3zlf3ycP.tuTnrQl15gwcjciRsKuT.yDr5rnM22EGc6cSogojL.C3550;
import ewUlBWKNoApzb1Mnhgn4.ZB1GY7mGzn6rcZDnMVLb.tuTnrQl15gwcjciRsKuT.O6AgNJgW1GmSRcLCckPu.C4285;
import ewUlBWKNoApzb1Mnhgn4.ewUlBWKNoApzb1Mnhgn4.tuTnrQl15gwcjciRsKuT.ComponentCallbacks2C5000;
import ewUlBWKNoApzb1Mnhgn4.mXy7FBJCajJRBJyciqmM.tuTnrQl15gwcjciRsKuT.tuTnrQl15gwcjciRsKuT.C5062;
import ewUlBWKNoApzb1Mnhgn4.mXy7FBJCajJRBJyciqmM.tuTnrQl15gwcjciRsKuT.tuTnrQl15gwcjciRsKuT.KlgmonqYEVGwVbC7c3S9.AbstractC5012;
import ewUlBWKNoApzb1Mnhgn4.mXy7FBJCajJRBJyciqmM.tuTnrQl15gwcjciRsKuT.tuTnrQl15gwcjciRsKuT.ewUlBWKNoApzb1Mnhgn4.C5030;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.C5783;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.QCGQE3Aw696p2Q2RLOtT.ewUlBWKNoApzb1Mnhgn4.C5614;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.Uqo9k3Yc5Xgyg6qHnvMd.C5658;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.Uqo9k3Yc5Xgyg6qHnvMd.CountDownTimerC5654;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.Uqo9k3Yc5Xgyg6qHnvMd.fjeHQIhsQoSF9ZoGrsls.C5633;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.Uqo9k3Yc5Xgyg6qHnvMd.fjeHQIhsQoSF9ZoGrsls.C5634;
import ewUlBWKNoApzb1Mnhgn4.ykCxyCDhWxmlZosXV5ip.tuTnrQl15gwcjciRsKuT.ZB1GY7mGzn6rcZDnMVLb.O6AgNJgW1GmSRcLCckPu.C5677;
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.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 v4rqru3PdyhrqRZkuHAG.u1YzWeLnRZsoxmkTYWkw.Uqo9k3Yc5Xgyg6qHnvMd.C7307;
import v4rqru3PdyhrqRZkuHAG.v4rqru3PdyhrqRZkuHAG.InterfaceC7662;
public class LoginActivity extends UI implements View.OnKeyListener, View.OnClickListener {
private static final String f10264 = LoginActivity.class.getSimpleName();
private static final String f10265 = "KICK_OUT";
private TextView f10266;
public Button f10268;
private ImageView f10271;
private TextView f10272;
private ClearableEditTextWithIcon f10273;
private File f10277;
private String f10278;
public ConstraintLayout f10279;
private ClearableEditTextWithIcon f10280;
private TextView f10282;
private ConstraintLayout f10283;
private View f10284;
private ClearableEditTextWithIcon f10285;
private TextView f10286;
private PopupWindow f10288;
private boolean f10289;
private ClearableEditTextWithIcon f10292;
private ConstraintLayout f10293;
private ClearableEditTextWithIcon f10296;
private int f10297;
private C5677 f10300;
private View f10301;
private CheckBox f10302;
private boolean f10303;
private TextView f10305;
private EditText f10306;
private String f10307;
private AppCompatSpinner f10310;
private int f10311;
private CircleView f10313;
private ClearableEditTextWithIcon f10314;
private AbortableFuture<LoginInfo> f10315;
private TextView f10316;
private boolean f10319;
private EditText f10321;
private EditText f10322;
private TextView f10325;
private TextView f10326;
private ConstraintLayout f10327;
private TextView f10328;
public List<WalletQuestionBean.Question> f10329;
private ConstraintLayout f10330;
private ListView f10331;
private TextView f10332;
private int f10312 = C7307.f25613;
private final int f10281 = 0;
private final int f10274 = 1;
private final int f10276 = 110;
private boolean f10323 = false;
private boolean f10299 = false;
private boolean f10320 = true;
private boolean f10318 = true;
public Handler f10295 = new Handler(new C2891());
private String f10317 = "";
private final String[] f10304 = {"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 f10275 = "";
private List<DomainBean.DataBean> f10294 = new ArrayList();
public String f10291 = "";
public int f10308 = 0;
private int f10287 = 1990;
private int f10269 = 10;
private int f10270 = 10;
public List<DomainBean.DataBean> f10324 = new ArrayList();
public List<DomainBean.DataBean> f10290 = new ArrayList();
public List<DomainBean.DataBean> f10309 = new ArrayList();
public int f10298 = 0;
private int f10267 = 0;
public class C2889 extends JsonCallback<BaseBean> {
public C2889() {
}
@Override
public void onError(Call call, Exception exc, int i) {
exc.toString();
LoginActivity loginActivity = LoginActivity.this;
loginActivity.toast("微信注册异常:" + exc.toString());
}
@Override
public void onResponse(BaseBean baseBean) {
if (baseBean.getCode() == 0) {
LoginActivity.this.m13349();
} else {
LoginActivity.this.toast(baseBean.getMsg());
}
}
}
public class C2890 implements AdapterView.OnItemSelectedListener {
public C2890() {
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long j) {
LoginActivity.this.f10311 = i;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
}
public class C2891 implements Handler.Callback {
public C2891() {
}
@Override
public boolean handleMessage(@InterfaceC7662 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.f10320) {
boolean unused = LoginActivity.this.f10318;
}
}
return false;
}
}
public class View$OnLayoutChangeListenerC2892 implements View.OnLayoutChangeListener {
public final TextView f10336;
public View$OnLayoutChangeListenerC2892(TextView textView) {
this.f10336 = 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.f10336.getPaint().measureText(this.f10336.getText().toString());
float textSize = this.f10336.getTextSize();
if (measureText == width || this.f10336.getLineCount() <= 1) {
return;
}
this.f10336.setTextSize(0, (width * textSize) / measureText);
}
}
public class C2893 extends JsonCallback<BaseBean> {
public C2893() {
}
@Override
public void onError(Call call, Exception exc, int i) {
}
@Override
public void onResponse(BaseBean baseBean) {
if (baseBean.getCode() == 0) {
LoginActivity.this.toast("发送成功");
new CountDownTimerC5654(60L, 1L, LoginActivity.this.f10282, "重新发送").start();
}
}
}
public class C2894 implements RequestCallback<LoginInfo> {
public final String f10339;
public final String f10340;
public C2894(String str, String str2) {
this.f10339 = str;
this.f10340 = str2;
}
@Override
public void onException(Throwable th) {
Toast.makeText(LoginActivity.this, R.string.login_exception, 1).show();
LoginActivity.this.m13295();
}
@Override
public void onFailed(int i) {
LoginActivity.this.m13295();
String unused = LoginActivity.f10264;
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.f10264, "login success");
LoginActivity.this.m13295();
C5783.m24967(this.f10339);
LoginActivity.this.m13299(this.f10339, this.f10340);
LoginActivity.this.m13335();
new C5658().m24712();
MainActivity.m13413(LoginActivity.this, null);
LoginActivity.this.finish();
}
}
public class C2895 extends JsonCallback<IsmustmobileBean> {
public C2895() {
}
@Override
public void onResponse(IsmustmobileBean ismustmobileBean) {
ismustmobileBean.getData().getIsmustmobile();
}
}
public class C2896 extends RequestCallbackWrapper<String> {
public class C2897 extends RequestCallbackWrapper<Void> {
public final String f10344;
public C2897(String str) {
this.f10344 = str;
}
@Override
public void onResult(int i, Void r3, Throwable th) {
if (i == 200) {
String str = LoginActivity.f10264;
AbsNimLog.i(str, "upload avatar to 云信服务端 成功, url =" + this.f10344);
return;
}
String str2 = LoginActivity.f10264;
AbsNimLog.i(str2, "upload avatar to 云信服务端 失败, code =" + i);
}
}
public C2896() {
}
@Override
public void onResult(int i, String str, Throwable th) {
if (i != 200 || TextUtils.isEmpty(str)) {
String str2 = LoginActivity.f10264;
AbsNimLog.i(str2, "upload avatar fail, code =" + i);
return;
}
String str3 = LoginActivity.f10264;
AbsNimLog.i(str3, "upload avatar success, url =" + str);
C5614.m24556(UserInfoFieldEnum.AVATAR, str, new C2897(str));
LoginActivity.this.m13333(str);
}
}
public class C2898 extends FindListener<UrlsData> {
public C2898() {
}
@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.f10264;
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.f10324.clear();
String m24604 = C5633.m24604("mylines");
String str2 = "initDomains: " + m24604;
if (!TextUtils.isEmpty(m24604)) {
LoginActivity.this.f10324.addAll(JSON.parseArray(m24604, 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.f10324.size() + 1);
LoginActivity.this.f10324.add(dataBean);
}
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (DomainBean.DataBean dataBean2 : LoginActivity.this.f10324) {
linkedHashMap.put(dataBean2.url, dataBean2);
}
LoginActivity.this.f10324.clear();
for (String str3 : linkedHashMap.keySet()) {
LoginActivity.this.f10324.add(linkedHashMap.get(str3));
}
LoginActivity.this.f10290.clear();
LoginActivity.this.f10309.clear();
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f10298 = 0;
for (DomainBean.DataBean dataBean3 : loginActivity.f10324) {
LoginActivity.this.m13329(dataBean3);
}
return;
}
LoginActivity.this.m13355();
return;
}
LoginActivity.this.m13355();
}
}
public class C2899 extends AbstractC5012 {
public C2899() {
}
@Override
public void onError(Call call, Exception exc, int i) {
}
@Override
public void onResponse(String str, int i) {
try {
if (new JSONObject(str).getInt(C3550.f13679) != 0) {
LoginActivity.this.f10272.setVisibility(8);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
}
public class C2900 implements CustomAlertDialog.onSeparateItemClickListener {
public final WalletQuestionBean.Question f10348;
public C2900(WalletQuestionBean.Question question) {
this.f10348 = question;
}
@Override
public void onClick() {
LoginActivity.this.f10306.setText(this.f10348.question);
}
}
public class View$OnClickListenerC2901 implements View.OnClickListener {
public class C2902 extends BaseAdapter {
public final CharSequence[] f10352;
public final AlertDialog f10353;
public class View$OnClickListenerC2903 implements View.OnClickListener {
public final int f10354;
public View$OnClickListenerC2903(int i) {
this.f10354 = i;
}
@Override
public void onClick(View view) {
String m24604 = C5633.m24604("rbPwd");
if (TextUtils.isEmpty(m24604) || "{}".equals(m24604)) {
m24604 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
JSONArray jSONArray = null;
try {
jSONArray = new JSONArray(m24604);
} catch (Exception e) {
e.printStackTrace();
}
if (this.f10354 < jSONArray.length()) {
jSONArray.remove(this.f10354);
C5633.m24603("rbPwd", jSONArray.toString());
}
C2902.this.f10353.dismiss();
}
}
public C2902(CharSequence[] charSequenceArr, AlertDialog alertDialog) {
this.f10352 = charSequenceArr;
this.f10353 = alertDialog;
}
@Override
public int getCount() {
return this.f10352.length;
}
@Override
public Object getItem(int i) {
return this.f10352[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.f10352[i]);
inflate.findViewById(R.id.delete_btn).setOnClickListener(new View$OnClickListenerC2903(i));
return inflate;
}
}
public class C2904 implements AdapterView.OnItemClickListener {
public final JSONArray f10357;
public final AlertDialog f10358;
public C2904(JSONArray jSONArray, AlertDialog alertDialog) {
this.f10357 = jSONArray;
this.f10358 = alertDialog;
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
try {
LoginActivity.this.f10322.setText(this.f10357.getJSONObject(i).getString("account"));
LoginActivity.this.f10321.setText(this.f10357.getJSONObject(i).getString("pwd"));
this.f10358.dismiss();
} catch (JSONException e) {
e.printStackTrace();
}
}
}
public View$OnClickListenerC2901() {
}
@Override
public void onClick(View view) {
JSONArray jSONArray;
new ArrayList();
String m24604 = C5633.m24604("rbPwd");
if (TextUtils.isEmpty(m24604) || "{}".equals(m24604)) {
m24604 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
CharSequence[] charSequenceArr = new CharSequence[0];
JSONArray jSONArray2 = null;
try {
jSONArray = new JSONArray(m24604);
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;
}
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 C2902(charSequenceArr, create));
create.show();
listView.setOnItemClickListener(new C2904(jSONArray, create));
}
}
public class C2905 implements Callback {
public final String f10359;
public C2905(String str) {
this.f10359 = 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(), (Class<Object>) WxInfoBean.class);
LoginActivity.this.f10311 = wxInfoBean.getSex();
LoginActivity.this.f10317 = "1990-01-01";
File file = ComponentCallbacks2C5000.m22385(LoginActivity.this).mo22293(wxInfoBean.getHeadimgurl()).m22365(500, 500).get();
LoginActivity.this.m13347(file, new File(LoginActivity.this.getExternalFilesDir("Wxcache").getAbsolutePath() + File.separator + "WxheadCache.jpg"));
LoginActivity.this.m13268(wxInfoBean.getNickname(), file, this.f10359);
} catch (Exception e) {
e.toString();
}
}
}
public class C2906 extends JsonCallback<BaseBean> {
public final String f10361;
public final String f10362;
public C2906(String str, String str2) {
this.f10361 = str;
this.f10362 = str2;
}
@Override
public void onError(Call call, Exception exc, int i) {
LoginActivity.this.hideProgressDialog();
if (LoginActivity.this.f10267 == 0) {
LoginActivity.this.m13361();
} else {
LoginActivity.this.m13357();
}
}
@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.m13320();
LoginActivity.this.f10322.setText(this.f10361);
LoginActivity.this.f10321.setText(this.f10362);
LoginActivity.this.f10280.setText("");
LoginActivity.this.f10314.setText("");
LoginActivity.this.f10296.setText("");
LoginActivity.this.f10285.setText("");
LoginActivity.this.m13300();
return;
}
LoginActivity loginActivity = LoginActivity.this;
loginActivity.toast("" + baseBean.getMsg());
}
}
public class C2907 implements AdapterView.OnItemClickListener {
public class RunnableC2908 implements Runnable {
public RunnableC2908() {
}
@Override
public void run() {
Message obtain = Message.obtain();
obtain.what = 101;
LoginActivity.this.f10295.sendMessage(obtain);
}
}
public C2907() {
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
DomainBean.DataBean dataBean = (DomainBean.DataBean) LoginActivity.this.f10294.get(i);
if (dataBean != null) {
LoginActivity.this.f10300.m24757(i);
LoginActivity.this.f10300.notifyDataSetChanged();
C5633.m24598(dataBean.getUrl());
Host.setBaseUrl(dataBean.getUrl());
String str = "选择线路:" + dataBean.getName();
new Thread(new RunnableC2908()).start();
}
}
}
public class View$OnClickListenerC2909 implements View.OnClickListener {
public View$OnClickListenerC2909() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, GetChildAc.getParentAc("ForgetActivity")));
}
}
public class DatePickerDialogC2910 extends DatePickerDialog {
private int f10367;
private int f10369;
private int f10370;
private int f10371;
private int f10372;
public DatePickerDialogC2910(Context context, DatePickerDialog.OnDateSetListener onDateSetListener, int i, int i2, int i3) {
super(context, onDateSetListener, i, i2, i3);
this.f10369 = 2015;
this.f10370 = 1900;
this.f10367 = i;
this.f10371 = i2;
this.f10372 = i3;
}
@Override
public void onDateChanged(DatePicker datePicker, int i, int i2, int i3) {
int i4 = this.f10370;
if (i >= i4 && i <= this.f10369) {
this.f10367 = i;
this.f10371 = i2;
this.f10372 = i3;
return;
}
int i5 = this.f10367;
int i6 = this.f10369;
if (i5 > i6) {
this.f10367 = i6;
} else if (i5 < i4) {
this.f10367 = i4;
}
updateDate(this.f10367, this.f10371, this.f10372);
}
@Override
public void setTitle(CharSequence charSequence) {
super.setTitle("生 日");
}
public void m13366(int i) {
this.f10369 = i;
}
public void m13367(int i) {
this.f10370 = i;
}
}
public class View$OnClickListenerC2911 implements View.OnClickListener {
public View$OnClickListenerC2911() {
}
@Override
public void onClick(View view) {
if (LoginActivity.this.f10323) {
LoginActivity.this.m13266();
} else {
LoginActivity.this.m13300();
}
}
}
public class C2912 implements DatePickerDialog.OnDateSetListener {
public C2912() {
}
@Override
public void onDateSet(DatePicker datePicker, int i, int i2, int i3) {
LoginActivity.this.f10287 = i;
LoginActivity.this.f10269 = i2;
LoginActivity.this.f10270 = i3;
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f10317 = TimeUtil.getFormatDatetime(loginActivity.f10287, LoginActivity.this.f10269, LoginActivity.this.f10270);
LoginActivity.this.f10286.setText(LoginActivity.this.f10317);
}
}
public class C2913 extends JsonCallback<BaseBean> {
public final DomainBean.DataBean f10375;
public final long f10376;
public C2913(DomainBean.DataBean dataBean, long j) {
this.f10375 = dataBean;
this.f10376 = j;
}
@Override
public void onError(Call call, Exception exc, int i) {
super.onError(call, exc, i);
this.f10375.setExeTime(2147483647L);
LoginActivity.this.f10290.add(this.f10375);
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f10298++;
loginActivity.m13262();
}
@Override
public void onResponse(BaseBean baseBean) {
this.f10375.setExeTime(System.currentTimeMillis() - this.f10376);
LoginActivity.this.f10290.add(this.f10375);
LoginActivity.this.f10309.add(this.f10375);
LoginActivity.this.m13262();
}
}
public class C2914 implements Callback {
public class RunnableC2915 implements Runnable {
public final Response f10379;
public class RunnableC2916 implements Runnable {
public RunnableC2916() {
}
@Override
public void run() {
LoginActivity loginActivity = LoginActivity.this;
loginActivity.m13306(loginActivity.f10278);
}
}
public RunnableC2915(Response response) {
this.f10379 = response;
}
@Override
public void run() {
try {
LoginBean loginBean = (LoginBean) new Gson().fromJson(this.f10379.body().string(), (Class<Object>) LoginBean.class);
if (loginBean.getMsg().equals("openid_nothingness")) {
LoginActivity.this.m13321("");
} else if (loginBean.getCode() == 0 && loginBean.getData() != null) {
boolean z = true;
if (loginBean.getData().issup != 1) {
z = false;
}
LogoutService.f9953 = z;
UIkitUserPreferences.saveToken(loginBean.getData().token);
C5633.m24589(loginBean.getData().account);
C5633.m24585(loginBean.getData().friendcover);
if (!TextUtils.isEmpty(LoginActivity.this.f10278)) {
new Thread(new RunnableC2916()).run();
}
LoginActivity loginActivity = LoginActivity.this;
loginActivity.m13359(loginBean.getData().id + "", loginBean.getData().nimtoken);
} else {
LoginActivity.this.toast(loginBean.getMsg());
}
} catch (Exception e) {
e.toString();
}
}
}
public C2914() {
}
@Override
public void onFailure(Call call, IOException iOException) {
iOException.toString();
}
@Override
public void onResponse(Call call, Response response) {
LoginActivity.this.f10295.post(new RunnableC2915(response));
}
}
public class C2917 implements PopupWindow.OnDismissListener {
public C2917() {
}
@Override
public void onDismiss() {
LoginActivity.this.m13358(1.0f);
}
}
public class C2918 implements HttpListener {
public C2918() {
}
@Override
public void error(String str) {
}
@Override
public void result(Object obj) {
if (obj == null || !(obj instanceof AppSettingBean)) {
return;
}
C5783.f19450 = ((AppSettingBean) obj).phones;
String str = "" + C5783.f19450.toString();
}
}
public class C2919 extends AbstractC5012 {
public final ConstraintLayout f10384;
public C2919(ConstraintLayout constraintLayout) {
this.f10384 = constraintLayout;
}
@Override
public void onError(Call call, Exception exc, int i) {
}
@Override
public void onResponse(String str, int i) {
String unused = LoginActivity.f10264;
String str2 = "onResponse: " + str;
try {
LoginTypeBean loginTypeBean = (LoginTypeBean) JSON.parseObject(new JSONObject(str).getJSONObject("data").toString(), LoginTypeBean.class);
if (!TextUtils.isEmpty(loginTypeBean.getNimAppKey())) {
C5633.m24603("appkey", loginTypeBean.getNimAppKey());
}
int ismustmobile = loginTypeBean.getIsmustmobile();
LoginActivity.this.f10297 = loginTypeBean.getIsinvitecode();
LoginActivity.this.f10319 = loginTypeBean.getIsweixinlogin() == 1;
LoginActivity.this.f10289 = loginTypeBean.getIssecret() == 1;
LoginActivity.this.f10303 = loginTypeBean.getIsavatar() == 1;
if (loginTypeBean.getLogininfo() != null && !TextUtils.isEmpty(loginTypeBean.getLogininfo())) {
LoginActivity.this.f10275 = loginTypeBean.getLogininfo();
}
LoginActivity.this.f10313.setVisibility(LoginActivity.this.f10303 ? 0 : 8);
LoginActivity.this.f10327.setVisibility(LoginActivity.this.f10289 ? 0 : 8);
if (LoginActivity.this.f10289) {
LoginActivity.this.m13307();
}
LoginActivity.this.f10283.setVisibility(LoginActivity.this.f10289 ? 0 : 8);
LoginActivity.this.f10325.setVisibility(LoginActivity.this.f10289 ? 0 : 8);
AppConfig.LIMIT_SPEAK = loginTypeBean.getIsspeakingtime() == 1;
if (ismustmobile == 1) {
LoginActivity.this.f10280.setHint("请输入手机号");
LoginActivity.this.f10279.setVisibility(0);
} else if (ismustmobile == 0) {
if (C5783.m24974().isUserphoneHint()) {
LoginActivity.this.f10280.setHint("请输入手机号");
}
LoginActivity.this.f10279.setVisibility(8);
}
if (LoginActivity.this.f10297 == 1) {
this.f10384.setVisibility(0);
} else {
this.f10384.setVisibility(8);
}
if (LoginActivity.this.f10319) {
LoginActivity.this.f10330.setVisibility(0);
}
String unused2 = LoginActivity.f10264;
} catch (Exception e) {
e.printStackTrace();
String unused3 = LoginActivity.f10264;
}
}
}
public class C2920 extends JsonCallback<WalletQuestionBean> {
public C2920() {
}
@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.f10329 = list;
if (list.size() > 0) {
double random = Math.random();
double size = LoginActivity.this.f10329.size();
Double.isNaN(size);
LoginActivity.this.f10306.setText(LoginActivity.this.f10329.get((int) (random * size)).question);
}
}
}
public class View$OnClickListenerC2921 implements View.OnClickListener {
public View$OnClickListenerC2921() {
}
@Override
public void onClick(View view) {
LoginActivity.this.m13313();
}
}
public class C2922 extends JsonCallback<LoginBean> {
public final String f10388;
public final String f10389;
public class RunnableC2923 implements Runnable {
public RunnableC2923() {
}
@Override
public void run() {
LoginActivity loginActivity = LoginActivity.this;
loginActivity.m13306(loginActivity.f10278);
}
}
public C2922(String str, String str2) {
this.f10388 = str;
this.f10389 = 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.f9953 = loginBean.getData().issup == 1;
UIkitUserPreferences.saveToken(loginBean.getData().token);
C5633.m24589(this.f10388);
C5633.m24585(loginBean.getData().friendcover);
C4285.m20193(this.f10388);
if (LoginActivity.this.f10302.isChecked()) {
String m24604 = C5633.m24604("rbPwd");
if (TextUtils.isEmpty(m24604) || "{}".equals(m24604)) {
m24604 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
try {
JSONArray jSONArray = new JSONArray(m24604);
JSONObject jSONObject = new JSONObject();
jSONObject.put("account", this.f10388);
jSONObject.put("pwd", this.f10389);
int i = 0;
while (true) {
if (i >= jSONArray.length()) {
i = -1;
break;
} else if (jSONArray.getJSONObject(i).getString("account").equals(this.f10388)) {
break;
} else {
i++;
}
}
if (i == -1) {
if (jSONArray.length() > 5) {
jSONArray.remove(0);
}
} else {
jSONArray.remove(i);
}
jSONArray.put(jSONObject);
C5633.m24603("rbPwd", jSONArray.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
if (!TextUtils.isEmpty(LoginActivity.this.f10278)) {
new Thread(new RunnableC2923()).run();
}
LoginActivity loginActivity = LoginActivity.this;
loginActivity.m13359(loginBean.getData().id + "", loginBean.getData().nimtoken);
return;
}
LoginActivity.this.toast(loginBean.getMsg());
}
}
public class C2924 implements TextWatcher {
public C2924() {
}
@Override
public void afterTextChanged(Editable editable) {
if (TextUtils.isEmpty(editable)) {
LoginActivity.this.f10268.setBackgroundResource(R.drawable.login_new_btn);
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f10268.setTextColor(loginActivity.getResources().getColor(R.color.element_color));
return;
}
LoginActivity.this.f10268.setBackgroundResource(R.drawable.login_new_btn_can_login);
LoginActivity loginActivity2 = LoginActivity.this;
loginActivity2.f10268.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 View$OnClickListenerC2925 implements View.OnClickListener {
public View$OnClickListenerC2925() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, GetChildAc.getParentAc("SetHostActivity")));
}
}
public class RunnableC2926 implements Runnable {
public final View f10394;
public RunnableC2926(View view) {
this.f10394 = view;
}
@Override
public void run() {
LoginActivity.this.f10288.showAtLocation(this.f10394, 17, 0, 0);
}
}
public class View$OnClickListenerC2927 implements View.OnClickListener {
public View$OnClickListenerC2927() {
}
@Override
public void onClick(View view) {
LoginActivity.this.f10321.setText("");
LoginActivity.this.f10268.setBackgroundResource(R.drawable.login_new_btn);
LoginActivity loginActivity = LoginActivity.this;
loginActivity.f10268.setTextColor(loginActivity.getResources().getColor(R.color.element_color));
LoginActivity.this.m13320();
}
}
public class View$OnClickListenerC2928 implements View.OnClickListener {
public View$OnClickListenerC2928() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, GetChildAc.getParentAc("AgreementActivity")));
}
}
public class C2929 extends JsonCallback<CodeBean> {
public C2929() {
}
@Override
public void onResponse(CodeBean codeBean) {
int code = codeBean.getCode();
if (code == 0) {
LoginActivity.this.toast("发送成功");
new CountDownTimerC5654(60L, 1L, LoginActivity.this.f10282, "重新发送").start();
} else if (code != 1) {
} else {
LoginActivity.this.toast(codeBean.getMsg());
}
}
}
public class DialogInterface$OnCancelListenerC2930 implements DialogInterface.OnCancelListener {
public DialogInterface$OnCancelListenerC2930() {
}
@Override
public void onCancel(DialogInterface dialogInterface) {
if (LoginActivity.this.f10315 != null) {
LoginActivity.this.f10315.abort();
LoginActivity.this.m13295();
}
}
}
public class C2931 extends JsonCallback<BaseBean> {
public C2931() {
}
@Override
public void onError(Call call, Exception exc, int i) {
String str = LoginActivity.f10264;
AbsNimLog.i(str, "updateIconToServer fail, Exception =" + exc.toString());
}
@Override
public void onResponse(BaseBean baseBean) {
if (baseBean.getCode() == 0) {
AbsNimLog.i(LoginActivity.f10264, "更新头像到自己服务器 success");
} else {
AbsNimLog.i(LoginActivity.f10264, "更新头像到自己服务器 fail");
}
}
}
public class C2932 implements InputFilter {
public C2932() {
}
@Override
public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
while (i < i2) {
if (!LoginActivity.m13275(charSequence.charAt(i))) {
return "";
}
i++;
}
return null;
}
}
public class C2933 extends AbstractC5012 {
public C2933() {
}
@Override
public void onError(Call call, Exception exc, int i) {
LoginActivity loginActivity = LoginActivity.this;
if (loginActivity.f10308 < 10) {
loginActivity.m13360();
}
LoginActivity.this.f10308++;
}
@Override
public void onResponse(String str, int i) {
try {
JSONObject jSONObject = new JSONObject(str);
LoginActivity.this.f10291 = jSONObject.getString(SearchIntents.EXTRA_QUERY);
} catch (Exception e) {
e.printStackTrace();
LoginActivity.this.f10291 = "";
}
}
}
private void onParseIntent() {
String str;
if (getIntent().getBooleanExtra(f10265, 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) {
m13305(context, false);
}
public void m13262() {
if (this.f10290.size() == this.f10324.size()) {
hideProgressDialog();
if (this.f10309.size() > 0) {
int i = this.f10267;
if (i != 0 && i != 1) {
Host.setBaseUrl(this.f10309.get(0).getUrl());
ToastHelper.showToast(getApplicationContext(), "网络正在连接中~已自动选择云端线路,请重新点击注册!");
return;
}
Host.setBaseUrl(this.f10309.get(0).getUrl());
ToastHelper.showToast(getApplicationContext(), "网络正在连接中~已自动选择优质线路,请重新点击注册!");
return;
}
int i2 = this.f10267;
if (i2 != 0 && i2 != 1) {
m13355();
} else {
m13357();
}
}
}
private void m13264(View view) {
PopupWindow popupWindow = new PopupWindow(view, (int) getResources().getDimension(R.dimen.dp_290), (int) getResources().getDimension(R.dimen.dp_300));
this.f10288 = popupWindow;
popupWindow.setContentView(view);
this.f10288.setOutsideTouchable(true);
this.f10288.setFocusable(true);
this.f10288.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.transparent)));
m13358(0.5f);
this.f10288.setOnDismissListener(new C2917());
this.f10295.post(new RunnableC2926(view));
}
public void m13266() {
if (this.f10323 && this.f10299 && m13281()) {
if (!NetworkUtil.isNetAvailable(this)) {
Toast.makeText(this, R.string.network_is_not_available, 0).show();
} else if (this.f10289 && TextUtils.isEmpty(this.f10273.getText().toString())) {
Toast.makeText(this, "请填写密保答案!", 0).show();
} else {
DialogMaker.showProgressDialog(this, getString(R.string.registering), false);
String obj = this.f10280.getText().toString();
String obj2 = this.f10314.getText().toString();
String obj3 = this.f10296.getText().toString();
String obj4 = this.f10285.getText().toString();
this.f10307 = this.f10292.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.f10291)) {
hashMap.put("ip", this.f10291);
}
hashMap.put("deviceNo", C5783.m24965());
hashMap.put("mobilecode", this.f10307);
hashMap.put("question", this.f10306.getText().toString());
hashMap.put("answer", this.f10273.getText().toString());
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5030 mo22454 = C5062.m22509().m22462(Host.getApi_UserRegister()).mo22454(hashMap);
if (this.f10277 != null) {
mo22454.m22467("image", obj + ".jpg", this.f10277);
} else if (this.f10303) {
ToastHelper.showToast(this, "请上传头像!");
hideProgressDialog();
return;
}
mo22454.mo22450().m22483(new C2906(obj, obj3));
}
}
}
private void m13267(boolean z) {
if (this.f10319) {
this.f10330.setVisibility(z ? 0 : 4);
}
}
public void m13268(String str, File file, String str2) {
HashMap hashMap = new HashMap();
hashMap.put("type", BmobUser.BmobThirdUserAuth.SNS_TYPE_WEIXIN);
hashMap.put("openid", C5783.m24971());
hashMap.put("nickname", str);
hashMap.put("invitecode", str2);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5030 mo22454 = C5062.m22509().m22462(Host.getApi_UserRegister()).mo22454(hashMap);
mo22454.m22467("image", System.currentTimeMillis() + ".jpg", file).mo22450().m22483(new C2889());
}
public static boolean m13275(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 boolean m13278(String str) {
if (str.isEmpty()) {
toast("请输入账号");
return false;
} else if (!str.startsWith("1")) {
toast("请输入正确的手机号码");
return false;
} else if (str.length() != 11) {
toast("请输入正确的手机号码");
return false;
} else {
return true;
}
}
private void m13279() {
this.f10322 = (EditText) findView(R.id.edit_login_account);
this.f10321 = (EditText) findView(R.id.edit_login_password);
((CheckBox) findView(R.id.che_box)).setChecked(true);
TextView textView = (TextView) findView(R.id.tv_shouming);
this.f10332 = textView;
textView.setOnClickListener(new View$OnClickListenerC2928());
TextView textView2 = (TextView) findView(R.id.register_pwd_tip);
this.f10325 = textView2;
textView2.setOnClickListener(new View$OnClickListenerC2909());
this.f10268 = (Button) findView(R.id.bt_commit);
this.f10321.addTextChangedListener(new C2924());
this.f10322.setFilters(new InputFilter[]{new InputFilter.LengthFilter(32)});
this.f10321.setFilters(new InputFilter[]{new InputFilter.LengthFilter(32)});
this.f10321.setOnKeyListener(this);
this.f10268.setOnClickListener(new View$OnClickListenerC2911());
}
private boolean m13281() {
if (this.f10323 && this.f10299) {
String trim = this.f10280.getText().toString().trim();
if (this.f10279.getVisibility() == 0) {
if (trim.length() != 11) {
Toast.makeText(this, "请输入正确的手机号", 0).show();
}
} else if (trim.length() <= 0 || trim.length() > 20) {
if (C5783.m24974().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.f10314.getText().toString().trim();
if (trim2.length() > 0 && trim2.length() <= 10) {
String trim3 = this.f10296.getText().toString().trim();
if (trim3.length() >= 6 && trim3.length() <= 20) {
if (trim.equals(trim3)) {
Toast.makeText(this, "账号和密码不可相同,请重新输入密码", 0).show();
this.f10296.setText("");
return false;
} else if (trim3.length() < 8 || !m13356(trim3)) {
Toast.makeText(this, "密码过于简单:请输入至少8位字符,且必须包含英文字母", 0).show();
return false;
} else {
return true;
}
}
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;
}
public void m13295() {
this.f10315 = null;
DialogMaker.dismissProgressDialog();
}
public void m13299(String str, String str2) {
C5633.m24588(str);
C5633.m24590(str2);
}
public void m13300() {
String obj = this.f10322.getText().toString();
String obj2 = this.f10321.getText().toString();
if (TextUtils.isEmpty(obj)) {
toast("请输入账号");
} else if (TextUtils.isEmpty(obj2)) {
toast("请输入密码");
} else {
DialogMaker.showProgressDialog(this, null, getString(R.string.logining), true, new DialogInterface$OnCancelListenerC2930()).setCanceledOnTouchOutside(false);
Host.getApi_UserLogin();
HashMap hashMap = new HashMap();
hashMap.put("account", obj);
hashMap.put("password", obj2);
hashMap.put("os", "android");
hashMap.put("deviceNo", C5783.m24965());
if (!TextUtils.isEmpty(this.f10291)) {
hashMap.put("ip", this.f10291);
}
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_UserLogin()).mo22454(hashMap).mo22450().m22483(new C2922(obj, obj2));
}
}
private void m13302() {
if (Build.VERSION.SDK_INT >= 26) {
startForegroundService(new Intent(this, PhoneIntercepterService.class));
} else {
startService(new Intent(this, PhoneIntercepterService.class));
}
}
private void m13304() {
this.f10301 = findView(R.id.login_layout);
this.f10284 = findView(R.id.register_layout);
this.f10279 = (ConstraintLayout) findViewById(R.id.re_code);
this.f10280 = (ClearableEditTextWithIcon) findView(R.id.edit_register_account);
ConstraintLayout constraintLayout = (ConstraintLayout) findViewById(R.id.lin_invite_code);
if (C5783.m24974().isDefaultShowInviteCode()) {
constraintLayout.setVisibility(0);
} else {
constraintLayout.setVisibility(8);
}
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_Ismustmobile()).mo22454(hashMap).mo22450().m22483(new C2919(constraintLayout));
TextView textView = (TextView) findView(R.id.register_login_tip);
this.f10272 = textView;
if (!AppConstant.SHOW_REGISTER) {
textView.setVisibility(8);
}
this.f10272.setOnClickListener(new View$OnClickListenerC2927());
}
public static void m13305(Context context, boolean z) {
Intent intent = new Intent(context, GetChildAc.getParentAc("LoginActivity"));
intent.addFlags(603979776);
intent.putExtra(f10265, z);
context.startActivity(intent);
}
public void m13306(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
File file = new File(str);
String str2 = f10264;
AbsNimLog.i(str2, "start upload avatar, local file path=" + file.getAbsolutePath());
((NosService) NIMClient.getService(NosService.class)).upload(file, "image/jpeg").setCallback(new C2896());
}
public void m13307() {
HashMap hashMap = new HashMap();
hashMap.put("rand", "1");
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_WalletQuestionList()).mo22454(hashMap).mo22450().m22483(new C2920());
}
private void m13308() {
}
private void m13310() {
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_UserCanRegister()).mo22454(hashMap).mo22450().m22483(new C2899());
}
public void m13313() {
String obj = this.f10280.getText().toString();
if (m13278(obj)) {
HashMap hashMap = new HashMap();
hashMap.put("mobile", obj);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_SendCode()).mo22454(hashMap).mo22450().m22483(new C2929());
}
}
public void m13362(View view) {
this.f10288.dismiss();
}
private void m13318() {
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
OkUtil.getInstance().post(Host.getApi_AppSetting(), hashMap, AppSettingBean.class, new C2918());
}
public void m13320() {
Resources resources;
int i;
Resources resources2;
int i2;
boolean z = !this.f10323;
this.f10323 = z;
m13267(!z);
TextView textView = this.f10316;
if (this.f10323) {
resources = getResources();
i = R.string.register_welcome;
} else {
resources = getResources();
i = R.string.login_welcome;
}
textView.setText(resources.getText(i));
if (this.f10289) {
this.f10325.setVisibility(!this.f10323 ? 0 : 8);
}
if (this.f10323 && !this.f10299) {
this.f10314 = (ClearableEditTextWithIcon) findView(R.id.edit_register_nickname);
this.f10296 = (ClearableEditTextWithIcon) findView(R.id.edit_register_password);
this.f10285 = (ClearableEditTextWithIcon) findView(R.id.edit_register_invite_code);
this.f10282 = (TextView) findView(R.id.tv_code);
this.f10292 = (ClearableEditTextWithIcon) findView(R.id.edit_code);
this.f10280.setIconResource(R.drawable.user_account_icon);
ClearableEditTextWithIcon clearableEditTextWithIcon = this.f10292;
int i3 = R.drawable.icon_yanzhengma;
clearableEditTextWithIcon.setIconResource(i3);
this.f10314.setIconResource(R.drawable.nick_name_icon);
ClearableEditTextWithIcon clearableEditTextWithIcon2 = this.f10314;
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.f10296.setIconResource(R.drawable.user_pwd_lock_icon);
this.f10285.setIconResource(i3);
this.f10280.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20)});
this.f10314.setFilters(AppConstant.NICKNAME_TYPE ? new InputFilter[]{new InputFilter.LengthFilter(10)} : new InputFilter[]{new C2932(), new InputFilter.LengthFilter(10)});
this.f10296.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20)});
this.f10285.setFilters(new InputFilter[]{new InputFilter.LengthFilter(6)});
this.f10299 = true;
}
if (this.f10323) {
this.f10268.setTextColor(-1);
int i4 = R.id.logo;
if (findViewById(i4) != null) {
findViewById(i4).setVisibility(8);
}
this.f10268.setBackgroundResource(R.drawable.login_new_btn_can_login);
} else {
int i5 = R.id.logo;
if (findViewById(i5) != null) {
findViewById(i5).setVisibility(0);
}
}
this.f10282.setOnClickListener(new View$OnClickListenerC2921());
this.f10268.setText(this.f10323 ? R.string.register : R.string.login);
this.f10301.setVisibility(this.f10323 ? 8 : 0);
this.f10284.setVisibility(this.f10323 ? 0 : 8);
this.f10272.setText(this.f10323 ? R.string.login_has_account : R.string.register_btn);
}
public void m13321(String str) {
OkHttpClient okHttpClient = new OkHttpClient();
Request.Builder builder = new Request.Builder();
okHttpClient.newCall(builder.url("https://api.weixin.qq.com/sns/userinfo?access_token=" + C5783.m24978() + "&openid=" + C5783.m24971()).build()).enqueue(new C2905(str));
}
private void m13322() {
this.f10293 = (ConstraintLayout) findViewById(R.id.user_info);
this.f10310 = (AppCompatSpinner) findViewById(R.id.user_info_sex);
this.f10302 = (CheckBox) findView(R.id.cb_pwd);
this.f10310.setOnItemSelectedListener(new C2890());
TextView textView = (TextView) findViewById(R.id.user_info_date);
this.f10286 = textView;
textView.setOnClickListener(this);
this.f10283 = (ConstraintLayout) findViewById(R.id.lin_forget_answer);
this.f10273 = (ClearableEditTextWithIcon) findViewById(R.id.edit_forget_answer);
this.f10327 = (ConstraintLayout) findViewById(R.id.lin_forget_question);
this.f10306 = (EditText) findViewById(R.id.edit_forget_question);
TextView textView2 = (TextView) findViewById(R.id.register_select_question);
this.f10305 = textView2;
textView2.setOnClickListener(this);
this.f10328 = (TextView) findViewById(R.id.login_bottom_version);
this.f10326 = (TextView) findViewById(R.id.login_bottom_changedemon);
CircleView circleView = (CircleView) findViewById(R.id.register_head);
this.f10313 = circleView;
circleView.setOnClickListener(this);
this.f10316 = (TextView) findView(R.id.login_welcome_tip);
this.f10266 = (TextView) findViewById(R.id.login_bottom_tip);
this.f10330 = (ConstraintLayout) findViewById(R.id.login_channel_layout);
ImageView imageView = (ImageView) findViewById(R.id.login_channel_wx);
this.f10271 = imageView;
imageView.setOnClickListener(this);
this.f10326.setOnClickListener(this);
TextView textView3 = this.f10328;
textView3.setText("V" + C5783.m24973(C5783.m24972()));
findView(R.id.more_account).setOnClickListener(new View$OnClickListenerC2901());
m13318();
}
private void m13325() {
String obj = this.f10280.getText().toString();
if (m13278(obj)) {
HashMap hashMap = new HashMap();
hashMap.put("mobile", obj);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_OtherSendCode()).mo22454(hashMap).mo22450().m22483(new C2893());
}
}
private void m13327(Context context) {
View inflate = LayoutInflater.from(context).inflate(R.layout.login_changdomain_layout_dialog, (ViewGroup) getWindow().getDecorView().findViewById(16908290), false);
m13264(inflate);
this.f10331 = (ListView) inflate.findViewById(R.id.domain_listview);
C5677 c5677 = new C5677(this, this.f10294);
this.f10300 = c5677;
this.f10331.setAdapter((ListAdapter) c5677);
inflate.findViewById(R.id.self).setOnClickListener(new View$OnClickListenerC2925());
this.f10331.setOnItemClickListener(new C2907());
inflate.findViewById(R.id.iv_popup_close).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
LoginActivity.this.m13362(view);
}
});
}
public void m13329(DomainBean.DataBean dataBean) {
long currentTimeMillis = System.currentTimeMillis();
C5030 m22509 = C5062.m22509();
m22509.m22462(dataBean.getUrl() + "/api").mo22450().m22483(new C2913(dataBean, currentTimeMillis));
}
public void m13333(String str) {
HashMap hashMap = new HashMap();
hashMap.put(RemoteMessageConst.Notification.ICON, str);
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_UserEdit()).mo22454(hashMap).mo22450().m22483(new C2931());
}
public void m13335() {
NIMClient.toggleNotification(C5634.m24638());
StatusBarNotificationConfig m24620 = C5634.m24620();
if (m24620 == null) {
m24620 = C5783.m24968();
C5634.m24619(m24620);
}
NIMClient.updateStatusBarNotificationConfig(m24620);
}
private void m13339() {
HashMap hashMap = new HashMap();
hashMap.put("os", "android");
hashMap.put(NotifyType.VIBRATE, C5783.m24973(C5783.m24972()));
SignUtil.genParams(hashMap);
C5062.m22509().m22462(Host.getApi_Ismustmobile()).mo22454(hashMap).mo22450().m22483(new C2895());
}
private void m13343() {
MPermission.with(this).setRequestCode(110).permissions(this.f10304).request();
}
public void m13347(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 void m13349() {
new OkHttpClient().newCall(new Request.Builder().url(Host.getApi_UserLogin()).post(new FormBody.Builder().add("type", BmobUser.BmobThirdUserAuth.SNS_TYPE_WEIXIN).add("account", C5783.m24971()).add("password", "").build()).build()).enqueue(new C2914());
}
private void m13352(TextView textView) {
textView.addOnLayoutChangeListener(new View$OnLayoutChangeListenerC2892(textView));
}
@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.f10312) {
String stringExtra = intent.getStringExtra(Extras.EXTRA_FILE_PATH);
this.f10278 = stringExtra;
ComponentCallbacks2C5000.m22385(this).mo22293(stringExtra).m22356(this.f10313);
this.f10277 = 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.f10329) {
customAlertDialog.addItem(question.question, new C2900(question));
}
customAlertDialog.show();
} else 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.f10312, pickImageOption);
} else if (id != R.id.login_channel_wx) {
if (id == R.id.user_info_date) {
new DatePickerDialogC2910(this, new C2912(), this.f10287, this.f10269, this.f10270).show();
} else if (id == R.id.login_bottom_changedemon) {
startActivity(new Intent(this, GetChildAc.getParentAc("HostActivity")));
}
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (C5783.m24974().getVipState() == 3) {
setContentView(R.layout.login_activity_new1);
} else {
setContentView(R.layout.login_activity_new);
}
m13322();
NimToolBarOptions nimToolBarOptions = new NimToolBarOptions();
nimToolBarOptions.isNeedNavigate = false;
setToolBar(R.id.toolbar, nimToolBarOptions);
m13343();
m13302();
onParseIntent();
m13279();
String m24604 = C5633.m24604("rbPwd");
if (TextUtils.isEmpty(m24604) || "{}".equals(m24604)) {
m24604 = HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
try {
JSONArray jSONArray = new JSONArray(m24604);
if (jSONArray.length() > 0) {
JSONObject jSONObject = jSONArray.getJSONObject(jSONArray.length() - 1);
this.f10322.setText(jSONObject.getString("account"));
this.f10321.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 (C5783.m24971() != null) {
m13349();
}
m13304();
m13310();
m13360();
super.onResume();
}
public void m13355() {
ToastHelper.showToast(getApplicationContext(), "线路不可用,请联系客服自定义线路");
startActivity(new Intent(this, GetChildAc.getParentAc("SetHostActivity")));
}
public boolean m13356(String str) {
return Pattern.compile(".*[a-zA-Z]+.*").matcher(str).matches();
}
public void m13357() {
showProgressDialog("正在选择线路");
Bmob.resetDomain(C5783.m24974().getBmobUrl());
Bmob.initialize(this, "0d4826087d31755748c767515c367b99");
BmobQuery bmobQuery = new BmobQuery();
bmobQuery.addWhereEqualTo(ElementTag.ELEMENT_ATTRIBUTE_NAME, getApplication().getString(R.string.app_name));
bmobQuery.findObjects(new C2898());
}
public void m13358(float f) {
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.alpha = f;
getWindow().setAttributes(attributes);
}
public void m13359(String str, String str2) {
this.f10315 = NimUIKit.login(new LoginInfo(str, str2, C5633.m24599("appkey", C5783.m24974().getS1_key())), new C2894(str, str2));
}
public void m13360() {
C5062.m22509().m22462("http://ip-api.com/json/?lang=zh-CN").mo22450().m22483(new C2933());
}
public void m13361() {
this.f10267++;
String m24604 = C5633.m24604("mylines");
if (!TextUtils.isEmpty(m24604)) {
this.f10324 = JSON.parseArray(m24604, DomainBean.DataBean.class);
} else {
this.f10324 = new ArrayList();
}
DomainBean.DataBean dataBean = new DomainBean.DataBean();
dataBean.setUrl(C5783.m24974().getUrl1());
dataBean.setId(0);
dataBean.setName("线路" + this.f10324.size() + 1);
this.f10324.add(dataBean);
DomainBean.DataBean dataBean2 = new DomainBean.DataBean();
dataBean2.setUrl(C5783.m24974().getUrl2());
dataBean2.setId(1);
dataBean2.setName("线路" + this.f10324.size() + 1);
this.f10324.add(dataBean2);
HashMap hashMap = new HashMap();
for (DomainBean.DataBean dataBean3 : this.f10324) {
hashMap.put(dataBean3.url, dataBean3);
}
this.f10324.clear();
showProgressDialog("正在选择线路");
for (DomainBean.DataBean dataBean4 : this.f10324) {
m13329(dataBean4);
}
}
}