百度手机卫士 v8.8.0版本的 MD5 值为:a85894a6923c8a39f0c3a3a686ad7443
以下内容为反编译后的 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.ajo;
import dxoptimizer.ajp;
import dxoptimizer.ajq;
import dxoptimizer.avo;
import dxoptimizer.avr;
import dxoptimizer.avt;
import dxoptimizer.avu;
import dxoptimizer.axj;
import dxoptimizer.azp;
import dxoptimizer.bal;
import dxoptimizer.cyz;
import dxoptimizer.cza;
import dxoptimizer.czb;
import dxoptimizer.czc;
import dxoptimizer.czd;
import dxoptimizer.cze;
import dxoptimizer.czf;
import dxoptimizer.czh;
import dxoptimizer.czi;
import dxoptimizer.czj;
import dxoptimizer.czk;
import dxoptimizer.czl;
import dxoptimizer.czm;
import dxoptimizer.czn;
import dxoptimizer.czo;
import dxoptimizer.czp;
import dxoptimizer.daf;
import dxoptimizer.daj;
import dxoptimizer.dap;
import dxoptimizer.dau;
import dxoptimizer.daz;
import dxoptimizer.dba;
import dxoptimizer.dbb;
import dxoptimizer.dbe;
import dxoptimizer.dbf;
import dxoptimizer.hoj;
import dxoptimizer.hti;
import dxoptimizer.hum;
import dxoptimizer.hyi;
import dxoptimizer.hzh;
import dxoptimizer.hzm;
import dxoptimizer.hzq;
import dxoptimizer.iaj;
import dxoptimizer.ibj;
import dxoptimizer.icn;
import dxoptimizer.ico;
import dxoptimizer.icu;
import dxoptimizer.icv;
import dxoptimizer.iol;
import dxoptimizer.ipc;
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 axj implements View.OnClickListener, avu, dba {
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 daf M;
private dau a;
private GridView b;
private ImageView c;
private AutoCompleteTextView d;
private ImageView e;
private ImageButton f;
private dap 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 ajq v;
private daj w;
private List<daz> x;
private LayoutInflater y;
private hum 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 cyz(this);
private BroadcastReceiver R = new czc(this);
public static int t(AppsSearchActivity appsSearchActivity) {
int i = appsSearchActivity.B;
appsSearchActivity.B = i + 1;
return i;
}
public List<dbb> e() {
List<dbb> 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(dbf.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_0x00000864);
this.a = dau.a();
this.y = LayoutInflater.from(this);
String b = ico.b(getIntent(), "search_word");
g();
j();
l();
f();
if (!TextUtils.isEmpty(b)) {
b(b);
}
avo.a((Context) this).a((avu) 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");
icn.a(this, this.R, intentFilter);
}
private void f() {
ipc b = ipc.a(this.q, "alpha", 0.0f, 1.0f).b(500L);
ipc b2 = ipc.a(this.r, "alpha", 0.0f, 1.0f).b(1500L);
ipc b3 = ipc.a(this.s, "alpha", 0.0f, 1.0f).b(1000L);
iol iolVar = new iol();
iolVar.a(b, b2, b3);
iolVar.a();
}
private void g() {
this.b = (GridView) findViewById(R.id.jadx_deobf_0x00001275);
this.c = (ImageView) findViewById(R.id.jadx_deobf_0x000012b1);
this.d = (AutoCompleteTextView) findViewById(R.id.jadx_deobf_0x000012b3);
this.e = (ImageView) findViewById(R.id.jadx_deobf_0x000001ff);
this.f = (ImageButton) findViewById(R.id.jadx_deobf_0x000012b4);
this.n = (ListView) findViewById(R.id.jadx_deobf_0x00001271);
this.h = (DXEmptyView) findViewById(R.id.jadx_deobf_0x000010ff);
this.j = (DXLoadingInside) findViewById(R.id.jadx_deobf_0x0000126f);
this.o = findViewById(R.id.jadx_deobf_0x00001270);
this.p = findViewById(R.id.jadx_deobf_0x00001274);
this.q = (TextView) findViewById(R.id.jadx_deobf_0x00001261);
this.r = (TextView) findViewById(R.id.jadx_deobf_0x00001262);
this.s = (TextView) findViewById(R.id.jadx_deobf_0x00001263);
this.t = (ScrollView) findViewById(R.id.jadx_deobf_0x00001273);
this.k = this.y.inflate(R.layout.jadx_deobf_0x000008cf, (ViewGroup) null);
this.l = (TextView) this.k.findViewById(R.id.jadx_deobf_0x000013ec);
this.m = this.k.findViewById(R.id.jadx_deobf_0x000013eb);
this.k.findViewById(R.id.jadx_deobf_0x000013ea).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 czh(this));
this.n.setOnScrollListener(new czi(this));
this.n.setOnItemClickListener(new czj(this));
this.k.setOnClickListener(new czk(this));
this.b.setOnItemClickListener(new czl(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 daf(this, this.L);
this.d.setAdapter(this.M);
this.d.addTextChangedListener(new czm(this));
this.d.setOnItemClickListener(new czn(this));
this.d.setOnEditorActionListener(new czo(this));
}
public void a(ArrayList<String> arrayList) {
this.L.clear();
this.L.addAll(arrayList);
this.M.notifyDataSetChanged();
this.d.setDropDownWidth(hzm.b(this).widthPixels);
this.d.setDropDownVerticalOffset(getResources().getDimensionPixelOffset(R.dimen.jadx_deobf_0x00000ba2));
}
private void l() {
this.A = "";
this.I = hoj.j(this);
N = getResources().getString(R.string.jadx_deobf_0x00002be5);
O = getResources().getString(R.string.jadx_deobf_0x00002bda);
P = getResources().getString(R.string.jadx_deobf_0x00001faf);
this.x = new ArrayList();
this.u = new mp(this);
this.v = azp.a(this);
this.g = new dap(this);
this.b.setAdapter((ListAdapter) this.g);
this.w = new daj(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_0x0000033e, R.string.jadx_deobf_0x000021ff);
hti.a().b(new cza(this));
}
@Override
protected void onResume() {
super.onResume();
hti.a().a(new czb(this));
}
@Override
public void onDestroy() {
super.onDestroy();
this.x.clear();
this.w.notifyDataSetChanged();
this.n.setAdapter((ListAdapter) null);
this.n.setOnItemClickListener(null);
avo.a((Context) this).b(this);
unregisterReceiver(this.R);
bal.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);
icu.a(this);
icu.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(daz dazVar) {
this.Q.obtainMessage(3, dazVar).sendToTarget();
}
@Override
public void a(daz dazVar, 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", dazVar.m_());
jSONObject.put("as_af", dazVar.d().source);
} catch (JSONException e3) {
e = e3;
e.printStackTrace();
icu.a(this);
icu.a("am_dlf", jSONObject);
if (i != 3) {
} else {
return;
}
}
icu.a(this);
icu.a("am_dlf", jSONObject);
}
if (i != 3 && i2 != 3) {
this.Q.obtainMessage(12, getString(R.string.jadx_deobf_0x00002be8, new Object[]{dazVar.d().appName})).sendToTarget();
}
}
public void b(daz dazVar) {
if (this.w.a(dazVar)) {
this.w.notifyDataSetChanged();
}
}
private synchronized void a(List<AppsSearchConfigItem> list) {
JSONObject jSONObject;
this.D = list.size() == 10;
List<ajp> 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();
icu.a(this);
icu.a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
} catch (JSONException e2) {
e = e2;
jSONObject = null;
}
icu.a(this);
icu.a("as_kw", jSONObject);
a(appsSearchConfigItem, o);
}
}
n();
}
private void a(AppsSearchConfigItem appsSearchConfigItem, List<ajp> list) {
daz dazVar = new daz(appsSearchConfigItem, "appssearch", this);
this.x.add(dazVar);
this.Q.sendEmptyMessage(13);
a(dazVar, list);
}
public void b(List<ajp> list) {
Message message = new Message();
message.what = 13;
message.obj = list;
this.Q.sendMessage(message);
}
public void a(daz dazVar, List<ajp> list) {
boolean z;
Iterator<ajp> it = list.iterator();
while (true) {
if (!it.hasNext()) {
z = false;
break;
}
ajp next = it.next();
if (next.b.equals(dazVar.m_())) {
dazVar.a_(next.n);
if (dazVar.e()) {
this.v.a("appssearch", dazVar.m_(), dazVar);
}
dazVar.c(bal.a(next.f, next.o));
dazVar.d(next.e);
z = true;
}
}
if (!z && iaj.g(this, dazVar.m_())) {
dazVar.a_(6);
}
}
public List<ajp> 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 (!ibj.c(str)) {
if (!hzq.c(this) && (i == 3 || (i == 1 && !z))) {
this.Q.sendEmptyMessage(6);
} else {
new czp(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 (hzh.a(this, intent)) {
startActivity(intent);
} else {
icv.a(this, R.string.jadx_deobf_0x000021f4, 0);
}
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 100 && i2 == 1000) {
String b = ico.b(intent, "extra.pkg");
for (daz dazVar : this.x) {
if (dazVar != null && dazVar.m_().equals(b)) {
dazVar.j();
}
}
}
}
@Override
public void a(avt avtVar) {
if (avtVar != null && (avtVar instanceof avr)) {
avr avrVar = (avr) avtVar;
String str = avrVar.a;
switch (avrVar.c) {
case 2:
a(str, true);
b(avtVar);
return;
case 3:
case 4:
a(str, false);
b(avtVar);
return;
default:
return;
}
}
}
private void b(avt avtVar) {
if (((avr) avtVar).a.equals("com.baidu.appsearch")) {
if (this.K != null && hzh.a(this, this.K)) {
startActivity(this.K);
}
icu.a(this);
icu.a("am_as", "as_l_if", (Number) 1);
}
}
private void a(String str, boolean z) {
runOnUiThread(new czd(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 hum(this, getResources().getString(R.string.jadx_deobf_0x00001fc4));
this.z.setCancelable(true);
this.z.setOnCancelListener(new cze(this));
this.z.show();
return;
}
if (this.z != null && this.z.isShowing()) {
this.z.cancel();
}
}
public void a(Intent intent) {
this.K = intent;
dbe.a(this).a(this, r(), new czf(this), "f_list");
}
public ajo r() {
ajo ajoVar = new ajo();
ajoVar.a = "appssearch";
ajoVar.b = "com.baidu.appsearch";
ajoVar.c = getResources().getString(R.string.jadx_deobf_0x00001faf);
ajoVar.e = 16785259;
ajoVar.d = "6.3.1";
ajoVar.f = 6297462L;
ajoVar.g = "https://sjwssu.baidu.com/own/yhds/gaosuxiazai";
ajoVar.h = "https://sjwssu.baidu.com/bd/appsearch_android/icon";
ajoVar.j = hyi.l;
return ajoVar;
}
}