百度手机卫士 v8.4.5版本的 MD5 值为:c65ef854a40bb6200c4d8c4603c58403
以下内容为反编译后的 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 cn.opda.a.phonoalbumshoushou.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.aky;
import dxoptimizer.akz;
import dxoptimizer.ala;
import dxoptimizer.aww;
import dxoptimizer.awz;
import dxoptimizer.axb;
import dxoptimizer.axc;
import dxoptimizer.ayv;
import dxoptimizer.bbb;
import dxoptimizer.bbv;
import dxoptimizer.cvw;
import dxoptimizer.cvx;
import dxoptimizer.cvy;
import dxoptimizer.cvz;
import dxoptimizer.cwa;
import dxoptimizer.cwb;
import dxoptimizer.cwc;
import dxoptimizer.cwe;
import dxoptimizer.cwf;
import dxoptimizer.cwg;
import dxoptimizer.cwh;
import dxoptimizer.cwi;
import dxoptimizer.cwj;
import dxoptimizer.cwk;
import dxoptimizer.cwl;
import dxoptimizer.cwm;
import dxoptimizer.cxc;
import dxoptimizer.cxg;
import dxoptimizer.cxm;
import dxoptimizer.cxr;
import dxoptimizer.cxw;
import dxoptimizer.cxx;
import dxoptimizer.cxy;
import dxoptimizer.cyb;
import dxoptimizer.cyc;
import dxoptimizer.hhc;
import dxoptimizer.hkn;
import dxoptimizer.hlr;
import dxoptimizer.hpg;
import dxoptimizer.hqf;
import dxoptimizer.hqk;
import dxoptimizer.hqo;
import dxoptimizer.hrf;
import dxoptimizer.hsf;
import dxoptimizer.htl;
import dxoptimizer.htm;
import dxoptimizer.hts;
import dxoptimizer.htt;
import dxoptimizer.hzo;
import dxoptimizer.iaf;
import dxoptimizer.mo;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class AppsSearchActivity extends ayv implements View.OnClickListener, axc, cxx {
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 cxc M;
private cxr a;
private GridView b;
private ImageView c;
private AutoCompleteTextView d;
private ImageView e;
private ImageButton f;
private cxm 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 mo u;
private ala v;
private cxg w;
private List x;
private LayoutInflater y;
private hlr 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 cvw(this);
private BroadcastReceiver R = new cvz(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(((cxy) b.remove(0)).a);
}
return b;
}
public void a(String str) {
if (!this.G) {
q();
}
a(cyc.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_0x000007e3);
this.a = cxr.a();
this.y = LayoutInflater.from(this);
String b = htm.b(getIntent(), "search_word");
g();
j();
l();
f();
if (!TextUtils.isEmpty(b)) {
b(b);
}
aww.a((Context) this).a((axc) 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");
htl.a(this, this.R, intentFilter);
}
private void f() {
iaf b = iaf.a(this.q, "alpha", 0.0f, 1.0f).b(500L);
iaf b2 = iaf.a(this.r, "alpha", 0.0f, 1.0f).b(1500L);
iaf b3 = iaf.a(this.s, "alpha", 0.0f, 1.0f).b(1000L);
hzo hzoVar = new hzo();
hzoVar.a(b, b2, b3);
hzoVar.a();
}
private void g() {
this.b = (GridView) findViewById(R.id.jadx_deobf_0x00001174);
this.c = (ImageView) findViewById(R.id.jadx_deobf_0x000011a9);
this.d = (AutoCompleteTextView) findViewById(R.id.jadx_deobf_0x000011ab);
this.e = (ImageView) findViewById(R.id.jadx_deobf_0x000001d3);
this.f = (ImageButton) findViewById(R.id.jadx_deobf_0x000011ac);
this.n = (ListView) findViewById(R.id.jadx_deobf_0x00001170);
this.h = (DXEmptyView) findViewById(R.id.jadx_deobf_0x0000100e);
this.j = (DXLoadingInside) findViewById(R.id.jadx_deobf_0x0000116e);
this.o = findViewById(R.id.jadx_deobf_0x0000116f);
this.p = findViewById(R.id.jadx_deobf_0x00001173);
this.q = (TextView) findViewById(R.id.jadx_deobf_0x00001160);
this.r = (TextView) findViewById(R.id.jadx_deobf_0x00001161);
this.s = (TextView) findViewById(R.id.jadx_deobf_0x00001162);
this.t = (ScrollView) findViewById(R.id.jadx_deobf_0x00001172);
this.k = this.y.inflate(R.layout.jadx_deobf_0x00000849, (ViewGroup) null);
this.l = (TextView) this.k.findViewById(R.id.jadx_deobf_0x000012f6);
this.m = this.k.findViewById(R.id.jadx_deobf_0x000012f5);
this.k.findViewById(R.id.jadx_deobf_0x000012f4).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 cwe(this));
this.n.setOnScrollListener(new cwf(this));
this.n.setOnItemClickListener(new cwg(this));
this.k.setOnClickListener(new cwh(this));
this.b.setOnItemClickListener(new cwi(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 cxc(this, this.L);
this.d.setAdapter(this.M);
this.d.addTextChangedListener(new cwj(this));
this.d.setOnItemClickListener(new cwk(this));
this.d.setOnEditorActionListener(new cwl(this));
}
public void a(ArrayList arrayList) {
this.L.clear();
this.L.addAll(arrayList);
this.M.notifyDataSetChanged();
this.d.setDropDownWidth(hqk.b(this).widthPixels);
this.d.setDropDownVerticalOffset(getResources().getDimensionPixelOffset(R.dimen.jadx_deobf_0x00000af8));
}
private void l() {
this.A = "";
this.I = hhc.j(this);
N = getResources().getString(R.string.jadx_deobf_0x000029fe);
O = getResources().getString(R.string.jadx_deobf_0x000029f3);
P = getResources().getString(R.string.jadx_deobf_0x00001e78);
this.x = new ArrayList();
this.u = new mo(this);
this.v = bbb.a(this);
this.g = new cxm(this);
this.b.setAdapter((ListAdapter) this.g);
this.w = new cxg(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_0x0000030e, R.string.jadx_deobf_0x000020cb);
hkn.a().b(new cvx(this));
}
@Override
protected void onResume() {
super.onResume();
hkn.a().a(new cvy(this));
}
@Override
public void onDestroy() {
super.onDestroy();
this.x.clear();
this.w.notifyDataSetChanged();
this.n.setAdapter((ListAdapter) null);
this.n.setOnItemClickListener(null);
aww.a((Context) this).b(this);
unregisterReceiver(this.R);
bbv.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);
hts.a(this);
hts.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(cxw cxwVar) {
this.Q.obtainMessage(3, cxwVar).sendToTarget();
}
@Override
public void a(cxw cxwVar, boolean z, int i, int i2) {
JSONObject jSONObject;
JSONException e;
if (z) {
try {
jSONObject = new JSONObject();
} catch (JSONException e2) {
jSONObject = null;
e = e2;
}
try {
jSONObject.put("as_ap", cxwVar.m_());
jSONObject.put("as_af", cxwVar.d().source);
} catch (JSONException e3) {
e = e3;
e.printStackTrace();
hts.a(this);
hts.a("am_dlf", jSONObject);
if (i != 3) {
} else {
return;
}
}
hts.a(this);
hts.a("am_dlf", jSONObject);
}
if (i != 3 && i2 != 3) {
this.Q.obtainMessage(12, getString(R.string.jadx_deobf_0x00002a01, new Object[]{cxwVar.d().appName})).sendToTarget();
}
}
public void b(cxw cxwVar) {
if (this.w.a(cxwVar)) {
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();
hts.a(this);
hts.a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
} catch (JSONException e2) {
e = e2;
jSONObject = null;
}
hts.a(this);
hts.a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
}
n();
}
private void a(AppsSearchConfigItem appsSearchConfigItem, List list) {
cxw cxwVar = new cxw(appsSearchConfigItem, "appssearch", this);
this.x.add(cxwVar);
this.Q.sendEmptyMessage(13);
a(cxwVar, list);
}
public void b(List list) {
Iterator it = this.x.iterator();
while (it.hasNext()) {
a((cxw) it.next(), list);
}
this.Q.sendEmptyMessage(13);
}
private void a(cxw cxwVar, List list) {
boolean z;
Iterator it = list.iterator();
while (true) {
if (!it.hasNext()) {
z = false;
break;
}
akz akzVar = (akz) it.next();
if (akzVar.b.equals(cxwVar.m_())) {
cxwVar.a_(akzVar.n);
if (cxwVar.e()) {
this.v.a("appssearch", cxwVar.m_(), cxwVar);
}
cxwVar.c(bbv.a(akzVar.f, akzVar.o));
cxwVar.d(akzVar.e);
z = true;
}
}
if (!z && hrf.g(this, cxwVar.m_())) {
cxwVar.a_(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 (!hsf.c(str)) {
if (!hqo.c(this) && (i == 3 || (i == 1 && !z))) {
this.Q.sendEmptyMessage(6);
} else {
new cwm(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 (hqf.a(this, intent)) {
startActivity(intent);
} else {
htt.a(this, R.string.jadx_deobf_0x000020c0, 0);
}
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 100 && i2 == 1000) {
String b = htm.b(intent, "extra.pkg");
for (cxw cxwVar : this.x) {
if (cxwVar != null && cxwVar.m_().equals(b)) {
cxwVar.j();
}
}
}
}
@Override
public void a(axb axbVar) {
if (axbVar != null && (axbVar instanceof awz)) {
awz awzVar = (awz) axbVar;
String str = awzVar.a;
switch (awzVar.c) {
case 2:
a(str, true);
b(axbVar);
return;
case 3:
case 4:
a(str, false);
b(axbVar);
return;
default:
return;
}
}
}
private void b(axb axbVar) {
if (((awz) axbVar).a.equals("com.baidu.appsearch")) {
if (this.K != null && hqf.a(this, this.K)) {
startActivity(this.K);
}
hts.a(this);
hts.a("am_as", "as_l_if", (Number) 1);
}
}
private void a(String str, boolean z) {
runOnUiThread(new cwa(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 hlr(this, getResources().getString(R.string.jadx_deobf_0x00001e8d));
this.z.setCancelable(true);
this.z.setOnCancelListener(new cwb(this));
this.z.show();
return;
}
if (this.z != null && this.z.isShowing()) {
this.z.cancel();
}
}
public void a(Intent intent) {
this.K = intent;
cyb.a(this).a(this, r(), new cwc(this), "f_list");
}
public aky r() {
aky akyVar = new aky();
akyVar.a = "appssearch";
akyVar.b = "com.baidu.appsearch";
akyVar.c = getResources().getString(R.string.jadx_deobf_0x00001e78);
akyVar.e = 16785259;
akyVar.d = "6.3.1";
akyVar.f = 6297462L;
akyVar.g = "https://sjwssu.baidu.com/own/yhds/gaosuxiazai";
akyVar.h = "https://sjwssu.baidu.com/bd/appsearch_android/icon";
akyVar.j = hpg.l;
return akyVar;
}
}