和通讯录 v3.9.6版本的 MD5 值为:669178e2ee1b2311daf378bd20c6bbe1
以下内容为反编译后的 MainSettingActivity.java 源代码,内容仅作参考
package com.chinamobile.contacts.im.setting;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.chinamobile.contacts.im.App;
import com.chinamobile.contacts.im.C0019R;
import com.chinamobile.contacts.im.alumni.Alumniactivity;
import com.chinamobile.contacts.im.config.LoginInfoSP;
import com.chinamobile.contacts.im.data.ContactAccessor;
import com.chinamobile.contacts.im.login.SettingNewLoginMainActivity;
import com.chinamobile.contacts.im.mobilecard.OneCardLoginController;
import com.chinamobile.contacts.im.mobilecard.view.OneCardGroupAndSettingAc;
import com.chinamobile.contacts.im.ui.ICloudActivity;
import com.chinamobile.contacts.im.utils.ApplicationUtils;
import com.chinamobile.contacts.im.view.BaseToast;
import com.chinamobile.contacts.im.view.HintsDialog;
import com.chinamobile.contacts.im.view.ProgressDialog;
import com.chinamobile.contacts.im.view.actionbar.IcloudActionBar;
public class MainSettingActivity extends ICloudActivity implements View.OnClickListener, OneCardLoginController.OnLoadCompletedListener {
private static com.chinamobile.contacts.im.sync.c.a h;
private Context f3229a;
private RelativeLayout f3230b;
private RelativeLayout c;
private RelativeLayout d;
private RelativeLayout e;
private RelativeLayout f;
private RelativeLayout g;
private RelativeLayout i;
private x j;
private RelativeLayout k;
private IcloudActionBar l;
private int m = 1311;
private Handler n = new u(this);
private RelativeLayout o;
private RelativeLayout p;
private TextView q;
private TextView r;
private TextView s;
private ImageView t;
private ProgressDialog u;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.f3229a = this;
setContentView(C0019R.layout.setting_main_activity);
c();
d();
this.j = new x(this, null);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("sync_switch_state");
intentFilter.addAction("com.chinamobile.contact.im.SYNC_CLOSE_ACTION");
intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
registerReceiver(this.j, intentFilter);
}
private void c() {
this.l = getIcloudActionBar();
this.l.setNavigationMode(3);
this.l.setDisplayAsUpTitle("设置");
this.l.setDisplayAsUpTitleIBAction(C0019R.drawable.setting_problem_diagnose, this);
this.l.setDisplayAsUpBack(C0019R.drawable.iab_green_back, this);
}
private void d() {
this.i = (RelativeLayout) findViewById(C0019R.id.setting_item_call);
this.d = (RelativeLayout) findViewById(C0019R.id.setting_item_message);
this.c = (RelativeLayout) findViewById(C0019R.id.setting_item_contact);
this.f = (RelativeLayout) findViewById(C0019R.id.setting_item_vip);
this.f3230b = (RelativeLayout) findViewById(C0019R.id.setting_item_login);
this.e = (RelativeLayout) findViewById(C0019R.id.setting_about_icloud);
this.o = (RelativeLayout) findViewById(C0019R.id.setting_item_sync_backup);
this.k = (RelativeLayout) findViewById(C0019R.id.setting_item_app);
if (ApplicationUtils.getChannel(this.f3229a).equals("mcontact_mfmfscanzhi")) {
this.k.setVisibility(8);
findViewById(C0019R.id.setting_item_app_line).setVisibility(8);
}
this.p = (RelativeLayout) findViewById(C0019R.id.setting_item_other);
this.g = (RelativeLayout) findViewById(C0019R.id.setting_item_trustee);
if (ApplicationUtils.getSystemVersion() >= 21) {
this.g.setVisibility(8);
}
this.q = (TextView) findViewById(C0019R.id.setting_item_login_text);
this.r = (TextView) findViewById(C0019R.id.setting_item_login_logout_text);
this.s = (TextView) findViewById(C0019R.id.setting_item_login_change_pwd);
this.t = (ImageView) findViewById(C0019R.id.setting_item_login_img);
this.r.setOnClickListener(this);
this.s.setOnClickListener(this);
this.i.setOnClickListener(this);
this.d.setOnClickListener(this);
this.f.setOnClickListener(this);
this.c.setOnClickListener(this);
this.f3230b.setOnClickListener(this);
this.e.setOnClickListener(this);
this.o.setOnClickListener(this);
this.k.setOnClickListener(this);
this.p.setOnClickListener(this);
this.g.setOnClickListener(this);
com.chinamobile.contacts.im.directory.f.a().a(this, this.f);
a();
}
@Override
public void onPause() {
super.onPause();
}
@Override
public void onResume() {
super.onResume();
if (LoginInfoSP.isLogin(this.f3229a) && LoginInfoSP.isfirstloginvnet(this.f3229a).booleanValue()) {
com.chinamobile.contacts.im.enterpriseContact.utils.g.b(this.f3229a);
LoginInfoSP.savefirstloginvnet(this.f3229a, false);
}
a();
this.n.post(new v(this));
}
@Override
public void onDestroy() {
super.onDestroy();
unregisterReceiver(this.j);
}
public void a() {
h = ContactAccessor.getEntity(this.f3229a);
if (h.d()) {
this.t.setVisibility(8);
this.r.setVisibility(0);
this.s.setVisibility(0);
this.f3230b.setClickable(false);
this.q.setText("帐号 " + h.b());
return;
}
this.t.setVisibility(0);
this.r.setVisibility(8);
this.s.setVisibility(8);
this.f3230b.setClickable(true);
this.q.setText("登录");
com.chinamobile.contacts.im.directory.f.a().a(this.f3229a, (View) this.f, false);
}
public static void b() {
h = ContactAccessor.getEntity(App.a());
if (h.d()) {
com.chinamobile.contacts.im.setting.c.g.a(ContactAccessor.getAuth(App.a()).l(), com.chinamobile.contacts.im.config.g.h);
}
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 1232) {
if (ApplicationUtils.isUserPhoneBunded(this.f3229a)) {
startActivity(Alumniactivity.a(this.f3229a));
}
} else if (i == this.m) {
a();
}
}
private void e() {
HintsDialog hintsDialog = new HintsDialog(this, "温馨提示", "确定要退出登录吗?");
hintsDialog.setButton(new w(this));
hintsDialog.show();
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case C0019R.id.setting_item_vip:
com.chinamobile.icloud.im.sync.a.a auth = ContactAccessor.getAuth(this.f3229a);
if (auth != null) {
com.chinamobile.contacts.im.directory.g gVar = new com.chinamobile.contacts.im.directory.g(1, this.f3229a);
String a2 = com.chinamobile.contacts.im.directory.f.a().a(this.f3229a, auth, 1);
gVar.a(this.n.obtainMessage(2));
gVar.executeOnMainExecutor(com.chinamobile.contacts.im.config.g.j, a2);
return;
}
return;
case C0019R.id.iab_back_area:
onBackPressed();
return;
case C0019R.id.iab_ib_action:
startActivity(new Intent().setClass(this.f3229a, SettingProblemDiagnoseActivity.class));
return;
case C0019R.id.setting_item_login:
startActivityForResult(new Intent().setClass(this.f3229a, SettingNewLoginMainActivity.class), this.m);
return;
case C0019R.id.setting_item_login_change_pwd:
if (!ApplicationUtils.isNetworkAvailable(this.f3229a)) {
BaseToast.makeText(this.f3229a, "无法连接网络,请检查网络配置!", 2000).show();
return;
}
if (!LoginInfoSP.isBunding(this.f3229a)) {
BaseToast.makeText(this.f3229a, "未绑定手机号!", 2000).show();
return;
}
String mobile = LoginInfoSP.getMobile(this.f3229a);
if (!ApplicationUtils.isCMCCPhone(mobile)) {
BaseToast.makeText(this.f3229a, "不支持非移动的手机!", 2000).show();
return;
} else {
startActivity(BrowserActivity.createIntent(this.f3229a, "http://wap.cmpassport.com/xmdpwd?optype=12&sourceid=6&mobilenumber=" + mobile + "&check=" + ApplicationUtils.encrypt("MD5", ApplicationUtils.encrypt("MD5", "126" + mobile) + "1f7f2a6327159e9e") + "&backurl=", "修改密码"));
return;
}
case C0019R.id.setting_item_login_logout_text:
e();
return;
case C0019R.id.setting_item_call:
startActivity(new Intent(this.f3229a, (Class<?>) SettingCallActivity.class));
return;
case C0019R.id.setting_item_contact:
startActivity(SettingContactActivity.a(this.f3229a));
return;
case C0019R.id.setting_item_message:
startActivity(SettingMessageActivity.a(this.f3229a));
return;
case C0019R.id.setting_item_sync_backup:
startActivity(new Intent(this, (Class<?>) SettingSyncActivity.class));
return;
case C0019R.id.setting_item_other:
startActivity(new Intent().setClass(this.f3229a, SettingOtherActivity.class));
return;
case C0019R.id.setting_item_trustee:
startActivity(new Intent(this, (Class<?>) SettingTrusteeActivity.class));
return;
case C0019R.id.setting_item_app:
startActivity(new Intent().setClass(this.f3229a, SettingRecommendAppActivity.class));
return;
case C0019R.id.setting_about_icloud:
this.f3229a.startActivity(new Intent(this.f3229a, (Class<?>) SettingAboutActivity.class));
return;
default:
return;
}
}
@Override
public void onLoadCompleted(String str) {
if (this.u != null && this.u.isShowing()) {
this.u.dismiss();
}
if (!TextUtils.isEmpty(str)) {
BaseToast.makeText(this.f3229a, str, 1000).show();
return;
}
if (LoginInfoSP.getLoadSubPhoneState(this.f3229a) == 0) {
startActivity(new Intent(this.f3229a, (Class<?>) BusinessIntroductionActivity.class));
} else if (LoginInfoSP.getLoadSubPhoneState(this.f3229a) == 1) {
Intent intent = new Intent(this.f3229a, (Class<?>) ACardMoreNumberActivity.class);
intent.putExtra(OneCardGroupAndSettingAc.INTENT_TITLE_NAME, this.f3229a.getString(C0019R.string.onecard_name_setting));
startActivity(intent);
}
}
}