百度手机卫士 v8.6.2版本的 MD5 值为:fa60cb367e40201705a2d9f9ce2cbfdf
以下内容为反编译后的 cyf.java 源代码,内容仅作参考
package dxoptimizer;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Html;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import cn.opda.a.phonoalbumshoushou.R;
import com.dianxinos.common.ui.view.DxProgressBar;
import com.dianxinos.optimizer.module.appmanager.appssearch.mode.AppsSearchConfigItem;
import com.dianxinos.optimizer.module.appmanager.appssearch.view.HorizontalListView;
import com.dianxinos.optimizer.ui.DXEmptyView;
import com.dianxinos.optimizer.ui.DXLoadingInside;
import com.dianxinos.optimizer.ui.DxRevealButton;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class cyf extends avv implements View.OnClickListener, acx, avp, aww, czf {
public AppsSearchConfigItem e;
public String f;
public boolean g = false;
private DxProgressBar h;
private TextView j;
private DXEmptyView k;
private HorizontalListView l;
private cyq m;
private DXLoadingInside n;
private RelativeLayout o;
private hra p;
private LinearLayout q;
private DxRevealButton r;
private DxRevealButton s;
private boolean t;
private mp u;
private Handler v;
private Intent w;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
avj.a((Context) this).a((avp) this);
C();
}
@Override
public void onResume() {
super.onResume();
if (!hvy.c(this)) {
r();
q();
}
}
@Override
public void onDestroy() {
avj.a((Context) this).b(this);
super.onDestroy();
}
@Override
public void a(avo avoVar) {
if (avoVar instanceof avm) {
avm avmVar = (avm) avoVar;
if (avmVar.c == 2 || avmVar.c == 4) {
a(avmVar);
}
if (avmVar.a.equals(this.b.b)) {
if (avmVar.c == 2) {
this.h.post(new cyg(this));
} else if (avmVar.c == 3) {
this.h.post(new cyh(this));
}
}
}
}
private void a(avm avmVar) {
if (avmVar != null && avmVar.a.equals("com.baidu.appsearch")) {
if (this.w != null && hvp.a(this, this.w)) {
startActivity(this.w);
}
hzc.a(this);
hzc.a("am_as", "as_d_if", (Number) 1);
}
}
@Override
public void onClick(View view) {
if (view == this.h) {
if (this.c == 1 || this.c == 7 || this.c == 2) {
A();
return;
}
if (hwp.g(this, this.b.b)) {
if (!hwp.h(this, this.b.b)) {
hti.a(R.string.jadx_deobf_0x000021aa, 0);
return;
} else {
z();
return;
}
}
c(this.g);
return;
}
if (view == this.k.getImageView()) {
C();
return;
}
if (view == this.o.getTag()) {
v();
C();
return;
}
if (view == this.r) {
if (this.c != 1 && this.c != 2 && this.c != 7) {
c(false);
return;
}
return;
}
if (view == this.s) {
w();
hzc.a(this);
hzc.a("as_d_hdc", this.b.b, (Number) 1);
}
}
@Override
public ajn b() {
if (this.e == null) {
return null;
}
return this.e.createDownloadInfo(this.f);
}
@Override
public void c() {
setContentView(R.layout.jadx_deobf_0x00000853);
hya.a(this, R.id.jadx_deobf_0x0000103f, m(), this);
this.v = new awv(this);
this.u = new mp(this, R.drawable.jadx_deobf_0x000003d0);
ImageView imageView = (ImageView) findViewById(R.id.jadx_deobf_0x00000094);
TextView textView = (TextView) findViewById(R.id.app_name);
TextView textView2 = (TextView) findViewById(R.id.jadx_deobf_0x0000121d);
TextView textView3 = (TextView) findViewById(R.id.jadx_deobf_0x0000121e);
if (this.b != null) {
if (!TextUtils.isEmpty(this.b.h)) {
new mp(this).a(this.b.h, imageView);
}
textView.setText(this.b.c);
textView2.setText(getString(R.string.jadx_deobf_0x00001f70, new Object[]{hxp.a(this.b.f)}));
if (TextUtils.isEmpty(this.b.d)) {
textView3.setVisibility(8);
} else {
textView3.setText(getString(R.string.jadx_deobf_0x00001f71, new Object[]{this.b.d.split(":")[1].trim()}));
}
}
this.j = (TextView) findViewById(R.id.jadx_deobf_0x0000121f);
this.h = (DxProgressBar) findViewById(R.id.jadx_deobf_0x00001230);
this.h.setOnClickListener(this);
this.q = (LinearLayout) findViewById(R.id.jadx_deobf_0x00001231);
this.r = (DxRevealButton) findViewById(R.id.jadx_deobf_0x00001232);
this.r.setOnClickListener(this);
this.s = (DxRevealButton) findViewById(R.id.jadx_deobf_0x00001233);
this.s.setOnClickListener(this);
this.l = (HorizontalListView) findViewById(R.id.jadx_deobf_0x0000122d);
this.l.setOnItemClickListener(new cyi(this));
this.k = (DXEmptyView) findViewById(R.id.jadx_deobf_0x0000122a);
this.k.a(R.drawable.jadx_deobf_0x0000033b, R.string.jadx_deobf_0x000021b4);
this.k.setOnClickListener(this);
this.o = (RelativeLayout) findViewById(R.id.jadx_deobf_0x0000122b);
View findViewById = this.o.findViewById(R.id.jadx_deobf_0x00001212);
findViewById.setOnClickListener(this);
this.o.setTag(findViewById);
this.n = (DXLoadingInside) findViewById(R.id.jadx_deobf_0x0000122e);
}
@Override
public void d() {
if (this.c == 1 || this.c == 7 || this.c == 2) {
o();
} else {
n();
}
}
@Override
public void e() {
o();
}
@Override
public void f() {
o();
}
@Override
public void g() {
n();
}
@Override
public void h() {
this.h.setProgress(100);
this.h.setProgressTextVisible(false);
this.h.setText(getString(R.string.jadx_deobf_0x0000219c));
this.h.setEnabled(false);
}
@Override
public void a(boolean z) {
if (z) {
z();
} else {
n();
}
}
@Override
public void a(String str) {
JSONObject jSONObject;
JSONException e;
try {
jSONObject = new JSONObject();
} catch (JSONException e2) {
jSONObject = null;
e = e2;
}
try {
jSONObject.put("as_ap", this.e.pkgName);
jSONObject.put("as_af", this.e.source);
} catch (JSONException e3) {
e = e3;
e.printStackTrace();
hzc.a(this);
hzc.a("am_dlf", jSONObject);
}
hzc.a(this);
hzc.a("am_dlf", jSONObject);
}
private String m() {
if (this.e == null) {
return null;
}
return this.e.appName;
}
private void n() {
this.h.setProgress(100);
this.h.setEnabled(true);
this.h.setProgressTextVisible(false);
b(false);
if (hwp.g(this, this.b.b)) {
this.h.setText(getResources().getString(R.string.jadx_deobf_0x000021b8));
return;
}
if (new File(this.b.a()).exists()) {
this.h.setText(getResources().getString(R.string.jadx_deobf_0x00002195));
} else if (!this.g) {
this.h.setText(getResources().getString(R.string.jadx_deobf_0x00002195));
} else {
b(true);
}
}
private void b(boolean z) {
this.h.setVisibility(z ? 8 : 0);
this.q.setVisibility(z ? 0 : 8);
}
private void o() {
this.h.setProgress(this.d);
this.h.setProgressTextVisible(true);
this.h.setText(getResources().getString(R.string.jadx_deobf_0x00002175));
this.h.setEnabled(true);
}
private void p() {
if (this.k.isShown()) {
this.k.setVisibility(8);
}
}
private void q() {
if (!this.k.isShown()) {
this.k.setVisibility(0);
}
}
private void r() {
if (this.n.isShown()) {
this.n.setVisibility(8);
}
}
private void s() {
if (!this.n.isShown()) {
this.n.setVisibility(0);
}
}
private void t() {
this.o.setVisibility(0);
}
private void v() {
this.o.setVisibility(8);
}
private void a(List<String> list) {
List<czp> b = b(list);
if (this.m == null) {
this.m = new cyq(this, this.u, b);
}
this.l.setAdapter((ListAdapter) this.m);
this.m.a(hvy.b(this));
this.m.a(b);
}
private List<czp> b(List<String> list) {
if (list == null) {
return null;
}
ArrayList arrayList = new ArrayList(list.size());
Iterator<String> it = list.iterator();
while (it.hasNext()) {
arrayList.add(new czp(it.next()));
}
return arrayList;
}
private void b(String str) {
if (!TextUtils.isEmpty(str)) {
this.j.setText(Html.fromHtml(str));
}
}
private void c(boolean z) {
String a = this.b.a();
if (new File(a).exists() && this.b.g.equals(this.e.downloadUrl)) {
c(a);
} else if (z) {
w();
} else {
b(false);
y();
}
}
private void w() {
Intent a;
if (x()) {
if (this.e != null && (a = czr.a(this).a(this.e)) != null && hvp.a(this, a)) {
startActivity(a);
hzc.a(this);
hzc.a("am_as", "as_d_hd", (Number) 1);
return;
}
return;
}
czr a2 = czr.a(this);
this.w = a2.a(this.e);
a2.a(this, D(), new cyj(this), "f_detail");
}
private boolean x() {
boolean z = false;
avi b = avj.a((Context) this).b("com.baidu.appsearch");
if (b != null && b.h() > 16782633) {
z = hwp.h(this, "com.baidu.appsearch");
}
avi b2 = avj.a((Context) this).b("com.dragon.android.pandaspace");
if (b2 != null && b2.h() > 16785162) {
return hwp.h(this, "com.dragon.android.pandaspace");
}
return z;
}
private void y() {
bai.a(this, this.b.f, this.c, new cym(this));
}
public void z() {
hwp.m(this, this.b.b);
finish();
}
private void A() {
this.a.a(this.b);
this.h.setEnabled(false);
setResult(1000, new Intent().putExtra("extra.pkg", this.b.b));
}
private void c(String str) {
hra hraVar = new hra(this, R.string.jadx_deobf_0x0000219c);
hraVar.show();
hraVar.setCancelable(false);
new cyn(this, getApplicationContext(), str, hraVar).start();
}
private void a(Message message) {
super.handleMessage(message);
if (!isFinishing()) {
switch (message.what) {
case 1:
r();
b(this.e.updateDesc);
a(this.e.snapShotList);
return;
case 2:
t();
return;
default:
return;
}
}
}
private void B() {
a((List<String>) null);
b("");
}
private void C() {
if (hvy.c(this)) {
B();
p();
s();
czh.a().a(this, this.e.id, "480*800", this.e.source, "haina".equals(this.e.source), this);
return;
}
q();
hzd.a(this, R.string.jadx_deobf_0x00002523, 0);
}
public void a(czp czpVar, View view) {
if (!TextUtils.isEmpty(czpVar.a())) {
czt.a(this, czpVar.a(), (ImageView) view.findViewById(R.id.jadx_deobf_0x00001234), new cyp(view, czpVar));
}
}
@Override
public void a(String str, boolean z) {
if (z) {
czs.a(str, this.e);
this.v.sendEmptyMessage(1);
} else {
this.v.sendEmptyMessage(2);
}
}
@Override
public void handleMessage(Message message) {
a(message);
}
public void d(boolean z) {
if (z) {
this.p = new hra(this, getResources().getString(R.string.jadx_deobf_0x00001f88));
this.p.setCancelable(true);
this.p.setOnCancelListener(new cyo(this));
this.p.show();
return;
}
if (this.p != null && this.p.isShowing()) {
this.p.cancel();
}
}
public ajn D() {
ajn ajnVar = new ajn();
ajnVar.a = this.f;
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;
}
}