百度手机卫士 v8.6.2版本的 MD5 值为:fa60cb367e40201705a2d9f9ce2cbfdf
以下内容为反编译后的 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.ajn;
import dxoptimizer.ajo;
import dxoptimizer.ajp;
import dxoptimizer.avj;
import dxoptimizer.avm;
import dxoptimizer.avo;
import dxoptimizer.avp;
import dxoptimizer.axi;
import dxoptimizer.azo;
import dxoptimizer.bai;
import dxoptimizer.cxm;
import dxoptimizer.cxn;
import dxoptimizer.cxo;
import dxoptimizer.cxp;
import dxoptimizer.cxq;
import dxoptimizer.cxr;
import dxoptimizer.cxs;
import dxoptimizer.cxu;
import dxoptimizer.cxv;
import dxoptimizer.cxw;
import dxoptimizer.cxx;
import dxoptimizer.cxy;
import dxoptimizer.cxz;
import dxoptimizer.cya;
import dxoptimizer.cyb;
import dxoptimizer.cyc;
import dxoptimizer.cys;
import dxoptimizer.cyw;
import dxoptimizer.czc;
import dxoptimizer.czh;
import dxoptimizer.czm;
import dxoptimizer.czn;
import dxoptimizer.czo;
import dxoptimizer.czr;
import dxoptimizer.czs;
import dxoptimizer.hlw;
import dxoptimizer.hpw;
import dxoptimizer.hra;
import dxoptimizer.huq;
import dxoptimizer.hvp;
import dxoptimizer.hvu;
import dxoptimizer.hvy;
import dxoptimizer.hwp;
import dxoptimizer.hxp;
import dxoptimizer.hyv;
import dxoptimizer.hyw;
import dxoptimizer.hzc;
import dxoptimizer.hzd;
import dxoptimizer.ikp;
import dxoptimizer.ilg;
import dxoptimizer.mp;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class AppsSearchActivity extends axi implements View.OnClickListener, avp, czn {
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<String> L;
private cys M;
private czh a;
private GridView b;
private ImageView c;
private AutoCompleteTextView d;
private ImageView e;
private ImageButton f;
private czc 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 mp u;
private ajp v;
private cyw w;
private List<czm> x;
private LayoutInflater y;
private hra 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 cxm(this);
private BroadcastReceiver R = new cxp(this);
public static int t(AppsSearchActivity appsSearchActivity) {
int i = appsSearchActivity.B;
appsSearchActivity.B = i + 1;
return i;
}
public List<czo> e() {
List<czo> b = this.a.b(this);
if (b.size() >= 1) {
this.q.setText(b.remove(0).a);
}
return b;
}
public void a(String str) {
if (!this.G) {
q();
}
a(czs.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_0x00000852);
this.a = czh.a();
this.y = LayoutInflater.from(this);
String b = hyw.b(getIntent(), "search_word");
g();
j();
l();
f();
if (!TextUtils.isEmpty(b)) {
b(b);
}
avj.a((Context) this).a((avp) 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");
hyv.a(this, this.R, intentFilter);
}
private void f() {
ilg b = ilg.a(this.q, "alpha", 0.0f, 1.0f).b(500L);
ilg b2 = ilg.a(this.r, "alpha", 0.0f, 1.0f).b(1500L);
ilg b3 = ilg.a(this.s, "alpha", 0.0f, 1.0f).b(1000L);
ikp ikpVar = new ikp();
ikpVar.a(b, b2, b3);
ikpVar.a();
}
private void g() {
this.b = (GridView) findViewById(R.id.jadx_deobf_0x00001229);
this.c = (ImageView) findViewById(R.id.jadx_deobf_0x00001262);
this.d = (AutoCompleteTextView) findViewById(R.id.jadx_deobf_0x00001264);
this.e = (ImageView) findViewById(R.id.jadx_deobf_0x00000202);
this.f = (ImageButton) findViewById(R.id.jadx_deobf_0x00001265);
this.n = (ListView) findViewById(R.id.jadx_deobf_0x00001225);
this.h = (DXEmptyView) findViewById(R.id.jadx_deobf_0x000010c6);
this.j = (DXLoadingInside) findViewById(R.id.jadx_deobf_0x00001223);
this.o = findViewById(R.id.jadx_deobf_0x00001224);
this.p = findViewById(R.id.jadx_deobf_0x00001228);
this.q = (TextView) findViewById(R.id.jadx_deobf_0x00001215);
this.r = (TextView) findViewById(R.id.jadx_deobf_0x00001216);
this.s = (TextView) findViewById(R.id.jadx_deobf_0x00001217);
this.t = (ScrollView) findViewById(R.id.jadx_deobf_0x00001227);
this.k = this.y.inflate(R.layout.jadx_deobf_0x000008ba, (ViewGroup) null);
this.l = (TextView) this.k.findViewById(R.id.jadx_deobf_0x00001393);
this.m = this.k.findViewById(R.id.jadx_deobf_0x00001392);
this.k.findViewById(R.id.jadx_deobf_0x00001391).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 cxu(this));
this.n.setOnScrollListener(new cxv(this));
this.n.setOnItemClickListener(new cxw(this));
this.k.setOnClickListener(new cxx(this));
this.b.setOnItemClickListener(new cxy(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 cys(this, this.L);
this.d.setAdapter(this.M);
this.d.addTextChangedListener(new cxz(this));
this.d.setOnItemClickListener(new cya(this));
this.d.setOnEditorActionListener(new cyb(this));
}
public void a(ArrayList<String> arrayList) {
this.L.clear();
this.L.addAll(arrayList);
this.M.notifyDataSetChanged();
this.d.setDropDownWidth(hvu.b(this).widthPixels);
this.d.setDropDownVerticalOffset(getResources().getDimensionPixelOffset(R.dimen.jadx_deobf_0x00000b86));
}
private void l() {
this.A = "";
this.I = hlw.j(this);
N = getResources().getString(R.string.jadx_deobf_0x00002b67);
O = getResources().getString(R.string.jadx_deobf_0x00002b5c);
P = getResources().getString(R.string.jadx_deobf_0x00001f73);
this.x = new ArrayList();
this.u = new mp(this);
this.v = azo.a(this);
this.g = new czc(this);
this.b.setAdapter((ListAdapter) this.g);
this.w = new cyw(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_0x0000033b, R.string.jadx_deobf_0x000021b4);
hpw.a().b(new cxn(this));
}
@Override
protected void onResume() {
super.onResume();
hpw.a().a(new cxo(this));
}
@Override
public void onDestroy() {
super.onDestroy();
this.x.clear();
this.w.notifyDataSetChanged();
this.n.setAdapter((ListAdapter) null);
this.n.setOnItemClickListener(null);
avj.a((Context) this).b(this);
unregisterReceiver(this.R);
bai.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);
hzc.a(this);
hzc.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(czm czmVar) {
this.Q.obtainMessage(3, czmVar).sendToTarget();
}
@Override
public void a(czm czmVar, 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", czmVar.m_());
jSONObject.put("as_af", czmVar.d().source);
} catch (JSONException e3) {
e = e3;
e.printStackTrace();
hzc.a(this);
hzc.a("am_dlf", jSONObject);
if (i != 3) {
} else {
return;
}
}
hzc.a(this);
hzc.a("am_dlf", jSONObject);
}
if (i != 3 && i2 != 3) {
this.Q.obtainMessage(12, getString(R.string.jadx_deobf_0x00002b6a, new Object[]{czmVar.d().appName})).sendToTarget();
}
}
public void b(czm czmVar) {
if (this.w.a(czmVar)) {
this.w.notifyDataSetChanged();
}
}
private synchronized void a(List<AppsSearchConfigItem> list) {
JSONObject jSONObject;
this.D = list.size() == 10;
List<ajo> o = o();
synchronized (this.x) {
for (AppsSearchConfigItem appsSearchConfigItem : list) {
try {
jSONObject = new JSONObject();
try {
jSONObject.put("as_ap", appsSearchConfigItem.pkgName);
jSONObject.put("as_af", appsSearchConfigItem.source);
} catch (JSONException e) {
e = e;
e.printStackTrace();
hzc.a(this);
hzc.a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
} catch (JSONException e2) {
e = e2;
jSONObject = null;
}
hzc.a(this);
hzc.a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
}
n();
}
private void a(AppsSearchConfigItem appsSearchConfigItem, List<ajo> list) {
czm czmVar = new czm(appsSearchConfigItem, "appssearch", this);
this.x.add(czmVar);
this.Q.sendEmptyMessage(13);
a(czmVar, list);
}
public void b(List<ajo> list) {
Message message = new Message();
message.what = 13;
message.obj = list;
this.Q.sendMessage(message);
}
public void a(czm czmVar, List<ajo> list) {
boolean z;
Iterator<ajo> it = list.iterator();
while (true) {
if (!it.hasNext()) {
z = false;
break;
}
ajo next = it.next();
if (next.b.equals(czmVar.m_())) {
czmVar.a_(next.n);
if (czmVar.e()) {
this.v.a("appssearch", czmVar.m_(), czmVar);
}
czmVar.c(bai.a(next.f, next.o));
czmVar.d(next.e);
z = true;
}
}
if (!z && hwp.g(this, czmVar.m_())) {
czmVar.a_(6);
}
}
public List<ajo> 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 (!hxp.c(str)) {
if (!hvy.c(this) && (i == 3 || (i == 1 && !z))) {
this.Q.sendEmptyMessage(6);
} else {
new cyc(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 (hvp.a(this, intent)) {
startActivity(intent);
} else {
hzd.a(this, R.string.jadx_deobf_0x000021a9, 0);
}
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 100 && i2 == 1000) {
String b = hyw.b(intent, "extra.pkg");
for (czm czmVar : this.x) {
if (czmVar != null && czmVar.m_().equals(b)) {
czmVar.j();
}
}
}
}
@Override
public void a(avo avoVar) {
if (avoVar != null && (avoVar instanceof avm)) {
avm avmVar = (avm) avoVar;
String str = avmVar.a;
switch (avmVar.c) {
case 2:
a(str, true);
b(avoVar);
return;
case 3:
case 4:
a(str, false);
b(avoVar);
return;
default:
return;
}
}
}
private void b(avo avoVar) {
if (((avm) avoVar).a.equals("com.baidu.appsearch")) {
if (this.K != null && hvp.a(this, this.K)) {
startActivity(this.K);
}
hzc.a(this);
hzc.a("am_as", "as_l_if", (Number) 1);
}
}
private void a(String str, boolean z) {
runOnUiThread(new cxq(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 hra(this, getResources().getString(R.string.jadx_deobf_0x00001f88));
this.z.setCancelable(true);
this.z.setOnCancelListener(new cxr(this));
this.z.show();
return;
}
if (this.z != null && this.z.isShowing()) {
this.z.cancel();
}
}
public void a(Intent intent) {
this.K = intent;
czr.a(this).a(this, r(), new cxs(this), "f_list");
}
public ajn r() {
ajn ajnVar = new ajn();
ajnVar.a = "appssearch";
ajnVar.b = "com.baidu.appsearch";
ajnVar.c = getResources().getString(R.string.jadx_deobf_0x00001f73);
ajnVar.e = 16785259;
ajnVar.d = "6.3.1";
ajnVar.f = 6297462L;
ajnVar.g = "https://sjwssu.baidu.com/own/yhds/gaosuxiazai";
ajnVar.h = "https://sjwssu.baidu.com/bd/appsearch_android/icon";
ajnVar.j = huq.l;
return ajnVar;
}
}