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

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


package com.dianxinos.optimizer.floatwindow;

import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.text.Html;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import cn.opda.a.phonoalbumshoushou.R;
import com.baidu.mobads.interfaces.utils.IXAdIOUtils;
import com.baidu.security.plugin.alarm.AlarmUtil;
import com.dianxinos.optimizer.base.ICommandActivity;
import dxoptimizer.atl;
import dxoptimizer.atn;
import dxoptimizer.ato;
import dxoptimizer.awn;
import dxoptimizer.ayi;
import dxoptimizer.ayj;
import dxoptimizer.bmj;
import dxoptimizer.bmk;
import dxoptimizer.bmw;
import dxoptimizer.bmx;
import dxoptimizer.bmy;
import dxoptimizer.bna;
import dxoptimizer.bnb;
import dxoptimizer.bnc;
import dxoptimizer.bni;
import dxoptimizer.box;
import dxoptimizer.ftf;
import dxoptimizer.haf;
import dxoptimizer.hiv;
import dxoptimizer.hqh;
import dxoptimizer.hqk;
import dxoptimizer.htj;
import dxoptimizer.htl;
import dxoptimizer.htm;
import dxoptimizer.hts;
import dxoptimizer.hzm;
import dxoptimizer.hzo;
import dxoptimizer.iaf;
import dxoptimizer.ibk;

public class QuickHelperFloatWindow extends Service implements View.OnTouchListener, ato, ayj {
    private static final Long a = 5000L;
    private static final Long b = 30000L;
    private static final Long c = 600L;
    private static final Long d = 150L;
    private static final Long e = 2200L;
    private float A;
    private float B;
    private float C;
    private boolean P;
    private Intent Q;
    private MotionEvent S;
    private Point T;
    private atl U;
    private bmk V;
    private WindowManager f;
    private WindowManager.LayoutParams g;
    private RelativeLayout h;
    private bni i;
    private View j;
    private View k;
    private View l;
    private View m;
    private DisplayMetrics n;
    private ImageView o;
    private ProgressBar p;
    private ImageView q;
    private TextView r;
    private TextView s;
    private TextView t;
    private int v;
    private int w;
    private int x;
    private float y;
    private float z;
    private int u = 0;
    private boolean D = false;
    private boolean E = true;
    private boolean F = false;
    private boolean G = false;
    private boolean H = false;
    private boolean I = false;
    private boolean J = false;
    private boolean K = false;
    private boolean L = false;
    private boolean M = true;
    private boolean N = false;
    private boolean O = false;
    private Handler R = new ayi(this);
    private float[] W = {0.0f, 0.0f};
    private BroadcastReceiver X = new bmw(this);

    public static void a(Context context) {
        Intent intent = new Intent(context, (Class<?>) QuickHelperFloatWindow.class);
        if (hiv.v(context)) {
            context.startService(intent);
        } else {
            context.stopService(intent);
        }
    }

    @Override
    public int onStartCommand(Intent intent, int i, int i2) {
        if (hiv.v(this)) {
            if (!hiv.w(this)) {
                a((Context) this, false);
                l();
            }
            if (intent != null) {
                if (htm.a(intent, "extra.fw_is_only_home", true)) {
                    q();
                } else {
                    a((Context) this, false);
                    l();
                }
            }
        } else {
            q();
        }
        this.H = false;
        C();
        return super.onStartCommand(intent, i, i2);
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        this.f = (WindowManager) getSystemService("window");
        this.g = new WindowManager.LayoutParams(-2, -2, 2003, 8, -2);
        this.g.gravity = 51;
        this.G = k();
        this.y = ViewConfiguration.get(this).getScaledTouchSlop();
        this.w = this.f.getDefaultDisplay().getWidth();
        this.n = new DisplayMetrics();
        this.f.getDefaultDisplay().getMetrics(this.n);
        this.P = 120 == hqk.a(this);
        this.N = a();
        f();
        if (this.U == null) {
            this.U = atl.a((Context) this);
            this.U.a((ato) this);
        }
    }

    @Override
    public void onDestroy() {
        this.H = true;
        C();
        super.onDestroy();
        m();
        q();
        if (this.U != null) {
            this.U.b(this);
            this.U = null;
        }
    }

    @Override
    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        this.w = this.f.getDefaultDisplay().getWidth();
        this.G = k();
        if (this.g.x != 0) {
            this.g.x = this.w - this.h.getWidth();
            b(this.g.x, this.g.y);
        }
    }

    @Override
    public void a(atn atnVar) {
        bnc.c((Context) this, atnVar.a);
    }

    private void f() {
        this.h = (RelativeLayout) LayoutInflater.from(this).inflate(R.layout.jadx_deobf_0x0000099f, (ViewGroup) null);
        n();
        this.k = this.h.findViewById(R.id.jadx_deobf_0x000018a4);
        this.j = this.h.findViewById(R.id.jadx_deobf_0x000018a5);
        this.l = this.h.findViewById(R.id.jadx_deobf_0x000018a0);
        this.m = this.h.findViewById(R.id.jadx_deobf_0x000018a2);
        this.s = (TextView) this.h.findViewById(R.id.jadx_deobf_0x000018a1);
        this.t = (TextView) this.h.findViewById(R.id.jadx_deobf_0x000018a3);
        this.p = (ProgressBar) this.h.findViewById(R.id.jadx_deobf_0x000018a8);
        this.o = (ImageView) this.h.findViewById(R.id.jadx_deobf_0x000018a6);
        this.q = (ImageView) this.h.findViewById(R.id.jadx_deobf_0x000018a9);
        this.r = (TextView) this.h.findViewById(R.id.jadx_deobf_0x000018a7);
        this.z = getResources().getDimension(R.dimen.jadx_deobf_0x00000c10);
        this.A = getResources().getDimension(R.dimen.jadx_deobf_0x00000c0f);
        this.h.setOnTouchListener(this);
        p();
    }

    @Override
    public boolean onTouch(View view, MotionEvent motionEvent) {
        if (this.O) {
            return false;
        }
        int action = motionEvent.getAction();
        if (this.V != null) {
            this.V.a(motionEvent);
        }
        ftf.a(this).a();
        switch (action) {
            case 0:
                if (!this.N && !this.D) {
                    this.W[0] = motionEvent.getX();
                    this.W[1] = motionEvent.getY();
                    this.B = ibk.d(this.k);
                    this.C = ibk.e(this.k);
                }
                this.L = true;
                this.K = false;
                this.S = motionEvent;
                this.T = hiv.x(this);
                return true;
            case 1:
                this.M = true;
                if (this.L) {
                    if (hiv.w(this) && this.G) {
                        return true;
                    }
                    g();
                    hts.a(this);
                    hts.a("fw", "fwcfw", (Number) 1);
                }
                if (this.K) {
                    a(motionEvent);
                }
                return true;
            case 2:
                if (this.K || !a(this.h, motionEvent.getX(), motionEvent.getY())) {
                    this.K = true;
                    if (bnc.g(getApplicationContext()) && getResources().getConfiguration().orientation == 1 && !this.I) {
                        i();
                    }
                    this.L = false;
                    if (((int) (motionEvent.getRawX() - this.W[0])) + (this.k.getWidth() / 2) < this.w / 2) {
                        this.E = true;
                    } else {
                        this.E = false;
                    }
                    b((int) (motionEvent.getRawX() - this.W[0]), (int) (motionEvent.getRawY() - this.W[1]));
                    bnc.r(this);
                    if (this.M) {
                        this.M = false;
                        Context applicationContext = getApplicationContext();
                        hts.a(applicationContext);
                        hts.a("fw", "fwm", (Number) 1);
                        hts.a(applicationContext);
                        hts.a("fw", "fwu", (Number) 1);
                    }
                }
                return true;
            case 3:
                this.L = false;
                this.M = true;
                if (this.L) {
                }
                if (this.K) {
                }
                return true;
            default:
                return true;
        }
    }

    private void g() {
        this.q.clearAnimation();
        this.j.clearAnimation();
        if (!this.D || this.N) {
            t();
            return;
        }
        if (this.D) {
            if (this.u == 6) {
                String e2 = bnc.e(this);
                if (!TextUtils.isEmpty(e2) && !e2.equals("--")) {
                    htj.a(this, getString(R.string.jadx_deobf_0x000022df, new Object[]{e2}), "https://m.baidu.com/from=1010888r/s?word=" + getString(R.string.jadx_deobf_0x000022df, new Object[]{e2}), true);
                } else {
                    t();
                }
                hts.a(this);
                hts.a("fw", "fw_wbc", (Number) 1);
                return;
            }
            if (this.u == 9) {
                t();
                hts.a(this);
                hts.a("fw", "ack" + this.u, (Number) 1);
            } else {
                if (this.Q != null) {
                    if (this.u == 2 && 3 != box.a(this)) {
                        Message.obtain(this.R, 9, false).sendToTarget();
                    }
                    a(this.Q);
                    return;
                }
                this.F = true;
                this.R.sendEmptyMessage(2);
            }
        }
    }

    private void a(MotionEvent motionEvent) {
        int i = 0;
        int rawX = (int) (motionEvent.getRawX() - this.W[0]);
        int rawY = (int) (motionEvent.getRawY() - this.W[1]);
        int width = this.k.getWidth();
        if (rawX + (width / 2) < this.w / 2) {
            this.E = true;
        } else {
            int i2 = this.w - width;
            this.E = false;
            i = i2;
        }
        if (bnc.g(getApplicationContext())) {
            if (this.I) {
                j();
            }
        } else {
            b(i, rawY);
            hiv.a(this, i, rawY);
        }
        h();
        if (this.N) {
            z();
            this.F = true;
            this.R.sendEmptyMessage(2);
        } else if (this.D) {
            this.F = true;
        }
    }

    private void a(int i, int i2) {
        int i3;
        int width = this.k.getWidth();
        if ((width / 2) + i < this.w / 2) {
            this.E = true;
            i3 = 0;
        } else {
            i3 = this.w - width;
            this.E = false;
        }
        b(i3, i2);
        this.h.setVisibility(0);
        hiv.a(this, i3, i2);
    }

    public void h() {
        if (this.h != null && this.g != null) {
            int width = this.k.getWidth();
            if (this.g.x + (width / 2) < this.w / 2) {
                this.g.x = 0;
            } else {
                this.g.x = this.w - width;
            }
        }
    }

    private void i() {
        this.I = true;
        this.V = new bmk(this);
        this.V.a(this.R);
        this.V.a(this.B, this.C);
    }

    private void j() {
        this.I = false;
        this.V = null;
    }

    private boolean k() {
        return getResources().getConfiguration().orientation == 2;
    }

    private void l() {
        this.R.sendEmptyMessage(12);
    }

    private void m() {
        this.R.removeMessages(12);
    }

    private void n() {
        Point x = hiv.x(this);
        if (x.x == 0) {
            this.g.x = x.x;
        } else {
            this.g.x = this.w - this.h.getWidth();
        }
        this.g.y = x.y;
        hiv.a(this, x.x, x.y);
    }

    private static int o() {
        int[] a2 = hqh.a();
        return (int) ((((a2[1] - a2[0]) * 1.0f) / a2[1]) * 100.0f);
    }

    private void p() {
        int o = o();
        this.r.setText(String.valueOf(o));
        if (o >= 85) {
            this.o.setBackgroundResource(R.drawable.jadx_deobf_0x0000063f);
        } else {
            this.o.setBackgroundResource(R.drawable.jadx_deobf_0x00000640);
        }
    }

    private void a(Context context, boolean z) {
        haf.a(this, this.R);
        if (!this.F) {
            this.E = this.g.x == 0;
            r();
            this.j.clearAnimation();
            this.q.clearAnimation();
            this.j.setVisibility(8);
            this.q.setVisibility(0);
            this.k.setVisibility(0);
            if (!z) {
                s();
            } else {
                this.u = bmj.a(context);
                if (this.u == 5) {
                    this.R.sendEmptyMessage(11);
                    s();
                } else if (this.u != 0 && !this.P) {
                    this.q.clearAnimation();
                    this.l.clearAnimation();
                    this.m.clearAnimation();
                    if (this.u == 6) {
                        if (this.x > 50) {
                            a(this.u);
                            hts.a(this);
                            hts.a("fw", "fw_wbs", (Number) 1);
                        } else {
                            s();
                        }
                    } else {
                        a(this.u);
                        hts.a(context);
                        hts.a("fw", "as" + this.u, (Number) 1);
                    }
                    this.Q = bmj.a(this.u, context);
                } else {
                    s();
                }
            }
            this.F = true;
            return;
        }
        if (z) {
            this.u = bmj.a(context);
            if (this.u == 5) {
                this.R.sendEmptyMessage(11);
                return;
            }
            if (this.u != 0 && !this.P) {
                this.q.clearAnimation();
                this.l.clearAnimation();
                this.m.clearAnimation();
                if (this.u == 6) {
                    if (this.x > 50) {
                        a(this.u);
                        hts.a(context);
                        hts.a("fw", "fw_wbs", (Number) 1);
                    } else {
                        this.m.setVisibility(8);
                        this.l.setVisibility(8);
                        this.p.setVisibility(8);
                        this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
                        this.q.setBackgroundResource(android.R.color.transparent);
                        s();
                    }
                } else {
                    a(this.u);
                    hts.a(context);
                    hts.a("fw", "as" + this.u, (Number) 1);
                }
                this.Q = bmj.a(this.u, context);
                return;
            }
            this.m.clearAnimation();
            this.m.setVisibility(8);
            this.l.clearAnimation();
            this.l.setVisibility(8);
            this.p.setVisibility(8);
            this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
            this.q.setBackgroundResource(android.R.color.transparent);
            s();
        }
    }

    private void q() {
        if (this.F) {
            try {
                this.f.removeView(this.h);
            } catch (Exception e2) {
            }
            this.F = false;
        }
    }

    private void r() {
        try {
            this.f.addView(this.h, this.g);
        } catch (Exception e2) {
        }
    }

    private boolean a(View view, float f, float f2) {
        return f >= (-this.y) && f2 >= (-this.y) && f < ((float) (view.getRight() - view.getLeft())) + this.y && f2 < ((float) (view.getBottom() - view.getTop())) + this.y;
    }

    private void b(int i, int i2) {
        if (this.v == 0) {
            View rootView = this.h.getRootView();
            Rect rect = new Rect();
            rootView.getWindowVisibleDisplayFrame(rect);
            this.v = rect.top;
        }
        this.g.x = i;
        this.g.y = i2 - this.v;
        if (this.F) {
            p();
            try {
                this.f.updateViewLayout(this.h, this.g);
            } catch (Exception e2) {
            }
        }
    }

    private void s() {
        if (!this.D) {
            ImageView imageView = this.q;
            View view = this.j;
            this.j.clearAnimation();
            this.q.clearAnimation();
            this.j.setVisibility(8);
            this.q.setVisibility(0);
            this.p.setVisibility(8);
            this.l.setVisibility(8);
            this.m.setVisibility(8);
            float f = this.z / 2.0f;
            float f2 = this.A / 2.0f;
            awn awnVar = new awn(0.0f, 90.0f, f, f2, 0.0f, true);
            awnVar.setDuration(800L);
            awnVar.setFillAfter(true);
            awnVar.setInterpolator(new AccelerateInterpolator());
            awn awnVar2 = new awn(-90.0f, 0.0f, f, f2, 0.0f, false);
            awnVar2.cancel();
            awnVar2.reset();
            awnVar2.setDuration(800L);
            awnVar2.setFillAfter(true);
            awnVar2.setInterpolator(new DecelerateInterpolator());
            awnVar.setAnimationListener(new bmx(this, imageView, view, awnVar2));
            imageView.startAnimation(awnVar);
        }
    }

    private void t() {
        try {
            B();
            if (this.i == null) {
                this.i = new bni(this, this.f, this.R);
            }
            this.i.a();
            this.J = true;
            hts.a(this);
            hts.a("fw", "fwc", (Number) 1);
            hts.a(this);
            hts.a("fw", "fwu", (Number) 1);
        } catch (Exception e2) {
            this.R.obtainMessage(1, true).sendToTarget();
        }
    }

    private void a(int i) {
        this.D = true;
        this.h.setGravity(this.E ? 3 : 5);
        View view = this.E ? this.l : this.m;
        View view2 = this.E ? this.m : this.l;
        view2.clearAnimation();
        view.clearAnimation();
        view.setVisibility(0);
        view2.setVisibility(8);
        view.setOnTouchListener(this);
        view.setBackgroundResource(R.drawable.jadx_deobf_0x0000063e);
        TextView textView = this.E ? this.s : this.t;
        textView.setTextColor(getResources().getColor(R.color.jadx_deobf_0x00000e5f));
        switch (i) {
            case 2:
                textView.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000022e3)));
                this.q.setImageResource(R.drawable.jadx_deobf_0x00000466);
                this.q.setBackgroundResource(R.drawable.jadx_deobf_0x00000641);
                break;
            case 3:
                textView.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000022e8)));
                this.q.setImageResource(R.drawable.jadx_deobf_0x0000046f);
                this.q.setBackgroundResource(R.drawable.jadx_deobf_0x00000646);
                break;
            case 4:
                textView.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000022e6)));
                this.q.setImageResource(R.drawable.jadx_deobf_0x00000468);
                this.q.setBackgroundResource(R.drawable.jadx_deobf_0x00000641);
                break;
            case 6:
                if (this.x > 250) {
                    textView.setText(R.string.jadx_deobf_0x000022dc);
                    this.q.setImageResource(R.drawable.jadx_deobf_0x0000046a);
                    this.q.setBackgroundResource(R.drawable.jadx_deobf_0x00000641);
                } else if (this.x > 150) {
                    textView.setText(R.string.jadx_deobf_0x000022de);
                    this.q.setImageResource(R.drawable.jadx_deobf_0x0000046a);
                    this.q.setBackgroundResource(R.drawable.jadx_deobf_0x00000643);
                } else if (this.x > 50) {
                    textView.setText(R.string.jadx_deobf_0x000022dd);
                    this.q.setImageResource(R.drawable.jadx_deobf_0x0000046a);
                    this.q.setBackgroundResource(R.drawable.jadx_deobf_0x00000642);
                }
                view.setPadding(0, 0, 0, 0);
                break;
            case 8:
                textView.setText(R.string.jadx_deobf_0x000022e2);
                this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
                this.q.setBackgroundResource(android.R.color.transparent);
                break;
            case 9:
                textView.setText(R.string.jadx_deobf_0x000022e1);
                this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
                this.q.setBackgroundResource(android.R.color.transparent);
                bnc.C(this);
                break;
        }
        w();
        if (i == 8) {
            hts.a(this);
            hts.a("fw", "nfsfws", (Number) 1);
        }
    }

    public hzo a(View view, int i, long j) {
        hzo hzoVar = new hzo();
        hzoVar.a(iaf.a(view, "x", ibk.d(view) - i, ibk.d(view)).b(j), iaf.a(view, "alpha", 0.0f, 1.0f).b(j));
        view.setVisibility(0);
        return hzoVar;
    }

    private boolean u() {
        long currentTimeMillis = System.currentTimeMillis();
        if (currentTimeMillis - bnc.d(this) > 3600000) {
            return false;
        }
        return currentTimeMillis - bnc.b(this) < 3600000;
    }

    private void a(Intent intent) {
        if (this.u == 2) {
            if (htm.a(intent, "is_phone_acc", false)) {
                bnc.h(this, System.currentTimeMillis());
                v();
            } else {
                startActivity(intent);
            }
        } else {
            startActivity(intent);
        }
        hts.a(this);
        hts.a("fw", "ack" + this.u, (Number) 1);
    }

    private void v() {
        this.O = true;
        this.l.setVisibility(8);
        this.m.setVisibility(8);
        this.q.setVisibility(4);
        this.p.setVisibility(0);
        new bmy(this).start();
    }

    public void b(int i) {
        Message obtain = Message.obtain();
        obtain.arg1 = i;
        obtain.what = 10;
        this.R.sendMessageDelayed(obtain, e.longValue());
    }

    private void c(int i) {
        this.h.setGravity(this.E ? 3 : 5);
        View view = this.E ? this.l : this.m;
        View view2 = this.E ? this.m : this.l;
        TextView textView = this.E ? this.s : this.t;
        view.clearAnimation();
        view2.clearAnimation();
        view.setVisibility(0);
        view2.setVisibility(8);
        view.setBackgroundResource(R.drawable.jadx_deobf_0x0000063e);
        view.setOnTouchListener(null);
        this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
        this.q.setBackgroundResource(android.R.color.transparent);
        textView.setTextColor(getResources().getColor(R.color.jadx_deobf_0x00000e5f));
        this.q.setVisibility(0);
        int d2 = d(i);
        if (d2 > 0) {
            textView.setText(getString(R.string.jadx_deobf_0x000022e4, new Object[]{String.valueOf(d2)}) + "%");
        } else if (d2 == 0) {
            textView.setText(getString(R.string.jadx_deobf_0x000022e5));
        }
        w();
    }

    private int d(int i) {
        int i2 = IXAdIOUtils.BUFFER_SIZE;
        if (hqh.a().length > 0) {
            int i3 = hqh.a()[0];
            if (i3 < i) {
                i3 = i;
            }
            int i4 = i3 - i;
            if (i4 <= 0) {
                return 0;
            }
            if (i4 >= 1024) {
                i2 = i4;
            }
            if (hqh.a()[1] != 0) {
                return (i2 * 100) / hqh.a()[1];
            }
        }
        return 0;
    }

    private void w() {
        y().a();
    }

    private void x() {
        b(this.E ? this.l : this.m, this.E ? 100 : -100, 500L).a();
    }

    private hzo y() {
        hzo a2 = a(this.E ? this.l : this.m, this.E ? 100 : -100, c.longValue());
        a2.a((hzm) new bna(this));
        return a2;
    }

    private hzo b(View view, int i, long j) {
        hzo hzoVar = new hzo();
        float d2 = ibk.d(view) - i;
        hzoVar.a(iaf.a(view, "x", i + d2, d2).b(j), iaf.a(view, "alpha", 1.0f, 0.0f).b(j));
        hzoVar.a((hzm) new bnb(this));
        return hzoVar;
    }

    private void z() {
        this.D = false;
        this.N = a();
    }

    public boolean a() {
        return bnc.n(this) || (bnc.p(this) > 0 && bnc.q(this) && System.currentTimeMillis() - bnc.p(this) >= AlarmUtil.DAY);
    }

    private void A() {
        this.D = false;
        this.l.clearAnimation();
        this.l.setVisibility(8);
        this.m.clearAnimation();
        this.m.setVisibility(8);
    }

    private void B() {
        m();
        q();
        A();
    }

    private void C() {
        try {
            if (hiv.v(this)) {
                IntentFilter intentFilter = new IntentFilter();
                intentFilter.addAction("com.dianxinos.optimizer.action.ENTER_HOME");
                intentFilter.addAction("com.dianxinos.optimizer.action.EXIT_HOME");
                intentFilter.addAction("com.dianxinos.optimizer.action.UPDATE_QUICK_HELPER_WINDOW_VISIBILITY");
                intentFilter.addAction("android.intent.action.CLOSE_SYSTEM_DIALOGS");
                htl.a(this, this.X, intentFilter);
            } else {
                unregisterReceiver(this.X);
            }
        } catch (Exception e2) {
        }
    }

    public void D() {
        this.O = false;
        this.D = false;
        this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
        this.q.setBackgroundResource(android.R.color.transparent);
    }

    public void E() {
        if (this.i != null) {
            this.i.f();
            this.J = false;
            this.i = null;
        }
    }

    @Override
    public void handleMessage(Message message) {
        int i;
        int i2;
        if (!this.H) {
            switch (message.what) {
                case 1:
                    if (hiv.v(this)) {
                        h();
                        a((Context) this, ((Boolean) message.obj).booleanValue());
                        l();
                        return;
                    }
                    return;
                case 2:
                    this.O = false;
                    this.q.setImageResource(R.drawable.jadx_deobf_0x00000469);
                    this.q.setBackgroundResource(android.R.color.transparent);
                    this.p.setVisibility(8);
                    A();
                    h();
                    try {
                        this.f.updateViewLayout(this.h, this.g);
                        return;
                    } catch (Exception e2) {
                        return;
                    }
                case 3:
                    E();
                    if (hiv.w(this)) {
                        B();
                    } else {
                        B();
                        this.R.obtainMessage(1, false).sendToTarget();
                    }
                    if (this.N) {
                        z();
                        return;
                    }
                    return;
                case 4:
                    this.k.setVisibility(0);
                    return;
                case 5:
                    MotionEvent motionEvent = (MotionEvent) message.obj;
                    a((int) (motionEvent.getRawX() - this.S.getX()), (int) (motionEvent.getRawY() - this.S.getY()));
                    return;
                case 6:
                    this.h.setVisibility(4);
                    return;
                case 7:
                    if (this.T != null) {
                        i = this.T.x;
                        i2 = this.T.y;
                    } else {
                        i = this.g.x;
                        i2 = this.g.y;
                    }
                    a(i, i2);
                    return;
                case 9:
                    h();
                    if (!((Boolean) message.obj).booleanValue()) {
                        x();
                    } else {
                        this.h.setVisibility(0);
                        if (this.E) {
                            this.g.x = 0;
                            this.l.clearAnimation();
                            this.l.setVisibility(8);
                            ibk.k(this.l, 0.0f);
                        } else {
                            this.g.x = this.w;
                            this.m.clearAnimation();
                            this.m.setVisibility(8);
                            ibk.k(this.m, 0.0f);
                        }
                        this.R.sendEmptyMessageDelayed(2, b.longValue());
                    }
                    if (this.u == 6) {
                        hts.a(this);
                        hts.a("fw", "fw_wbf", (Number) 1);
                        return;
                    } else {
                        if (this.u != 0) {
                            hts.a(this);
                            hts.a("fw", "acs" + this.u, (Number) 1);
                            return;
                        }
                        return;
                    }
                case 10:
                    this.p.setVisibility(8);
                    this.q.setVisibility(0);
                    c(message.arg1);
                    return;
                case 11:
                    Intent intent = new Intent(this, (Class<?>) ICommandActivity.class);
                    intent.putExtra("extra.from", 4);
                    intent.addFlags(335544320);
                    startActivity(intent);
                    return;
                case 12:
                    this.R.removeMessages(12);
                    p();
                    this.R.sendEmptyMessageDelayed(12, 5000L);
                    return;
                case 13:
                    E();
                    return;
                case 1000:
                    String f = bnc.f(this);
                    if (u() && !f.equals("--") && !TextUtils.isEmpty(f)) {
                        this.x = Integer.valueOf(f).intValue();
                        return;
                    }
                    return;
                default:
                    return;
            }
        }
    }
}