百度手机卫士 v8.1.5版本的 MD5 值为:15af71eae74e2f2b5b9f845fe77a4804
以下内容为反编译后的 AppsSearchActivity.java 源代码,内容仅作参考
package com.dianxinos.optimizer.module.appmanager.appssearch;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.AutoCompleteTextView;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ScrollView;
import android.widget.TextView;
import com.baidu.sapi2.c.R;
import com.dianxinos.optimizer.module.appmanager.appssearch.mode.AppsSearchConfigItem;
import com.dianxinos.optimizer.module.toolbox.SafeToolBoxNewActivity;
import com.dianxinos.optimizer.ui.DXEmptyView;
import com.dianxinos.optimizer.ui.DXLoadingInside;
import dxoptimizer.akm;
import dxoptimizer.akn;
import dxoptimizer.ako;
import dxoptimizer.ayo;
import dxoptimizer.ayr;
import dxoptimizer.ayt;
import dxoptimizer.ayu;
import dxoptimizer.bap;
import dxoptimizer.bcm;
import dxoptimizer.bdg;
import dxoptimizer.cze;
import dxoptimizer.czf;
import dxoptimizer.czg;
import dxoptimizer.czh;
import dxoptimizer.czi;
import dxoptimizer.czj;
import dxoptimizer.czk;
import dxoptimizer.czm;
import dxoptimizer.czn;
import dxoptimizer.czo;
import dxoptimizer.czp;
import dxoptimizer.czq;
import dxoptimizer.czr;
import dxoptimizer.czs;
import dxoptimizer.czt;
import dxoptimizer.czu;
import dxoptimizer.dak;
import dxoptimizer.dao;
import dxoptimizer.dau;
import dxoptimizer.daz;
import dxoptimizer.dbe;
import dxoptimizer.dbf;
import dxoptimizer.dbg;
import dxoptimizer.dbj;
import dxoptimizer.dbk;
import dxoptimizer.hax;
import dxoptimizer.heg;
import dxoptimizer.hfk;
import dxoptimizer.hiz;
import dxoptimizer.hjz;
import dxoptimizer.hke;
import dxoptimizer.hki;
import dxoptimizer.hky;
import dxoptimizer.hlx;
import dxoptimizer.hnc;
import dxoptimizer.hnd;
import dxoptimizer.hnj;
import dxoptimizer.hnk;
import dxoptimizer.htp;
import dxoptimizer.hug;
import dxoptimizer.mc;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class AppsSearchActivity extends bap implements View.OnClickListener, ayu, dbf {
private static String N;
private static String O;
private static String P;
private String A;
private int B;
private boolean C;
private boolean I;
private Intent K;
private ArrayList L;
private dak M;
private daz a;
private GridView b;
private ImageView c;
private AutoCompleteTextView d;
private ImageView e;
private ImageButton f;
private dau g;
private DXEmptyView h;
private DXLoadingInside j;
private View k;
private TextView l;
private View m;
private ListView n;
private View o;
private View p;
private TextView q;
private TextView r;
private TextView s;
private ScrollView t;
private mc u;
private ako v;
private dao w;
private List x;
private LayoutInflater y;
private hfk z;
private boolean D = true;
private boolean E = false;
private boolean F = false;
private boolean G = false;
private int H = 0;
private boolean J = true;
private Handler Q = new cze(this);
private BroadcastReceiver R = new czh(this);
public static int s(AppsSearchActivity appsSearchActivity) {
int i = appsSearchActivity.B;
appsSearchActivity.B = i + 1;
return i;
}
public List e() {
List b = this.a.b(this);
if (b.size() >= 1) {
this.q.setText(((dbg) b.remove(0)).a);
}
return b;
}
public void a(String str) {
if (!this.G) {
q();
}
a(dbk.a(this, str));
this.b.setVisibility(8);
this.p.setVisibility(8);
this.t.setVisibility(8);
this.j.setVisibility(8);
this.h.setVisibility(8);
if (this.x.size() == 0) {
this.o.setVisibility(0);
this.n.setVisibility(8);
} else {
this.o.setVisibility(8);
this.n.setVisibility(0);
}
if (this.D) {
h();
} else {
i();
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.jadx_deobf_0x00000777);
this.a = daz.a();
this.y = LayoutInflater.from(this);
String b = hnd.b(getIntent(), "search_word");
g();
j();
l();
f();
if (!TextUtils.isEmpty(b)) {
b(b);
}
ayo.a((Context) this).a((ayu) this);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("com.dianxinos.optimizer.action.APK_INSTALL_BG_S");
intentFilter.addAction("com.dianxinos.optimizer.action.APK_INSTALL_BG_F");
hnc.a(this, this.R, intentFilter);
}
private void f() {
hug b = hug.a(this.q, "alpha", 0.0f, 1.0f).b(500L);
hug b2 = hug.a(this.r, "alpha", 0.0f, 1.0f).b(1500L);
hug b3 = hug.a(this.s, "alpha", 0.0f, 1.0f).b(1000L);
htp htpVar = new htp();
htpVar.a(b, b2, b3);
htpVar.a();
}
private void g() {
this.b = (GridView) findViewById(R.id.jadx_deobf_0x0000108c);
this.c = (ImageView) findViewById(R.id.jadx_deobf_0x000010bc);
this.d = (AutoCompleteTextView) findViewById(R.id.jadx_deobf_0x000010be);
this.e = (ImageView) findViewById(R.id.jadx_deobf_0x000001c0);
this.f = (ImageButton) findViewById(R.id.jadx_deobf_0x000010bf);
this.n = (ListView) findViewById(R.id.jadx_deobf_0x00001088);
this.h = (DXEmptyView) findViewById(R.id.jadx_deobf_0x00000ef4);
this.j = (DXLoadingInside) findViewById(R.id.jadx_deobf_0x00001086);
this.o = findViewById(R.id.jadx_deobf_0x00001087);
this.p = findViewById(R.id.jadx_deobf_0x0000108b);
this.q = (TextView) findViewById(R.id.jadx_deobf_0x00001078);
this.r = (TextView) findViewById(R.id.jadx_deobf_0x00001079);
this.s = (TextView) findViewById(R.id.jadx_deobf_0x0000107a);
this.t = (ScrollView) findViewById(R.id.jadx_deobf_0x0000108a);
this.k = this.y.inflate(R.layout.jadx_deobf_0x000007d3, (ViewGroup) null);
this.l = (TextView) this.k.findViewById(R.id.jadx_deobf_0x000011e1);
this.m = this.k.findViewById(R.id.jadx_deobf_0x000011e0);
this.k.findViewById(R.id.jadx_deobf_0x000011df).setVisibility(8);
h();
this.c.setOnClickListener(this);
this.e.setOnClickListener(this);
this.f.setOnClickListener(this);
this.q.setOnClickListener(this);
this.r.setOnClickListener(this);
this.s.setOnClickListener(this);
k();
}
public void h() {
if (!this.F) {
this.n.addFooterView(this.k, null, false);
this.F = true;
}
}
private void i() {
if (this.F) {
this.n.removeFooterView(this.k);
this.F = false;
}
}
private void j() {
this.h.setOnClickListener(new czm(this));
this.n.setOnScrollListener(new czn(this));
this.n.setOnItemClickListener(new czo(this));
this.k.setOnClickListener(new czp(this));
this.b.setOnItemClickListener(new czq(this));
}
public void b(String str) {
this.E = true;
this.d.setText(str);
this.d.setSelection(str.length());
c(str);
b(true);
a(1, str, false);
}
private void k() {
this.L = new ArrayList();
this.d.setThreshold(0);
this.M = new dak(this, this.L);
this.d.setAdapter(this.M);
this.d.addTextChangedListener(new czr(this));
this.d.setOnItemClickListener(new czs(this));
this.d.setOnEditorActionListener(new czt(this));
}
public void a(ArrayList arrayList) {
this.L.clear();
this.L.addAll(arrayList);
this.M.notifyDataSetChanged();
this.d.setDropDownWidth(hke.b(this).widthPixels);
this.d.setDropDownVerticalOffset(getResources().getDimensionPixelOffset(R.dimen.jadx_deobf_0x00000a58));
}
private void l() {
this.A = "";
this.I = hax.l(this);
N = getResources().getString(R.string.jadx_deobf_0x000027a5);
O = getResources().getString(R.string.jadx_deobf_0x0000279b);
P = getResources().getString(R.string.jadx_deobf_0x00001cff);
this.x = new ArrayList();
this.u = new mc(this);
this.v = bcm.a(this);
this.g = new dau(this);
this.b.setAdapter((ListAdapter) this.g);
this.w = new dao(this, this.u, this.v, "appssearch");
this.w.a(this.I);
this.n.setAdapter((ListAdapter) this.w);
this.Q.obtainMessage(0).sendToTarget();
this.h.a(R.drawable.jadx_deobf_0x000002d1, R.string.jadx_deobf_0x00001f35);
heg.a().b(new czf(this));
}
@Override
protected void onResume() {
super.onResume();
heg.a().a(new czg(this));
}
@Override
public void onDestroy() {
super.onDestroy();
this.x.clear();
this.w.notifyDataSetChanged();
this.n.setAdapter((ListAdapter) null);
this.n.setOnItemClickListener(null);
ayo.a((Context) this).b(this);
unregisterReceiver(this.R);
bdg.a(this.v, "appssearch", this.w);
if (this.z != null && this.z.isShowing()) {
this.z.cancel();
this.z = null;
}
}
@Override
public void onClick(View view) {
if (view == this.c) {
finish();
return;
}
if (view == this.e) {
this.d.setText("");
q();
return;
}
if (view == this.f) {
m();
return;
}
if (view == this.q) {
String charSequence = this.q.getText().toString();
if (!TextUtils.isEmpty(charSequence)) {
b(charSequence);
return;
}
return;
}
if (view == this.r) {
c(true);
} else if (view == this.s) {
c(false);
}
}
public void m() {
String obj = this.d.getText().toString();
if (!TextUtils.isEmpty(obj)) {
this.G = false;
c(obj);
b(true);
a(1, obj, false);
hnj.a(this).a("as_kw", obj, (Number) 1);
}
}
public void c(String str) {
this.A = str;
this.B = 1;
}
public void b(boolean z) {
q();
this.x.clear();
this.Q.sendEmptyMessage(13);
p();
}
public void a(int i, int i2, String str) {
Message obtainMessage = this.Q.obtainMessage();
obtainMessage.what = i;
obtainMessage.arg1 = i2;
obtainMessage.obj = str;
this.Q.sendMessage(obtainMessage);
}
public void n() {
this.w.a(this.x);
}
@Override
public void a(dbe dbeVar) {
this.Q.obtainMessage(3, dbeVar).sendToTarget();
}
@Override
public void a(dbe dbeVar, boolean z, int i, int i2) {
JSONObject jSONObject;
JSONException e;
if (z) {
try {
jSONObject = new JSONObject();
try {
jSONObject.put("as_ap", dbeVar.n_());
jSONObject.put("as_af", dbeVar.d().source);
} catch (JSONException e2) {
e = e2;
e.printStackTrace();
hnj.a(this).a("am_dlf", jSONObject);
if (i != 3) {
} else {
return;
}
}
} catch (JSONException e3) {
jSONObject = null;
e = e3;
}
hnj.a(this).a("am_dlf", jSONObject);
}
if (i != 3 && i2 != 3) {
this.Q.obtainMessage(12, getString(R.string.jadx_deobf_0x000027a8, new Object[]{dbeVar.d().appName})).sendToTarget();
}
}
public void b(dbe dbeVar) {
if (this.w.a(dbeVar)) {
this.w.notifyDataSetChanged();
}
}
private synchronized void a(List list) {
JSONObject jSONObject;
this.D = list.size() == 10;
List o = o();
synchronized (this.x) {
Iterator it = list.iterator();
while (it.hasNext()) {
AppsSearchConfigItem appsSearchConfigItem = (AppsSearchConfigItem) it.next();
try {
jSONObject = new JSONObject();
try {
jSONObject.put("as_ap", appsSearchConfigItem.pkgName);
jSONObject.put("as_af", appsSearchConfigItem.source);
} catch (JSONException e) {
e = e;
e.printStackTrace();
hnj.a(this).a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
} catch (JSONException e2) {
e = e2;
jSONObject = null;
}
hnj.a(this).a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
}
n();
}
private void a(AppsSearchConfigItem appsSearchConfigItem, List list) {
dbe dbeVar = new dbe(appsSearchConfigItem, "appssearch", this);
this.x.add(dbeVar);
this.Q.sendEmptyMessage(13);
a(dbeVar, list);
}
public void b(List list) {
Iterator it = this.x.iterator();
while (it.hasNext()) {
a((dbe) it.next(), list);
}
this.Q.sendEmptyMessage(13);
}
private void a(dbe dbeVar, List list) {
boolean z;
Iterator it = list.iterator();
while (true) {
if (!it.hasNext()) {
z = false;
break;
}
akn aknVar = (akn) it.next();
if (aknVar.b.equals(dbeVar.n_())) {
dbeVar.b_(aknVar.n);
if (dbeVar.e()) {
this.v.a("appssearch", dbeVar.n_(), dbeVar);
}
dbeVar.c(bdg.a(aknVar.f, aknVar.o));
dbeVar.d(aknVar.e);
z = true;
}
}
if (!z && hky.g(this, dbeVar.n_())) {
dbeVar.b_(6);
}
}
public List o() {
return this.v.b("appssearch");
}
private void p() {
((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(this.d.getWindowToken(), 0);
}
private void q() {
a(new ArrayList());
}
public void a(int i, String str, boolean z) {
if (!hlx.c(str)) {
if (!hki.c(this) && (i == 3 || (i == 1 && !z))) {
this.Q.sendEmptyMessage(6);
} else {
new czu(this, i, str, z).start();
}
}
}
public void c(boolean z) {
Intent intent = new Intent();
intent.setClass(this, SafeToolBoxNewActivity.class);
intent.putExtra("tb_tab_mode", z ? "toolbox_exchange_application" : "toolbox_exchange_game");
if (hjz.a(this, intent)) {
startActivity(intent);
} else {
hnk.a(this, R.string.jadx_deobf_0x00001f2a, 0);
}
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 100 && i2 == 1000) {
String b = hnd.b(intent, "extra.pkg");
for (dbe dbeVar : this.x) {
if (dbeVar != null && dbeVar.n_().equals(b)) {
dbeVar.j();
}
}
}
}
@Override
public void a(ayt aytVar) {
if (aytVar != null && (aytVar instanceof ayr)) {
ayr ayrVar = (ayr) aytVar;
String str = ayrVar.a;
switch (ayrVar.c) {
case 2:
a(str, true);
b(aytVar);
return;
case 3:
case 4:
a(str, false);
b(aytVar);
return;
default:
return;
}
}
}
private void b(ayt aytVar) {
if (((ayr) aytVar).a.equals("com.baidu.appsearch")) {
if (this.K != null && hjz.a(this, this.K)) {
startActivity(this.K);
}
hnj.a(this).a("am_as", "as_l_if", (Number) 1);
}
}
private void a(String str, boolean z) {
runOnUiThread(new czi(this, str, z));
}
public void a(boolean z) {
this.Q.obtainMessage(15, Boolean.valueOf(z)).sendToTarget();
}
public void d(boolean z) {
if (z) {
this.z = new hfk(this, getResources().getString(R.string.jadx_deobf_0x00001d14));
this.z.setCancelable(true);
this.z.setOnCancelListener(new czj(this));
this.z.show();
return;
}
if (this.z != null && this.z.isShowing()) {
this.z.cancel();
}
}
public void a(Intent intent) {
this.K = intent;
dbj.a(this).a(this, r(), new czk(this));
}
public akm r() {
akm akmVar = new akm();
akmVar.a = "appssearch";
akmVar.b = "com.baidu.appsearch";
akmVar.c = getResources().getString(R.string.jadx_deobf_0x00001cff);
akmVar.e = 16785259;
akmVar.d = "6.3.1";
akmVar.f = 6297462L;
akmVar.g = "http://dxurl.cn/own/yhds/gaosuxiazai";
akmVar.h = "http://dxurl.cn/bd/appsearch_android/icon";
akmVar.j = hiz.l;
return akmVar;
}
}