百度手机卫士 v8.8.0版本的 MD5 值为:a85894a6923c8a39f0c3a3a686ad7443
以下内容为反编译后的 ConversationList.java 源代码,内容仅作参考
package com.dianxinos.optimizer.module.mms.ui;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.AsyncQueryHandler;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.database.ContentObserver;
import android.database.Cursor;
import android.database.sqlite.SQLiteException;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.Html;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.ViewTreeObserver;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.HeaderViewListAdapter;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import cn.opda.a.phonoalbumshoushou.R;
import com.baidu.security.plugin.ICloudScanCallback;
import com.dianxinos.optimizer.module.antispam.SpamSmsRecordsActivity;
import com.dianxinos.optimizer.module.mms.data.ContactList;
import com.dianxinos.optimizer.module.mms.swipe.SwipeListView;
import com.dianxinos.optimizer.web.WebBrowserActivity;
import dxoptimizer.a;
import dxoptimizer.acx;
import dxoptimizer.bbk;
import dxoptimizer.bbl;
import dxoptimizer.bzv;
import dxoptimizer.eee;
import dxoptimizer.efq;
import dxoptimizer.efs;
import dxoptimizer.egg;
import dxoptimizer.egm;
import dxoptimizer.egn;
import dxoptimizer.egs;
import dxoptimizer.egt;
import dxoptimizer.ejy;
import dxoptimizer.ekg;
import dxoptimizer.ekp;
import dxoptimizer.emf;
import dxoptimizer.eqo;
import dxoptimizer.eqp;
import dxoptimizer.eqq;
import dxoptimizer.eqr;
import dxoptimizer.eqs;
import dxoptimizer.eqt;
import dxoptimizer.equ;
import dxoptimizer.eqv;
import dxoptimizer.eqw;
import dxoptimizer.eqx;
import dxoptimizer.eqy;
import dxoptimizer.eqz;
import dxoptimizer.era;
import dxoptimizer.erb;
import dxoptimizer.erc;
import dxoptimizer.erd;
import dxoptimizer.ere;
import dxoptimizer.erf;
import dxoptimizer.erh;
import dxoptimizer.eri;
import dxoptimizer.erj;
import dxoptimizer.erk;
import dxoptimizer.erl;
import dxoptimizer.erm;
import dxoptimizer.ern;
import dxoptimizer.ero;
import dxoptimizer.erq;
import dxoptimizer.err;
import dxoptimizer.ers;
import dxoptimizer.ert;
import dxoptimizer.eru;
import dxoptimizer.erv;
import dxoptimizer.erw;
import dxoptimizer.erx;
import dxoptimizer.erz;
import dxoptimizer.esa;
import dxoptimizer.esb;
import dxoptimizer.esc;
import dxoptimizer.esd;
import dxoptimizer.ese;
import dxoptimizer.esf;
import dxoptimizer.esh;
import dxoptimizer.esi;
import dxoptimizer.esj;
import dxoptimizer.esk;
import dxoptimizer.etr;
import dxoptimizer.evk;
import dxoptimizer.ewf;
import dxoptimizer.ewu;
import dxoptimizer.exb;
import dxoptimizer.exj;
import dxoptimizer.exk;
import dxoptimizer.exo;
import dxoptimizer.exu;
import dxoptimizer.eys;
import dxoptimizer.eyt;
import dxoptimizer.fzo;
import dxoptimizer.fzp;
import dxoptimizer.hoj;
import dxoptimizer.hti;
import dxoptimizer.hum;
import dxoptimizer.hwn;
import dxoptimizer.hyp;
import dxoptimizer.hzl;
import dxoptimizer.iaj;
import dxoptimizer.iaw;
import dxoptimizer.icn;
import dxoptimizer.ico;
import dxoptimizer.icv;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
public class ConversationList extends etr implements View.OnClickListener, View.OnTouchListener, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, CompoundButton.OnCheckedChangeListener, acx, ekg, exk {
private static boolean a = true;
private static Collection<Long> e;
private View A;
private ViewStub B;
private CheckBox C;
private View D;
private View E;
private View F;
private View G;
private TextView H;
private TextView I;
private TextView J;
private RelativeLayout K;
private RelativeLayout L;
private RelativeLayout M;
private SwipeListView N;
private HashSet<Long> O;
private HashSet<String> P;
private HashSet<Long> Q;
private List<Long> R;
private HashSet<Long> S;
private int T;
private hum U;
private ListView V;
private View W;
private EditText X;
private View Y;
private evk Z;
private View aa;
private int ab;
private ImageView ac;
private GridView ad;
private View ae;
private Animation af;
private Animation ag;
private MmsGuideTipsView ah;
private boolean aj;
private boolean ak;
private boolean al;
private Intent am;
private HashSet<Long> f;
private esi m;
private esj n;
private boolean p;
private MenuItem q;
private int s;
private ImageView t;
private ImageView u;
private ImageView v;
private ImageView w;
private ImageView x;
private boolean y;
private View z;
private int g = 0;
private final esk h = new eqo(this);
private final Runnable j = new eqz(this);
private final View.OnKeyListener k = new erl(this);
private long l = -10;
private int r = -1;
private Dialog ai = null;
private int an = -1;
private ViewTreeObserver.OnGlobalLayoutListener ao = new erx(this);
private Handler o;
private final ContentObserver ap = new esa(this, this.o);
private BroadcastReceiver aq = new esb(this);
private Runnable ar = new esc(this);
private Runnable as = new esd(this);
private Runnable at = new ese(this);
private egm au = new eqp(this);
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
if (!hzl.a()) {
icv.a(this, R.string.jadx_deobf_0x00002520, 1);
finish();
return;
}
requestWindowFeature(1);
setContentView(R.layout.jadx_deobf_0x00000971);
this.m = new esi(this, getContentResolver());
ewu.a(this).r();
m();
D();
g();
n();
this.f = new HashSet<>();
this.O = new HashSet<>();
this.P = new HashSet<>();
this.Q = new HashSet<>();
this.o = new Handler();
v();
if (bundle != null) {
this.r = bundle.getInt("last_list_pos", -1);
this.s = bundle.getInt("last_list_offset", 0);
} else {
this.r = -1;
this.s = 0;
}
if (eyt.a(this).l() && hoj.d(this)) {
bbl.a(this).m(true);
ewu.a(this).d();
eyt.a(this).d(false);
exu.ar(this);
}
this.am = getIntent();
this.an = ico.a(this.am, "extra.from", -1);
this.T = ico.a(this.am, "extra_entry_from", 0);
if (this.an == 41) {
exb.a(this, true);
}
if (this.am != null) {
bzv.a(this).a(this.am);
if (this.T == 1) {
exu.b(this);
} else if (this.T == 0) {
exu.c(this);
} else if (this.T == 4) {
exu.bc(this);
}
} else {
this.an = -1;
exu.c(this);
}
exu.a(this);
icn.a(this, new Intent("com.dianxinos.mms.CLOSE_CLASSIFY_DIALOG"));
this.aj = eyt.a(this).o();
f();
eee.a(this, 58, 2);
}
private void e() {
Context applicationContext = getApplicationContext();
if (this.ah.a()) {
eqq eqqVar = new eqq(this);
this.ah.b(getString(R.string.jadx_deobf_0x00002504), getString(R.string.jadx_deobf_0x00002553));
this.ah.setOnSpanClickListener(eqqVar);
return;
}
if (!this.d && hyp.c() && !eyt.a(applicationContext).s()) {
eqr eqrVar = new eqr(this, applicationContext);
this.ah.a(getString(R.string.jadx_deobf_0x00002556), getString(R.string.jadx_deobf_0x00002555));
this.ah.setOnSpanClickListener(eqrVar);
this.ah.setVisibility(0);
return;
}
if (hzl.d() && eyt.a(this).p() && iaj.g(getApplicationContext(), "com.qihoo360.mobilesafe")) {
eqs eqsVar = new eqs(this);
this.ah.setVisibility(0);
this.ah.b(getString(R.string.jadx_deobf_0x00002502), getString(R.string.jadx_deobf_0x00002503));
this.ah.setOnSpanClickListener(eqsVar);
}
}
private void f() {
if (this.aj) {
this.o.postDelayed(new eqt(this), 2000L);
}
}
private void g() {
try {
h();
} catch (Throwable th) {
}
}
private void h() {
this.B = (ViewStub) findViewById(R.id.jadx_deobf_0x00001685);
this.B.inflate();
if (this.T == 3) {
this.B.setVisibility(8);
return;
}
this.L = (RelativeLayout) findViewById(R.id.jadx_deobf_0x000016a1);
this.M = (RelativeLayout) findViewById(R.id.jadx_deobf_0x000016a2);
this.u = (ImageView) findViewById(R.id.jadx_deobf_0x000016a3);
this.x = (ImageView) findViewById(R.id.jadx_deobf_0x000016a4);
this.x.setBackgroundResource(R.drawable.jadx_deobf_0x00000588);
this.u.setBackgroundResource(R.drawable.jadx_deobf_0x0000058c);
this.v = (ImageView) findViewById(R.id.jadx_deobf_0x000016a5);
this.w = (ImageView) findViewById(R.id.jadx_deobf_0x000016a6);
int i = Calendar.getInstance().get(11);
if (i >= 5 && i < 12) {
this.v.setBackgroundResource(R.drawable.jadx_deobf_0x00000589);
i();
return;
}
if (i >= 12 && i < 19) {
this.v.setBackgroundResource(R.drawable.jadx_deobf_0x00000585);
i();
} else if (i >= 19 && i < 24) {
this.v.setBackgroundResource(R.drawable.jadx_deobf_0x00000587);
j();
} else if (i >= 0 && i < 5) {
this.v.setBackgroundResource(R.drawable.jadx_deobf_0x0000058b);
j();
}
}
private void i() {
this.L.setBackgroundResource(R.color.jadx_deobf_0x00000f8a);
this.M.setBackgroundResource(R.drawable.jadx_deobf_0x0000058d);
this.w.setBackgroundResource(R.drawable.jadx_deobf_0x00000586);
this.u.setBackgroundResource(0);
this.u.setVisibility(8);
}
private void j() {
this.L.setBackgroundResource(R.color.jadx_deobf_0x00000f8c);
this.M.setBackgroundResource(R.drawable.jadx_deobf_0x0000058e);
this.w.setBackgroundResource(R.drawable.jadx_deobf_0x0000058a);
this.u.setVisibility(0);
}
public void k() {
this.u = null;
this.w = null;
this.B.setVisibility(8);
}
@Override
public void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putInt("last_list_pos", this.r);
bundle.putInt("last_list_offset", this.s);
}
@Override
public void onPause() {
super.onPause();
this.n.a((esk) null);
this.r = this.N.getFirstVisiblePosition();
View childAt = this.N.getChildAt(0);
this.s = childAt != null ? childAt.getTop() : 0;
if (this.ai != null) {
this.ai.dismiss();
this.ai = null;
}
}
@Override
protected void onResume() {
super.onResume();
if (eys.h(getApplicationContext())) {
finish();
hwn.a((Activity) this);
r();
eys.e(getApplicationContext(), false);
return;
}
p();
if (Build.VERSION.SDK_INT >= 19 && !hzl.d()) {
l();
} else {
e();
}
if (hzl.a(this)) {
this.n.a(this.h);
exu.d(this);
}
this.o.removeCallbacks(this.as);
this.o.postDelayed(this.as, 5000L);
}
private void l() {
equ equVar = new equ(this);
eqv eqvVar = new eqv(this);
this.ah.b(getString(R.string.jadx_deobf_0x00002508), getString(R.string.jadx_deobf_0x00002553));
if (!hzl.a(this) && !hzl.d()) {
this.ah.setVisibility(0);
this.ah.setOnSpanClickListener(equVar);
return;
}
if (!hzl.e() && !eys.a(getApplicationContext())) {
this.ah.setVisibility(0);
this.ah.setOnSpanClickListener(eqvVar);
} else {
if (!this.d && hyp.c() && !eyt.a(getApplicationContext()).s()) {
eqw eqwVar = new eqw(this);
this.ah.a(getString(R.string.jadx_deobf_0x00002556), getString(R.string.jadx_deobf_0x00002555));
this.ah.setOnSpanClickListener(eqwVar);
this.ah.setVisibility(0);
return;
}
this.ah.setVisibility(8);
}
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
if (i == 1) {
if (i2 == -1 || efq.a(this)) {
this.n.a(this.h);
ewu.a(getApplicationContext()).c();
ewu.a(getApplicationContext()).r();
eyt.a(this).c(false);
if (this.ah.getVisibility() == 0) {
this.ah.setVisibility(8);
}
B();
exu.bi(this);
return;
}
ewu.a(getApplicationContext()).e();
exu.bj(this);
return;
}
if (i == 4) {
if (i2 == -1 || efq.a(this)) {
iaw.a(this, getString(R.string.jadx_deobf_0x000024f4), R.drawable.mms_icon, ConversationList.class.getName());
ewu.a(getApplicationContext()).c();
ewu.a(getApplicationContext()).r();
if (this.ah.getVisibility() == 0) {
this.ah.setVisibility(8);
}
exu.bi(this);
return;
}
exu.bj(this);
}
}
private void m() {
this.ac = (ImageView) findViewById(R.id.jadx_deobf_0x000016a7);
this.ac.setOnClickListener(this);
findViewById(R.id.jadx_deobf_0x000016a9).setOnClickListener(this);
this.A = findViewById(R.id.jadx_deobf_0x000010fd);
this.z = findViewById(R.id.jadx_deobf_0x0000167b);
this.t = (ImageView) findViewById(R.id.jadx_deobf_0x00001680);
this.N = (SwipeListView) findViewById(R.id.jadx_deobf_0x000010fc);
this.N.setEmptyView(findViewById(R.id.jadx_deobf_0x00001549));
this.N.setOnKeyListener(this.k);
this.N.setOnItemClickListener(this);
this.N.setOnItemLongClickListener(this);
this.N.setSwipeListViewStatusListener(this);
this.N.setOnScrollListener(new eqx(this));
this.t.setOnClickListener(this);
findViewById(R.id.jadx_deobf_0x000016aa).setOnClickListener(this);
this.C = (CheckBox) findViewById(R.id.jadx_deobf_0x000016ac);
this.C.setOnCheckedChangeListener(this);
this.D = findViewById(R.id.jadx_deobf_0x0000167d);
this.E = findViewById(R.id.jadx_deobf_0x00001672);
this.E.setOnClickListener(this);
this.F = findViewById(R.id.jadx_deobf_0x00001674);
this.F.setOnClickListener(this);
this.G = findViewById(R.id.jadx_deobf_0x00001676);
this.G.setOnClickListener(this);
this.H = (TextView) findViewById(R.id.jadx_deobf_0x00001673);
this.I = (TextView) findViewById(R.id.jadx_deobf_0x00001675);
this.J = (TextView) findViewById(R.id.jadx_deobf_0x00001677);
this.K = (RelativeLayout) findViewById(R.id.jadx_deobf_0x00001679);
this.ah = (MmsGuideTipsView) findViewById(R.id.jadx_deobf_0x0000167c);
}
public void a(String str) {
this.Z.getFilter().filter(str, new eqy(this));
}
private void n() {
this.n = new esj(this, null);
this.n.a(this.h);
this.N.setAdapter((ListAdapter) this.n);
this.N.setRecyclerListener(this.n);
}
private void b(boolean z) {
this.D.setEnabled(z);
this.E.setEnabled(z);
this.G.setEnabled(z);
this.F.setEnabled(z);
}
public void o() {
TextView textView = (TextView) findViewById(R.id.jadx_deobf_0x0000154a);
textView.setText(Html.fromHtml(getString(R.string.jadx_deobf_0x0000251f)));
textView.setOnClickListener(this);
}
@Override
protected void onNewIntent(Intent intent) {
if (ico.a(intent, "extra.from", -1) == 41) {
exb.a(this, false);
}
this.am = intent;
if (this.am != null && bzv.a(this).d(this.am)) {
bzv.a(this).a(this.am);
this.an = ico.a(this.am, "extra.from", -1);
}
}
@Override
public void onStart() {
super.onStart();
ekp.a(getApplicationContext(), 239);
exj.c().a(this);
this.p = true;
if (this.l != -10) {
this.N.getViewTreeObserver().addOnGlobalLayoutListener(this.ao);
}
getContentResolver().registerContentObserver(emf.a, true, this.ap);
icn.a(this, this.aq, new IntentFilter("com.dianxinos.optimizer.action_conversation_spam_item_refresh"));
egg.a(this.au);
hti.a().b(new era(this));
this.g = 0;
}
@Override
protected void onStop() {
super.onStop();
exj.c().b(this);
s();
getContentResolver().unregisterContentObserver(this.ap);
if (this.aq != null) {
unregisterReceiver(this.aq);
}
egg.b(this.au);
}
@Override
public void a(long j, boolean z) {
this.m.post(new erb(this, j, z));
}
public void p() {
try {
egn.b(this.m, 1805);
} catch (SQLiteException e2) {
a.a(this, e2);
}
}
@Override
@TargetApi(14)
public boolean onSearchRequested() {
if (this.q != null) {
this.q.expandActionView();
return true;
}
return true;
}
private void q() {
Intent a2 = ComposeMessageActivity.a(this, 0L);
a2.putExtra("extra_comes_from_create_new_message", true);
b(a2);
}
private void a(long j) {
if (j == -1) {
b(new Intent(this, (Class<?>) SpamSmsRecordsActivity.class));
exu.w(this);
} else {
Intent a2 = ComposeMessageActivity.a(this, j);
a2.putExtra("extra_comes_from_list", true);
b(a2);
}
}
public void r() {
Intent intent = new Intent(getApplicationContext(), (Class<?>) ConversationList.class);
intent.putExtra("extra_entry_from", 3);
startActivity(intent);
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
}
private void a(long j, int i, AsyncQueryHandler asyncQueryHandler) {
if (egt.c(this, j)) {
p();
}
ekp.b(this, -2L, false);
egn.a(getApplicationContext()).a(asyncQueryHandler, j, i, 1807);
}
private void a(HashSet<Long> hashSet, AsyncQueryHandler asyncQueryHandler) {
if (hashSet.contains(-1L)) {
if (bbk.a().b(this).f() > 0) {
bbk.a().b(this).g();
}
hashSet.remove(-1L);
}
if (hashSet.contains(-2L)) {
hashSet.remove(-2L);
if (this.S != null && !this.S.isEmpty()) {
hashSet.addAll(this.S);
eyt.a(this).d(0L);
}
}
if (hashSet.isEmpty()) {
p();
return;
}
a(hashSet);
ekp.b(this, -2L, false);
egn.a(getApplicationContext()).a(asyncQueryHandler, hashSet, 1807);
}
private void a(HashSet<Long> hashSet) {
if (egt.a(this, hashSet)) {
p();
}
}
public void a(egs egsVar, long j, Activity activity) {
ArrayList arrayList = null;
if (j != -1) {
arrayList = new ArrayList();
arrayList.add(Long.valueOf(j));
}
a(arrayList, activity, egsVar, false, false, this.R, new erc(this));
}
public static void a(Collection<Long> collection, Activity activity, egs egsVar, boolean z, boolean z2, Collection<Long> collection2, Runnable... runnableArr) {
ewf ewfVar = new ewf(activity);
ewfVar.setTitle(R.string.jadx_deobf_0x00002932);
ewfVar.a(R.drawable.jadx_deobf_0x000005a8, R.dimen.jadx_deobf_0x00000c6c, R.dimen.jadx_deobf_0x00000c69);
ewfVar.a(R.string.jadx_deobf_0x00002252);
CheckBox a2 = ewfVar.a(false, R.string.jadx_deobf_0x0000250c);
if (!z && !z2) {
a2.setVisibility(8);
} else if (z2 && z) {
a2.setVisibility(0);
ewfVar.a(false, R.string.jadx_deobf_0x0000250b);
} else if (z && collection.size() == 1) {
a2.setVisibility(8);
a2.setChecked(true);
ewfVar.a(R.string.jadx_deobf_0x0000250a);
} else if (z2 && collection.size() == 1) {
a2.setVisibility(8);
a2.setChecked(true);
ewfVar.a(R.string.jadx_deobf_0x0000250d);
} else if (z) {
a2.setVisibility(0);
ewfVar.a(false, R.string.jadx_deobf_0x0000250c);
} else if (z2) {
a2.setVisibility(0);
ewfVar.a(false, R.string.jadx_deobf_0x0000250e);
}
ewfVar.a(R.string.jadx_deobf_0x00002cd9, new erd(collection, a2, z, collection2, z2, activity, runnableArr, egsVar));
ewfVar.b(R.string.jadx_deobf_0x00002709, null);
ewfVar.show();
}
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
Log.i("ConversationList", "checked:" + z);
if (compoundButton.getId() == R.id.jadx_deobf_0x000016ac) {
esj esjVar = (esj) ((HeaderViewListAdapter) this.N.getAdapter()).getWrappedAdapter();
this.f.clear();
this.O.clear();
this.P.clear();
this.Q.clear();
String charSequence = this.C.getText().toString();
if ((z && !getResources().getString(R.string.jadx_deobf_0x0000255a).equals(charSequence)) || getResources().getString(R.string.jadx_deobf_0x0000253b).equals(charSequence)) {
Cursor cursor = esjVar.getCursor();
if (cursor != null) {
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
egn a2 = egn.a((Context) this, cursor, false);
long d = a2.d();
this.f.add(Long.valueOf(d));
if (a2.l()) {
this.Q.add(Long.valueOf(d));
}
ContactList g = a2.g();
if (g.size() > 1) {
this.O.add(Long.valueOf(d));
} else if (g.size() == 1) {
this.P.add(g.get(0).f());
}
cursor.moveToNext();
}
}
this.C.setText(R.string.jadx_deobf_0x0000255a);
} else {
this.C.setText(R.string.jadx_deobf_0x0000253b);
}
((TextView) findViewById(R.id.jadx_deobf_0x000016ab)).setText(String.format(getResources().getString(R.string.jadx_deobf_0x00002558), Integer.valueOf(this.f.size())));
b();
esjVar.a(this.f);
esjVar.notifyDataSetChanged();
}
}
public void a(Runnable runnable, int i) {
View childAt = this.N.getChildAt(i - this.N.getFirstVisiblePosition());
if (childAt != null && (childAt instanceof ejy)) {
((ejy) childAt).a(new ere(this, childAt, i, runnable));
}
}
private void d(ejy ejyVar, int i) {
ewf ewfVar = new ewf(this);
ewfVar.setTitle(R.string.jadx_deobf_0x00002932);
ewfVar.a(R.drawable.jadx_deobf_0x000005a8, R.dimen.jadx_deobf_0x00000c6c, R.dimen.jadx_deobf_0x00000c69);
ewfVar.a(R.string.jadx_deobf_0x00002232);
ewfVar.a(0, new erf(this, ewfVar, ejyVar, i));
ewfVar.b(0, new erh(this, ewfVar, ejyVar));
ewfVar.show();
}
public static void b(Context context) {
hti.a().a(new eri(context), 4);
efs.c(context);
exu.x(context);
}
private void a(int i) {
ewf ewfVar = new ewf(this);
ewfVar.setTitle(R.string.jadx_deobf_0x00002932);
ewfVar.a(R.drawable.jadx_deobf_0x000005a8, R.dimen.jadx_deobf_0x00000c6c, R.dimen.jadx_deobf_0x00000c69);
ewfVar.a(R.string.jadx_deobf_0x00002231);
ewfVar.a(0, new erj(this, ewfVar, i));
ewfVar.b(0, new erk(this, ewfVar, i));
ewfVar.show();
}
public void b(int i) {
a(new esh(this, this.N.getItemIdAtPosition(i)), i);
}
public void a(String str, Object... objArr) {
Log.d("ConversationList", "[" + Thread.currentThread().getId() + "] " + String.format(str, objArr));
}
public void s() {
if (this.y) {
this.y = false;
this.N.setForbidSwipe(false);
esj esjVar = (esj) ((HeaderViewListAdapter) this.N.getAdapter()).getWrappedAdapter();
esjVar.a(false);
this.A.setVisibility(0);
this.z.setVisibility(8);
this.t.setVisibility(0);
this.D.setVisibility(8);
this.Q.clear();
this.f.clear();
this.O.clear();
this.P.clear();
this.X.setEnabled(true);
esjVar.a(this.f);
esjVar.notifyDataSetChanged();
}
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id == R.id.jadx_deobf_0x000016aa) {
s();
return;
}
if (id == R.id.jadx_deobf_0x00001680) {
q();
exu.g(this);
return;
}
if (id == R.id.jadx_deobf_0x000016a9) {
if (this.ad.getVisibility() == 0) {
x();
}
this.N.l();
Intent intent = new Intent(getApplicationContext(), (Class<?>) SettingActivity.class);
intent.putExtra("extra.from", this.an);
a(intent);
exu.t(this);
return;
}
if (id == R.id.jadx_deobf_0x00001672) {
boolean contains = this.f.contains(-2L);
boolean contains2 = this.f.contains(-1L);
if (!this.f.isEmpty()) {
a(this.f, this, this.m, contains, contains2, this.R, new erm(this), new ern(this, contains));
exu.z(this);
return;
}
return;
}
if (id == R.id.jadx_deobf_0x00001674) {
a(this.Q, this.m);
s();
exu.A(this);
return;
}
if (id == R.id.jadx_deobf_0x00001676) {
if (!this.f.isEmpty()) {
boolean contains3 = this.f.contains(-2L);
boolean contains4 = this.f.contains(-1L);
if (!contains3 && !contains4 && this.O.isEmpty()) {
t();
}
exu.B(this);
return;
}
return;
}
if (id == R.id.jadx_deobf_0x0000164e) {
this.X.setText("");
return;
}
if (id == R.id.jadx_deobf_0x000016a7) {
w();
return;
}
if (id == R.id.jadx_deobf_0x0000154a) {
if (fzo.a(this).b()) {
this.ai = fzp.a(this, 2);
return;
}
Intent intent2 = new Intent(getApplicationContext(), (Class<?>) WebBrowserActivity.class);
intent2.putExtra("extra_url", "https://mshoujiweishi.baidu.com/appfaq/inbox");
intent2.putExtra("extra_title", getResources().getString(R.string.jadx_deobf_0x000016a0));
b(intent2);
return;
}
if (view == this.ae) {
x();
}
}
public void b() {
if (this.f.isEmpty()) {
this.E.setEnabled(false);
this.H.setCompoundDrawables(a(R.drawable.jadx_deobf_0x00000569, 70), null, null, null);
this.H.setEnabled(false);
this.F.setEnabled(false);
if (this.d) {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056b, 70), null, null, null);
} else {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056a, 70), null, null, null);
}
this.I.setEnabled(false);
} else {
this.F.setEnabled(true);
if (this.d) {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056b, ICloudScanCallback.CLOUDSCAN_STOP), null, null, null);
} else {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056a, ICloudScanCallback.CLOUDSCAN_STOP), null, null, null);
}
this.I.setEnabled(true);
this.E.setEnabled(true);
this.H.setCompoundDrawables(a(R.drawable.jadx_deobf_0x00000569, ICloudScanCallback.CLOUDSCAN_STOP), null, null, null);
this.H.setEnabled(true);
}
if (this.f.isEmpty() || this.f.contains(-2L) || this.f.contains(-1L) || !this.O.isEmpty()) {
this.G.setEnabled(false);
this.J.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056c, 70), null, null, null);
this.J.setEnabled(false);
} else {
this.G.setEnabled(true);
this.J.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056c, ICloudScanCallback.CLOUDSCAN_STOP), null, null, null);
this.J.setEnabled(true);
}
if (this.Q.isEmpty()) {
this.F.setEnabled(false);
if (this.d) {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056b, 70), null, null, null);
} else {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056a, 70), null, null, null);
}
this.I.setEnabled(false);
return;
}
this.F.setEnabled(true);
if (this.d) {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056b, ICloudScanCallback.CLOUDSCAN_STOP), null, null, null);
} else {
this.I.setCompoundDrawables(a(R.drawable.jadx_deobf_0x0000056a, ICloudScanCallback.CLOUDSCAN_STOP), null, null, null);
}
this.I.setEnabled(true);
}
private Drawable a(int i, int i2) {
Drawable drawable = getResources().getDrawable(i);
drawable.setAlpha(i2);
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
return drawable;
}
private void t() {
ewf ewfVar = new ewf(this);
CheckBox a2 = ewfVar.a(false, R.string.jadx_deobf_0x000020af);
ewfVar.setTitle(R.string.jadx_deobf_0x00002932);
ewfVar.a(R.drawable.jadx_deobf_0x000005a8, R.dimen.jadx_deobf_0x00000c6c, R.dimen.jadx_deobf_0x00000c69);
ewfVar.a(R.string.jadx_deobf_0x00001dca);
ewfVar.a(R.string.jadx_deobf_0x00002cd9, new ero(this, a2, ewfVar));
ewfVar.b(R.string.jadx_deobf_0x00002709, null);
ewfVar.show();
}
private void v() {
this.ad = (GridView) findViewById(R.id.jadx_deobf_0x00001684);
this.ae = findViewById(R.id.jadx_deobf_0x00001683);
this.ad.setAdapter((ListAdapter) new esf(this, getApplicationContext()));
this.ad.setOnItemClickListener(this);
this.ae.setOnClickListener(this);
this.af = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.jadx_deobf_0x00000b0c);
this.ag = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.jadx_deobf_0x00000b0b);
this.ag.setAnimationListener(new erq(this));
}
private void w() {
if (this.ad.getVisibility() == 0) {
x();
return;
}
this.ac.setImageResource(R.drawable.jadx_deobf_0x000005a2);
this.ae.setVisibility(0);
this.ad.setVisibility(0);
this.ad.startAnimation(this.af);
exu.e(this);
}
private void x() {
this.ac.setImageResource(R.drawable.jadx_deobf_0x0000059d);
this.ad.startAnimation(this.ag);
this.ae.setVisibility(8);
}
private void a(Intent intent) {
if (this.ad.getVisibility() == 0) {
this.o.postDelayed(new err(this, intent), 200L);
} else {
b(intent);
}
}
@Override
public void onBackPressed() {
this.g++;
if (this.y) {
s();
return;
}
if (!this.N.l()) {
if (!hzl.c() && eyt.a(this).n() && this.g <= 1 && !eys.a(getApplicationContext()) && bbl.a(getApplicationContext()).t() && eyt.a(this).m()) {
z();
return;
}
if (!bbl.a(getApplicationContext()).t() && this.g <= 1 && !eyt.a(this).m()) {
if (Build.VERSION.SDK_INT >= 19) {
if (!hzl.a(getApplicationContext())) {
efq.a(this, 1);
if (!eyt.a(getApplicationContext()).m()) {
eyt.a(getApplicationContext()).e(true);
return;
}
return;
}
return;
}
A();
return;
}
C();
}
}
@Override
public void l_() {
}
@Override
public void a(ejy ejyVar, int i) {
if (ejyVar instanceof ConversationListItem) {
b(i);
} else if (ejyVar instanceof ConversationListSpamView) {
d(ejyVar, i);
} else if (ejyVar instanceof ConversationListNotificationItem) {
a(i);
}
}
@Override
public void b(ejy ejyVar, int i) {
if (ejyVar instanceof ConversationListItem) {
a(this.N.getItemIdAtPosition(i), i, this.m);
return;
}
if ((ejyVar instanceof ConversationListNotificationItem) && this.S != null && !this.S.isEmpty()) {
HashSet<Long> hashSet = this.S;
this.S = null;
a(hashSet, this.m);
eyt.a(this).d(0L);
return;
}
if (ejyVar instanceof ConversationListSpamView) {
bbk.a().b(this).g();
p();
exu.y(getApplicationContext());
}
}
@Override
public void c(ejy ejyVar, int i) {
long itemIdAtPosition = this.N.getItemIdAtPosition(i);
if (this.l == -10 || itemIdAtPosition == this.l) {
this.l = -10L;
a(itemIdAtPosition, i, this.m);
}
}
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long j) {
if (i == 0) {
return true;
}
if (this.y) {
return false;
}
this.y = true;
this.N.setForbidSwipe(true);
this.f = new HashSet<>();
this.A.setVisibility(8);
this.z.setVisibility(0);
this.t.setVisibility(8);
this.D.setVisibility(0);
b(true);
HeaderViewListAdapter headerViewListAdapter = (HeaderViewListAdapter) this.N.getAdapter();
this.X.setEnabled(false);
esj esjVar = (esj) headerViewListAdapter.getWrappedAdapter();
esjVar.a(true);
long itemId = this.n.getItemId(i - 1);
egn a2 = egn.a((Context) this, itemId, true);
this.f.add(Long.valueOf(itemId));
a2.e(true);
((TextView) findViewById(R.id.jadx_deobf_0x000016ab)).setText(getString(R.string.jadx_deobf_0x00002558, new Object[]{Integer.valueOf(this.f.size())}));
int size = a2.g().size();
if (size == 1) {
this.P.add(a2.g().get(0).f());
} else if (size > 1) {
this.O.add(Long.valueOf(itemId));
}
if (a2.l()) {
this.Q.add(Long.valueOf(itemId));
}
b();
esjVar.a(this.f);
if (this.f.size() != esjVar.getCount()) {
this.C.setText(R.string.jadx_deobf_0x0000253b);
} else {
this.C.setText(R.string.jadx_deobf_0x0000255a);
}
esjVar.notifyDataSetChanged();
return true;
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
Intent intent;
int id = adapterView.getId();
if (id == R.id.jadx_deobf_0x00001682) {
long j2 = ((Cursor) this.Z.getItem(i)).getLong(0);
Intent a2 = ComposeMessageActivity.a(getApplicationContext(), exo.a(this, j2, 1L));
a2.putExtra("listview_position_id", j2);
b(a2);
return;
}
if (id == R.id.jadx_deobf_0x00001684) {
x();
int intValue = ((Integer) adapterView.getAdapter().getItem(i)).intValue();
if (intValue == R.drawable.jadx_deobf_0x0000059f) {
intent = ClassifyMessageActivity.a(this, "exchange_code");
exu.U(this);
} else if (intValue == R.drawable.jadx_deobf_0x0000059e) {
intent = ClassifyMessageActivity.a(this, "temp_bill");
exu.X(this);
} else if (intValue == R.drawable.jadx_deobf_0x000005a1) {
intent = ClassifyMessageActivity.a(this, "telephone_bill");
exu.f(this);
} else if (intValue == R.drawable.jadx_deobf_0x000005a4) {
intent = ClassifyMessageActivity.a(this, "validation_code");
exu.q(this);
} else if (intValue != R.drawable.jadx_deobf_0x000005a3) {
intent = null;
} else {
intent = new Intent(this, (Class<?>) SpamSmsRecordsActivity.class);
exu.r(this);
}
a(intent);
return;
}
if (i != 0) {
long itemId = this.n.getItemId(i - 1);
egn a3 = egn.a((Context) this, itemId, true);
if (!this.y) {
if (itemId == -2) {
b(new Intent(this, (Class<?>) NotifiConversationList.class));
exu.v(getApplicationContext());
return;
} else {
a(itemId);
return;
}
}
if (this.f.contains(Long.valueOf(itemId))) {
this.f.remove(Long.valueOf(itemId));
if (this.O.contains(Long.valueOf(itemId))) {
this.O.remove(Long.valueOf(itemId));
}
if (this.f.isEmpty() && this.D.isEnabled()) {
b(false);
}
if (!this.P.isEmpty() && !a3.g().isEmpty()) {
String f = a3.g().get(0).f();
if (this.P.contains(f)) {
this.P.remove(f);
}
}
if (this.Q.contains(Long.valueOf(itemId))) {
this.Q.remove(Long.valueOf(itemId));
}
a3.e(false);
} else {
if (a3.g().size() == 1) {
this.P.add(a3.g().get(0).f());
}
if (a3.g().size() > 1) {
this.O.add(Long.valueOf(itemId));
}
if (a3.l()) {
this.Q.add(Long.valueOf(itemId));
}
this.f.add(Long.valueOf(itemId));
if (!this.D.isEnabled()) {
b(true);
}
a3.e(true);
}
((TextView) findViewById(R.id.jadx_deobf_0x000016ab)).setText(String.format(getResources().getString(R.string.jadx_deobf_0x00002558), Integer.valueOf(this.f.size())));
b();
this.n.a(this.f);
if (this.f.size() != this.n.getCount()) {
this.C.setText(R.string.jadx_deobf_0x0000253b);
} else {
this.C.setText(R.string.jadx_deobf_0x0000255a);
}
this.n.notifyDataSetChanged();
}
}
public void y() {
s();
egn.b(this);
ekp.b(this, -2L, false);
ekp.b(this);
p();
}
public void a(Context context, boolean z, int i) {
if (this.U != null && this.U.isShowing()) {
this.U.cancel();
this.U = null;
}
if (z) {
this.U = new hum(context, true);
this.U.a(i);
this.U.setCancelable(true);
this.U.show();
}
}
private void z() {
ewf ewfVar = new ewf(this);
CheckBox a2 = ewfVar.a(false, R.string.jadx_deobf_0x00002274);
if (Build.VERSION.SDK_INT >= 19) {
a2.setChecked(true);
a2.setVisibility(8);
}
ewfVar.setTitle(R.string.jadx_deobf_0x00002511);
ewfVar.a(R.drawable.jadx_deobf_0x000005a8, R.dimen.jadx_deobf_0x00000c6c, R.dimen.jadx_deobf_0x00000c69);
ewfVar.a(R.string.jadx_deobf_0x000020ae);
ewfVar.a(R.string.jadx_deobf_0x000020ac, new ers(this));
ewfVar.b(R.string.jadx_deobf_0x00002717, new ert(this, a2));
ewfVar.show();
exu.aU(getApplicationContext());
}
private void A() {
ewf ewfVar = new ewf(this);
ewfVar.setTitle(R.string.jadx_deobf_0x00002511);
ewfVar.a(R.drawable.jadx_deobf_0x000005a8, R.dimen.jadx_deobf_0x00000c6c, R.dimen.jadx_deobf_0x00000c69);
ewfVar.a(R.string.jadx_deobf_0x00002528);
ewfVar.a(R.string.jadx_deobf_0x000027ba, new eru(this, ewfVar));
ewfVar.b(R.string.jadx_deobf_0x000027b9, new erv(this, ewfVar));
ewfVar.show();
exu.at(this);
}
public void B() {
if (this.am != null) {
bzv.a(this).b(this.am);
}
}
public void C() {
if (!eyt.a(this).m()) {
eyt.a(this).e(true);
}
if (this.T == 2 || this.T == 3 || this.T == 4) {
finish();
} else if (!ewu.a(getApplicationContext()).n() || !moveTaskToBack(true)) {
finish();
}
}
@Override
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i == 4) {
if (this.V.getVisibility() == 0 || this.aa.getVisibility() == 0) {
this.X.setText((CharSequence) null);
return true;
}
if (this.ad.getVisibility() == 0) {
x();
return true;
}
}
return super.onKeyDown(i, keyEvent);
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == 0) {
MessageUtils.a(this.X);
if (view.getId() == R.id.jadx_deobf_0x00001654) {
return true;
}
}
return false;
}
private void D() {
View inflate = LayoutInflater.from(this).inflate(R.layout.jadx_deobf_0x00000967, (ViewGroup) null);
this.X = (EditText) inflate.findViewById(R.id.jadx_deobf_0x00001657);
this.Y = inflate.findViewById(R.id.jadx_deobf_0x0000164e);
this.N.addHeaderView(inflate);
this.V = (ListView) findViewById(R.id.jadx_deobf_0x00001682);
this.aa = findViewById(R.id.jadx_deobf_0x00001654);
this.W = findViewById(R.id.jadx_deobf_0x00001681);
this.Z = new evk(this, null);
this.V.setAdapter((ListAdapter) this.Z);
this.X.addTextChangedListener(new erw(this, inflate));
this.X.setOnEditorActionListener(new erz(this));
this.Y.setOnClickListener(this);
this.V.setOnItemClickListener(this);
this.V.setOnTouchListener(this);
this.aa.setOnTouchListener(this);
}
}