百度手机卫士 v8.1.5版本的 MD5 值为:15af71eae74e2f2b5b9f845fe77a4804

以下内容为反编译后的 czx.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 com.baidu.sapi2.c.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 czx extends aza implements View.OnClickListener, acq, ayu, bac, dax {
    public AppsSearchConfigItem e;
    public String f;
    public boolean g = false;
    private DxProgressBar h;
    private TextView j;
    private DXEmptyView k;
    private HorizontalListView l;
    private dai m;
    private DXLoadingInside n;
    private RelativeLayout o;
    private hfk p;
    private LinearLayout q;
    private DxRevealButton r;
    private DxRevealButton s;
    private boolean t;
    private mc u;
    private Handler v;
    private Intent w;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ayo.a((Context) this).a((ayu) this);
        C();
    }

    @Override
    public void onResume() {
        super.onResume();
        if (!hki.c(this)) {
            r();
            q();
        }
    }

    @Override
    public void onDestroy() {
        ayo.a((Context) this).b(this);
        super.onDestroy();
    }

    @Override
    public void a(ayt aytVar) {
        if (aytVar instanceof ayr) {
            ayr ayrVar = (ayr) aytVar;
            if (ayrVar.c == 2 || ayrVar.c == 4) {
                a(ayrVar);
            }
            if (ayrVar.a.equals(this.b.b)) {
                if (ayrVar.c == 2) {
                    this.h.post(new czy(this));
                } else if (ayrVar.c == 3) {
                    this.h.post(new czz(this));
                }
            }
        }
    }

    private void a(ayr ayrVar) {
        if (ayrVar != null && ayrVar.a.equals("com.baidu.appsearch")) {
            if (this.w != null && hjz.a(this, this.w)) {
                startActivity(this.w);
            }
            hnj.a(this).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 (hky.g(this, this.b.b)) {
                if (!hky.h(this, this.b.b)) {
                    hhs.a(R.string.jadx_deobf_0x00001f2b, 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();
            hnj.a(this).a("as_d_hdc", this.b.b, (Number) 1);
        }
    }

    @Override
    public akm b() {
        if (this.e == null) {
            return null;
        }
        return this.e.createDownloadInfo(this.f);
    }

    @Override
    public void c() {
        setContentView(R.layout.jadx_deobf_0x00000778);
        hmh.a(this, R.id.jadx_deobf_0x00000e86, m(), this);
        this.v = new bab(this);
        this.u = new mc(this, R.drawable.jadx_deobf_0x00000363);
        ImageView imageView = (ImageView) findViewById(R.id.jadx_deobf_0x00000074);
        TextView textView = (TextView) findViewById(R.id.app_name);
        TextView textView2 = (TextView) findViewById(R.id.jadx_deobf_0x00001080);
        TextView textView3 = (TextView) findViewById(R.id.jadx_deobf_0x00001081);
        if (this.b != null) {
            if (!TextUtils.isEmpty(this.b.h)) {
                new mc(this).a(this.b.h, imageView);
            }
            textView.setText(this.b.c);
            textView2.setText(getString(R.string.jadx_deobf_0x00001cfc, new Object[]{hlx.a(this.b.f)}));
            if (TextUtils.isEmpty(this.b.d)) {
                textView3.setVisibility(8);
            } else {
                textView3.setText(getString(R.string.jadx_deobf_0x00001cfd, new Object[]{this.b.d.split(":")[1].trim()}));
            }
        }
        this.j = (TextView) findViewById(R.id.jadx_deobf_0x00001082);
        this.h = (DxProgressBar) findViewById(R.id.jadx_deobf_0x00001093);
        this.h.setOnClickListener(this);
        this.q = (LinearLayout) findViewById(R.id.jadx_deobf_0x00001094);
        this.r = (DxRevealButton) findViewById(R.id.jadx_deobf_0x00001095);
        this.r.setOnClickListener(this);
        this.s = (DxRevealButton) findViewById(R.id.jadx_deobf_0x00001096);
        this.s.setOnClickListener(this);
        this.l = (HorizontalListView) findViewById(R.id.jadx_deobf_0x00001090);
        this.l.setOnItemClickListener(new daa(this));
        this.k = (DXEmptyView) findViewById(R.id.jadx_deobf_0x0000108d);
        this.k.a(R.drawable.jadx_deobf_0x000002d1, R.string.jadx_deobf_0x00001f35);
        this.k.setOnClickListener(this);
        this.o = (RelativeLayout) findViewById(R.id.jadx_deobf_0x0000108e);
        View findViewById = this.o.findViewById(R.id.jadx_deobf_0x00001075);
        findViewById.setOnClickListener(this);
        this.o.setTag(findViewById);
        this.n = (DXLoadingInside) findViewById(R.id.jadx_deobf_0x00001091);
    }

    @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_0x00001f1d));
        this.h.setEnabled(false);
    }

    @Override
    public void a(boolean z) {
        if (z) {
            z();
        } else {
            n();
        }
    }

    @Override
    protected 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();
            hnj.a(this).a("am_dlf", jSONObject);
        }
        hnj.a(this).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 (hky.g(this, this.b.b)) {
            this.h.setText(getResources().getString(R.string.jadx_deobf_0x00001f39));
            return;
        }
        if (new File(this.b.a()).exists()) {
            this.h.setText(getResources().getString(R.string.jadx_deobf_0x00001f16));
        } else if (!this.g) {
            this.h.setText(getResources().getString(R.string.jadx_deobf_0x00001f16));
        } 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_0x00001ef6));
        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 list) {
        List b = b(list);
        if (this.m == null) {
            this.m = new dai(this, this.u, b);
        }
        this.l.setAdapter((ListAdapter) this.m);
        this.m.a(hki.b(this));
        this.m.a(b);
    }

    private List b(List list) {
        if (list == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList(list.size());
        Iterator it = list.iterator();
        while (it.hasNext()) {
            arrayList.add(new dbh((String) 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 = dbj.a(this).a(this.e)) != null && hjz.a(this, a)) {
                startActivity(a);
                hnj.a(this).a("am_as", "as_d_hd", (Number) 1);
                return;
            }
            return;
        }
        dbj a2 = dbj.a(this);
        this.w = a2.a(this.e);
        a2.a(this, D(), new dab(this));
    }

    private boolean x() {
        boolean z = false;
        ayn b = ayo.a((Context) this).b("com.baidu.appsearch");
        if (b != null && b.h() > 16782633) {
            z = hky.h(this, "com.baidu.appsearch");
        }
        ayn b2 = ayo.a((Context) this).b("com.dragon.android.pandaspace");
        if (b2 != null && b2.h() > 16785162) {
            return hky.h(this, "com.dragon.android.pandaspace");
        }
        return z;
    }

    private void y() {
        bdg.a(this, this.b.f, this.c, new dae(this));
    }

    public void z() {
        hky.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) {
        hfk hfkVar = new hfk(this, R.string.jadx_deobf_0x00001f1d);
        hfkVar.show();
        hfkVar.setCancelable(false);
        new daf(this, getApplicationContext(), str, hfkVar).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) null);
        b("");
    }

    private void C() {
        if (hki.c(this)) {
            B();
            p();
            s();
            daz.a().a(this, this.e.id, "480*800", this.e.source, "haina".equals(this.e.source), this);
            return;
        }
        q();
        hnk.a(this, R.string.jadx_deobf_0x000021d9, 0);
    }

    public void a(dbh dbhVar, View view) {
        if (!TextUtils.isEmpty(dbhVar.a())) {
            dbl.a(this, dbhVar.a(), (ImageView) view.findViewById(R.id.jadx_deobf_0x00001097), new dah(view, dbhVar));
        }
    }

    @Override
    public void a(String str, boolean z) {
        if (z) {
            dbk.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 hfk(this, getResources().getString(R.string.jadx_deobf_0x00001d14));
            this.p.setCancelable(true);
            this.p.setOnCancelListener(new dag(this));
            this.p.show();
            return;
        }
        if (this.p != null && this.p.isShowing()) {
            this.p.cancel();
        }
    }

    public akm D() {
        akm akmVar = new akm();
        akmVar.a = this.f;
        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;
    }
}