和通讯录 v4.2.0版本的 MD5 值为:f213fa766dccbfebde0dd8add5534518
以下内容为反编译后的 Message139ListView.java 源代码,内容仅作参考
package com.chinamobile.contacts.im.mms139;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.chinamobile.contacts.im.C0019R;
import com.chinamobile.contacts.im.config.LoginInfoSP;
import com.chinamobile.contacts.im.mms2.ui.NotificationManagerPopMain;
import com.chinamobile.contacts.im.sync.c.x;
import com.chinamobile.contacts.im.ui.ICloudActivity;
import com.chinamobile.contacts.im.utils.ApplicationUtils;
import com.chinamobile.contacts.im.utils.ay;
import com.chinamobile.contacts.im.utils.bj;
import com.chinamobile.contacts.im.utils.bl;
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;
import com.chinamobile.contacts.im.view.actionbar.IcloudActionBarPopAdapter;
import com.chinamobile.contacts.im.view.actionbar.IcloudActionBarPopNavi;
import com.chinamobile.contacts.im.view.actionbar.IcloudActionMenu;
import com.chinamobile.contacts.im.view.actionbar.IcloudActionMode;
import com.umeng.analytics.AspMobclickAgent;
import java.util.ArrayList;
@SuppressLint({"NewApi"})
public class Message139ListView extends ICloudActivity implements View.OnClickListener, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, bl<Cursor>, IcloudActionBarPopNavi.OnPopNaviItemClickListener, IcloudActionMode.Callback, com.chinamobile.contacts.im.voicemail.b.a {
public static boolean f2509a = false;
public static final SparseBooleanArray f2510b = new SparseBooleanArray();
private c c;
private ListView d;
private a f;
private ArrayList<String> h;
private Context i;
private IcloudActionBarPopNavi j;
private ProgressDialog k;
private IcloudActionBar m;
private LinearLayout n;
private View o;
private View p;
private TextView q;
private Button r;
private final String e = Message139ListView.class.getSimpleName();
private String g = null;
private boolean l = true;
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(C0019R.layout.message_139_list_view);
this.l = true;
this.i = this;
l.a((Context) this);
g();
e();
((LinearLayout) findViewById(C0019R.id.button_textfor139_parent)).setVisibility(0);
this.r = (Button) findViewById(C0019R.id.button_textfor139);
this.r.setOnClickListener(this);
this.d = (ListView) findViewById(C0019R.id.listView1);
this.d.setDivider(null);
this.d.setOnItemClickListener(this);
this.d.setOnItemLongClickListener(this);
this.c = new c(getApplicationContext());
this.c.a(this);
this.d.setAdapter((ListAdapter) this.c);
this.n = (LinearLayout) findViewById(C0019R.id.message139_blank_layout);
if (NotificationManagerPopMain.a(this.i, "cn.cj.pe").booleanValue()) {
this.r.setText("进入邮箱");
} else {
this.r.setText("下载139邮箱客户端");
}
}
private void e() {
f();
IcloudActionBarPopAdapter icloudActionBarPopAdapter = new IcloudActionBarPopAdapter(this.i, this.h);
this.j = new IcloudActionBarPopNavi(this.i, icloudActionBarPopAdapter);
this.j.setOnPopNaviItemClickListener(this);
this.m.setDisplayAsUpTitleIBMore(C0019R.drawable.iab_green_more, new e(this, icloudActionBarPopAdapter));
}
private void f() {
this.h = this.h == null ? new ArrayList<>() : this.h;
this.h.add("清空记录");
this.h.add("批量删除");
}
private void g() {
this.m = getIcloudActionBar();
this.m.setNavigationMode(3);
this.m.setDisplayAsUpTitle(getResources().getString(C0019R.string.mms_139_from));
this.m.setDisplayAsUpBack(C0019R.drawable.iab_green_back, this);
}
@Override
protected void onResume() {
super.onResume();
l.a().a((bl) this);
l.a().k();
if (this.r != null) {
if (NotificationManagerPopMain.a(this.i, "cn.cj.pe").booleanValue()) {
this.r.setText("进入邮箱");
} else {
this.r.setText("下载139邮箱客户端");
}
}
}
@Override
protected void onPause() {
super.onPause();
l.a().m();
l.a().b((bl) this);
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
if (!f2509a) {
if (NotificationManagerPopMain.a(this.i, "cn.cj.pe").booleanValue()) {
new Intent();
Intent launchIntentForPackage = getPackageManager().getLaunchIntentForPackage("cn.cj.pe");
launchIntentForPackage.setFlags(337641472);
startActivity(launchIntentForPackage);
} else {
this.f = ((Message139ListItem) view).getMessage139Item();
a();
}
AspMobclickAgent.onEvent(this, "mail139_onItemClick");
return;
}
Message139ListItem message139ListItem = (Message139ListItem) view;
o();
CheckBox checkBox = (CheckBox) this.mActionMode.getViewById(C0019R.id.mca_ib_select);
if (f2510b.size() == this.c.getCount()) {
checkBox.setChecked(false);
} else {
checkBox.setChecked(true);
}
message139ListItem.c();
}
private void a(boolean z, int i) {
int count = this.c.getCount() - 1;
this.d.getHeight();
this.d.setSelection(count);
}
@Override
public void a(bj<Cursor> bjVar, Cursor cursor, boolean z) {
if (this.c.getCursor() != cursor) {
this.c.changeCursor(cursor);
l.a().c();
}
boolean r = l.a().r();
if (this.l) {
if (!r) {
this.l = false;
}
a(false, 0);
}
}
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long j) {
if (!f2509a) {
m();
b().put(i, true);
o();
this.n.setVisibility(0);
}
return true;
}
public void a(Uri uri) {
Intent intent = new Intent("android.intent.action.VIEW");
if (uri == null || !uri.toString().startsWith("http")) {
uri = Uri.parse("http://y.10086.cn/");
}
intent.setData(uri);
startActivity(intent);
}
public void a() {
if (!ApplicationUtils.isNetworkAvailable(this)) {
BaseToast.makeText(this, getResources().getString(C0019R.string.msg_net_error), 1000).show();
return;
}
if (!LoginInfoSP.isLogin(this)) {
a(Uri.parse(this.f.b()));
return;
}
String b2 = this.f.b();
if (b2 != null && !b2.equalsIgnoreCase("http://y.10086.cn/") && x.b(this)) {
a(Uri.parse(b2));
} else {
h();
}
}
private void h() {
ay.a(this).a();
ay.a((Context) null).a(new f(this));
}
public void i() {
ay.a(this).a(this.f.c());
ay.a((Context) null).a(new g(this));
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case C0019R.id.iab_back_area:
finish();
return;
case C0019R.id.button_textfor139:
if (!f2509a) {
o.a(this.i);
return;
}
return;
default:
return;
}
}
@Override
public void OnPopNaviClick(int i) {
switch (i) {
case 0:
j();
return;
case 1:
m();
o();
this.n.setVisibility(0);
return;
default:
return;
}
}
private void j() {
HintsDialog hintsDialog = new HintsDialog(this.i, "清空邮件记录", "清空所有的邮件记录吗?");
if (com.chinamobile.contacts.im.config.j.v(this.i)) {
hintsDialog.setShowCheckBox2();
hintsDialog.setCheckBox2Text(this.i.getResources().getString(C0019R.string.delete_backup_recycle));
hintsDialog.setCheckBox2State(com.chinamobile.contacts.im.config.j.w(this.i));
}
hintsDialog.setButton(new h(this, hintsDialog), C0019R.string.setting_clear);
hintsDialog.show();
}
private void k() {
HintsDialog hintsDialog = new HintsDialog(this.i, "删除邮件记录", "删除选中的邮件记录吗?");
if (com.chinamobile.contacts.im.config.j.v(this.i)) {
hintsDialog.setShowCheckBox2();
hintsDialog.setCheckBox2Text(this.i.getResources().getString(C0019R.string.delete_backup_recycle));
hintsDialog.setCheckBox2State(com.chinamobile.contacts.im.config.j.w(this.i));
}
hintsDialog.setButton(new j(this, hintsDialog), C0019R.string.msg_139_context_menu_option_delete);
hintsDialog.show();
}
private void a(boolean z) {
if (!z) {
l();
}
f2509a = z;
}
private void l() {
if (f2510b != null) {
f2510b.clear();
}
}
public SparseBooleanArray b() {
return f2510b;
}
private void m() {
a(true);
startIcloudActionMode(this);
}
@Override
public boolean onPrepareActionMode(IcloudActionMode icloudActionMode, IcloudActionMenu icloudActionMenu) {
this.mActionMode = icloudActionMode;
TextView textView = (TextView) this.mActionMode.getViewById(C0019R.id.mca_title);
textView.setText("已选");
textView.setMinWidth(ApplicationUtils.dip2px(this, 120.0f));
this.o = this.mActionMode.getViewById(C0019R.id.mca_delete_layout);
this.p = this.mActionMode.getViewById(C0019R.id.mca_delete_icon);
this.q = (TextView) this.mActionMode.getViewById(C0019R.id.mca_delete_txt);
icloudActionMode.getViewById(C0019R.id.mca_ib_select).setVisibility(0);
return false;
}
public void c() {
l();
o();
}
public void d() {
l();
for (int i = 0; i < this.c.getCount(); i++) {
f2510b.put(i, true);
}
o();
}
@Override
public boolean onActionItemClicked(IcloudActionMode icloudActionMode, View view) {
switch (view.getId()) {
case C0019R.id.mca_delete_layout:
k();
return true;
case C0019R.id.mca_ex_area:
n();
return true;
case C0019R.id.mca_ib_select:
if (((CheckBox) view).isChecked()) {
c();
return true;
}
d();
return true;
default:
return true;
}
}
public void n() {
destoryIcloudActionMode();
}
private void o() {
this.c.notifyDataSetChanged();
a(b());
if (f2510b != null) {
this.mActionMode.updateCount(f2510b.size());
}
}
@Override
public boolean onCreateActionMode(IcloudActionMode icloudActionMode, IcloudActionMenu icloudActionMenu) {
icloudActionMenu.setBottomMenu(C0019R.layout.message139_multichoice_action);
icloudActionMenu.setTopMenu(C0019R.layout.mca_custom_top_select);
return false;
}
private void a(SparseBooleanArray sparseBooleanArray) {
if (this.o != null) {
if (sparseBooleanArray.size() > 0) {
this.o.setOnClickListener(this.mActionMode);
this.p.setEnabled(true);
this.q.setEnabled(true);
this.o.setClickable(true);
return;
}
this.o.setOnClickListener(null);
this.p.setEnabled(false);
this.q.setEnabled(false);
this.o.setClickable(false);
}
}
@Override
public void onDestroyActionMode(IcloudActionMode icloudActionMode) {
a(false);
this.n.setVisibility(8);
this.c.notifyDataSetChanged();
}
@Override
public void a(int i, View view) {
o();
CheckBox checkBox = (CheckBox) this.mActionMode.getViewById(C0019R.id.mca_ib_select);
if (f2510b.size() == this.c.getCount()) {
checkBox.setChecked(false);
} else {
checkBox.setChecked(true);
}
}
}