百度手机卫士 v8.4.5版本的 MD5 值为:c65ef854a40bb6200c4d8c4603c58403

以下内容为反编译后的 FamilyGuardLocationActivity.java 源代码,内容仅作参考


package com.dianxinos.optimizer.module.familyguard.guardfamily;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import cn.opda.a.phonoalbumshoushou.R;
import com.dianxinos.optimizer.module.familyguard.view.NameTagView;
import com.dianxinos.optimizer.ui.DxTitleBar;
import dxoptimizer.aei;
import dxoptimizer.ayw;
import dxoptimizer.dnd;
import dxoptimizer.dnf;
import dxoptimizer.dps;
import dxoptimizer.dpt;
import dxoptimizer.dpu;
import dxoptimizer.dpv;
import dxoptimizer.dsk;
import dxoptimizer.dsu;
import dxoptimizer.dth;
import dxoptimizer.dtj;
import dxoptimizer.duq;
import dxoptimizer.duv;
import dxoptimizer.hny;
import dxoptimizer.hqo;
import dxoptimizer.htm;
import dxoptimizer.hts;
import dxoptimizer.tu;
import org.json.JSONException;
import org.json.JSONObject;

public class FamilyGuardLocationActivity extends ayw implements aei, dnf {
    private ProgressBar A;
    private ImageButton B;
    private NameTagView C;
    private TextView D;
    private TextView E;
    private LinearLayout F;
    private LinearLayout G;
    private TextView H;
    private ImageButton I;
    private long J;
    private int K;
    private boolean L = true;
    private View.OnClickListener M = new dpt(this);
    private Handler N = new dpv(this);
    private WebView o;
    private String p;
    private String q;
    private String r;
    private int s;
    private long u;
    private double v;
    private double w;
    private DxTitleBar x;
    private ImageButton y;
    private ImageButton z;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.jadx_deobf_0x0000086d);
        Intent intent = getIntent();
        this.p = htm.b(intent, "guard_name");
        this.q = htm.b(intent, "guard_phone_number");
        this.o = (WebView) findViewById(R.id.jadx_deobf_0x00001374);
        this.x = (DxTitleBar) findViewById(R.id.jadx_deobf_0x00001373);
        this.x.a(getString(R.string.jadx_deobf_0x000021c2, new Object[]{this.p})).a(this);
        this.y = (ImageButton) findViewById(R.id.jadx_deobf_0x00001380);
        this.y.setOnClickListener(this.M);
        this.z = (ImageButton) findViewById(R.id.jadx_deobf_0x00001381);
        this.z.setOnClickListener(this.M);
        this.A = (ProgressBar) findViewById(R.id.jadx_deobf_0x00001382);
        this.B = (ImageButton) findViewById(R.id.jadx_deobf_0x0000137f);
        this.C = (NameTagView) findViewById(R.id.jadx_deobf_0x00001378);
        this.C.setBgColor(getResources().getColor(R.color.jadx_deobf_0x00000e2b));
        this.C.setText(this.p);
        this.D = (TextView) findViewById(R.id.jadx_deobf_0x00001379);
        this.E = (TextView) findViewById(R.id.jadx_deobf_0x0000137a);
        this.F = (LinearLayout) findViewById(R.id.jadx_deobf_0x0000137c);
        this.G = (LinearLayout) findViewById(R.id.jadx_deobf_0x00001376);
        this.H = (TextView) findViewById(R.id.jadx_deobf_0x0000137d);
        this.I = (ImageButton) findViewById(R.id.jadx_deobf_0x0000137b);
        this.I.setOnClickListener(new dps(this));
        this.L = hqo.c(hny.a());
        if (!this.L) {
            hts.a(this);
            hts.b("fg_ctg", "grlnn", (Number) 1);
        }
        i();
    }

    @Override
    public void onResume() {
        super.onResume();
        if (!this.L && hqo.c(hny.a()) && this.o != null) {
            this.o.reload();
            this.L = true;
        }
        this.J = System.currentTimeMillis();
    }

    @SuppressLint({"SetJavaScriptEnabled"})
    private void i() {
        h();
        if (this.w != 0.0d && this.v != 0.0d && !duv.e(this)) {
            a(1);
        } else {
            this.N.sendEmptyMessage(1);
            if (!hqo.c(hny.a())) {
                hts.a(this);
                hts.b("fg_ctg", "bglprnn", (Number) 1);
            }
        }
        WebSettings settings = this.o.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setDomStorageEnabled(true);
        settings.setSupportZoom(false);
        this.o.setWebViewClient(new dpu(this));
        this.o.loadUrl("file:///android_asset/familyguardmap.html");
        dnd.a((Context) this).a((dnf) this);
    }

    public void h() {
        String g = duq.g(this);
        String f = duq.f(this);
        if (!TextUtils.isEmpty(g) && !TextUtils.isEmpty(f)) {
            this.v = Double.parseDouble(g);
            this.w = Double.parseDouble(f);
        }
        this.r = duq.h(this);
        this.s = duq.j(this);
        if (this.s == 0) {
            this.s = 300;
        } else if (this.s < 50 && this.s > 0) {
            this.s = 50;
        }
        this.u = duq.i(this);
    }

    public void a(int i) {
        a(i, 0);
    }

    public void a(int i, int i2) {
        switch (i) {
            case 1:
                this.A.setVisibility(4);
                this.B.setVisibility(4);
                this.F.setVisibility(8);
                this.G.setVisibility(0);
                boolean e = duv.e(this);
                this.z.setVisibility(e ? 4 : 0);
                this.y.setVisibility(e ? 0 : 4);
                j();
                dnd.a(hny.a()).b(this);
                return;
            case 2:
                this.y.setVisibility(4);
                this.z.setVisibility(4);
                this.A.setVisibility(0);
                this.B.setVisibility(4);
                this.F.setVisibility(0);
                this.G.setVisibility(8);
                this.H.setText(getString(R.string.jadx_deobf_0x000021c1, new Object[]{this.p}));
                tu.a(this.H, new ColorDrawable(getResources().getColor(R.color.jadx_deobf_0x00000e26)));
                return;
            case 3:
                this.y.setVisibility(4);
                this.z.setVisibility(4);
                this.A.setVisibility(4);
                this.B.setVisibility(0);
                this.F.setVisibility(0);
                this.G.setVisibility(8);
                tu.a(this.H, new ColorDrawable(getResources().getColor(R.color.jadx_deobf_0x00000e4a)));
                if (i2 == 1) {
                    this.H.setText(getString(R.string.jadx_deobf_0x000021bc, new Object[]{this.p}));
                    return;
                } else if (i2 == 2) {
                    this.H.setText(getString(R.string.jadx_deobf_0x000021bd, new Object[]{this.p}));
                    return;
                } else {
                    this.H.setText(R.string.jadx_deobf_0x000021bb);
                    return;
                }
            default:
                return;
        }
    }

    public void j() {
        h();
        boolean e = duv.e(this);
        if (!e) {
            this.N.removeMessages(3);
            this.N.removeMessages(4);
        }
        this.C.setBgColor(e ? getResources().getColor(R.color.jadx_deobf_0x00000e90) : getResources().getColor(R.color.jadx_deobf_0x00000e2b));
        if (this.v == 0.0d && this.w == 0.0d) {
            this.E.setText(getString(R.string.jadx_deobf_0x000021c4, new Object[]{this.p}));
            this.D.setText(R.string.jadx_deobf_0x000021bf);
            return;
        }
        this.E.setText(duv.d(this.r));
        this.D.setText(duv.f(this) + getString(R.string.jadx_deobf_0x000021be, new Object[]{Integer.valueOf(this.s)}));
        if (this.o != null) {
            this.o.loadUrl("javascript:updateLocation(" + this.w + "," + this.v + "," + e + ")");
        }
    }

    @Override
    public void onPause() {
        super.onPause();
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("grlpst", System.currentTimeMillis() - this.J);
            hts.a(this);
            hts.b("fg_ctgj", jSONObject);
        } catch (JSONException e) {
        }
    }

    @Override
    public void l_() {
        finish();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        dnd.a((Context) this).b(this);
        this.o.removeAllViews();
        this.o.destroy();
        this.o = null;
    }

    @Override
    public void a(int i, dsk dskVar) {
        dth dthVar;
        if (!this.L && hqo.c(hny.a()) && this.o != null) {
            this.o.reload();
            this.L = true;
        }
        if (dskVar instanceof dth) {
            dthVar = (dth) dskVar;
        } else {
            if ((dskVar instanceof dtj) && dskVar.f()) {
                dsu.a(this, (dtj) dskVar);
                if (duq.F(this)) {
                    k();
                    hny.a(R.string.jadx_deobf_0x0000223a, 0);
                    this.N.sendEmptyMessage(5);
                    return;
                }
            } else if (dskVar instanceof dsk) {
                dth dthVar2 = new dth();
                dthVar2.b(dskVar.b());
                dthVar = dthVar2;
            }
            dthVar = null;
        }
        if (dthVar != null && dthVar.p() != 5 && !dthVar.f()) {
            int q = dthVar.q();
            switch (i) {
                case -3:
                    this.L = false;
                    break;
                case -2:
                    k();
                    hny.a(R.string.jadx_deobf_0x0000223a, 0);
                    this.N.sendEmptyMessage(5);
                    return;
                case -1:
                    break;
                case 0:
                default:
                    return;
                case 1:
                    k();
                    if (q == 0) {
                        a(1);
                        this.N.sendEmptyMessage(2);
                        return;
                    } else {
                        a(3, q);
                        this.N.sendEmptyMessageDelayed(5, 3000L);
                        return;
                    }
            }
            if (dthVar.b() == this.K) {
                k();
                a(3);
                this.N.sendEmptyMessageDelayed(5, 3000L);
                hts.a(this);
                hts.b("fg_ctg", "glrf", (Number) 1);
                this.K = -1;
            }
        }
    }

    private void k() {
        if (this.N != null) {
            this.N.removeMessages(3);
            this.N.removeMessages(4);
            this.N.removeMessages(5);
        }
    }

    public void l() {
        dth dthVar = new dth(1);
        this.K = dthVar.b();
        dnd.a((Context) this).a(this.q, dthVar, 1);
        hts.a(this);
        hts.b("fg_ctg", "guklr", (Number) 1);
    }
}