百度手机卫士 v8.1.5版本的 MD5 值为:15af71eae74e2f2b5b9f845fe77a4804
以下内容为反编译后的 QuickHeplerFloatWindow.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.content.res.Resources;
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.view.animation.TranslateAnimation;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.baidu.location.h.e;
import com.baidu.sapi2.c.R;
import com.baidu.security.plugin.alarm.AlarmUtil;
import com.dianxinos.optimizer.base.ICommandActivity;
import com.dianxinos.optimizer.ui.CircleProgress;
import dxoptimizer.ave;
import dxoptimizer.avg;
import dxoptimizer.avh;
import dxoptimizer.ayf;
import dxoptimizer.bab;
import dxoptimizer.bac;
import dxoptimizer.boo;
import dxoptimizer.bop;
import dxoptimizer.bpx;
import dxoptimizer.bqd;
import dxoptimizer.bqe;
import dxoptimizer.bqf;
import dxoptimizer.bqg;
import dxoptimizer.bqh;
import dxoptimizer.bqi;
import dxoptimizer.bqk;
import dxoptimizer.bqr;
import dxoptimizer.fpx;
import dxoptimizer.guw;
import dxoptimizer.hcr;
import dxoptimizer.hkb;
import dxoptimizer.hke;
import dxoptimizer.hna;
import dxoptimizer.hnc;
import dxoptimizer.hnd;
import dxoptimizer.hnj;
import dxoptimizer.htn;
import dxoptimizer.htp;
import dxoptimizer.hug;
import dxoptimizer.hvl;
public class QuickHeplerFloatWindow extends Service implements View.OnTouchListener, avh, bac {
private static final Long a = Long.valueOf(e.kh);
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 boolean J;
private boolean L;
private boolean R;
private Intent S;
private MotionEvent U;
private Point V;
private ave W;
private bop X;
private WindowManager f;
private WindowManager.LayoutParams g;
private RelativeLayout h;
private View i;
private View j;
private View k;
private View l;
private DisplayMetrics m;
private CircleProgress n;
private ProgressBar o;
private ImageView p;
private TextView q;
private TextView r;
private TextView s;
private int u;
private int v;
private int w;
private float x;
private float y;
private float z;
private int t = 0;
private boolean C = false;
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 K = false;
private boolean M = false;
private boolean N = false;
private boolean O = true;
private boolean P = false;
private boolean Q = false;
private Handler T = new bab(this);
private float[] Y = {0.0f, 0.0f};
private BroadcastReceiver Z = new bqd(this);
private BroadcastReceiver aa = new bqe(this);
@Override
public void handleMessage(Message message) {
int i;
int i2;
if (!this.I) {
switch (message.what) {
case 1:
this.T.removeMessages(1);
b((Context) this);
this.T.sendEmptyMessageDelayed(1, e.kh);
return;
case 2:
if (hcr.v(this)) {
g();
a((Context) this, ((Boolean) message.obj).booleanValue());
k();
return;
}
return;
case 3:
if (hcr.w(this) || this.H) {
l();
p();
if (bpx.j(getApplicationContext()) && this.J) {
if (this.X != null) {
this.X.a();
}
i();
}
this.C = false;
this.D = false;
this.k.clearAnimation();
this.k.setVisibility(8);
this.l.clearAnimation();
this.l.setVisibility(8);
} else {
l();
p();
this.C = false;
this.D = false;
this.k.clearAnimation();
this.k.setVisibility(8);
this.l.clearAnimation();
this.l.setVisibility(8);
this.T.obtainMessage(2, false).sendToTarget();
}
if (this.P) {
v();
return;
}
return;
case 6:
if (this.V != null) {
i = this.V.x;
i2 = this.V.y;
} else {
i = this.g.x;
i2 = this.g.y;
}
c(i, i2);
if (message.arg1 == 1001) {
this.T.sendEmptyMessage(11);
return;
}
return;
case 7:
MotionEvent motionEvent = (MotionEvent) message.obj;
c((int) (motionEvent.getRawX() - this.U.getX()), (int) (motionEvent.getRawY() - this.U.getY()));
return;
case 8:
this.h.setVisibility(4);
return;
case 9:
Intent intent = new Intent(this, (Class<?>) ICommandActivity.class);
intent.putExtra("extra.from", 4);
intent.addFlags(335544320);
startActivity(intent);
return;
case 10:
g();
this.C = false;
if (message.arg1 != 1002) {
htp b2 = b(this.E ? this.k : this.l, this.E ? 100 : -100, 500L);
b2.a((htn) new bqf(this));
b2.a();
} else {
this.h.setVisibility(0);
if (this.E) {
this.g.x = 0;
this.k.clearAnimation();
this.k.setVisibility(8);
hvl.k(this.k, 0.0f);
} else {
this.g.x = this.v;
this.l.clearAnimation();
this.l.setVisibility(8);
hvl.k(this.l, 0.0f);
}
this.T.sendEmptyMessageDelayed(11, b.longValue());
}
if (this.t == 6) {
hnj.a(this).a("fw", "fw_wbf", (Number) 1);
return;
} else {
if (this.t != 0) {
hnj.a(this).a("fw", "acs" + this.t, (Number) 1);
return;
}
return;
}
case 11:
this.Q = false;
this.D = false;
this.p.setImageResource(R.drawable.jadx_deobf_0x00000411);
this.p.setBackgroundResource(R.color.jadx_deobf_0x00000df6);
this.k.clearAnimation();
this.k.setVisibility(8);
this.l.clearAnimation();
this.l.setVisibility(8);
this.o.setVisibility(8);
g();
try {
this.f.updateViewLayout(this.h, this.g);
return;
} catch (Exception e2) {
return;
}
case 12:
this.o.setVisibility(8);
this.p.setVisibility(0);
b(message.arg1);
return;
case 13:
this.j.setVisibility(0);
return;
case 1000:
String f = bpx.f(this);
if (t() && !f.equals("--") && !TextUtils.isEmpty(f)) {
this.w = Integer.valueOf(f).intValue();
return;
}
return;
default:
return;
}
}
}
@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.x = ViewConfiguration.get(this).getScaledTouchSlop();
this.v = this.f.getDefaultDisplay().getWidth();
this.m = new DisplayMetrics();
this.f.getDefaultDisplay().getMetrics(this.m);
this.R = 120 == hke.a(this);
this.P = a();
f();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("com.dianxinos.optimizer.action.UPDATE_QUICK_HELPER_WINDOW_VISIBILITY");
hnc.a(this, this.aa, intentFilter);
if (this.W == null) {
this.W = ave.a((Context) this);
this.W.a((avh) this);
}
}
@Override
public int onStartCommand(Intent intent, int i, int i2) {
this.G = j();
if (!hcr.w(this)) {
a((Context) this, false);
k();
}
if (intent != null) {
this.L = hnd.a(intent, "extra.fw_is_only_home", true);
if (this.L) {
p();
} else {
a((Context) this, false);
k();
}
}
this.I = false;
m();
return super.onStartCommand(intent, i, i2);
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
this.v = this.f.getDefaultDisplay().getWidth();
this.G = j();
if (this.g.x != 0) {
this.g.x = this.v - this.h.getWidth();
a(this.g.x, this.g.y);
}
}
@Override
public void onDestroy() {
this.I = true;
m();
unregisterReceiver(this.aa);
super.onDestroy();
l();
p();
if (this.W != null) {
this.W.b(this);
this.W = null;
}
}
private void f() {
this.h = (RelativeLayout) LayoutInflater.from(this).inflate(R.layout.jadx_deobf_0x0000090b, (ViewGroup) null);
n();
this.j = this.h.findViewById(R.id.jadx_deobf_0x00001720);
this.i = this.h.findViewById(R.id.jadx_deobf_0x00001721);
this.k = this.h.findViewById(R.id.jadx_deobf_0x0000171c);
this.l = this.h.findViewById(R.id.jadx_deobf_0x0000171e);
this.r = (TextView) this.h.findViewById(R.id.jadx_deobf_0x0000171d);
this.s = (TextView) this.h.findViewById(R.id.jadx_deobf_0x0000171f);
this.o = (ProgressBar) this.h.findViewById(R.id.jadx_deobf_0x00001724);
this.n = (CircleProgress) this.h.findViewById(R.id.jadx_deobf_0x00001722);
this.n.setBottomPaintColor(16777215);
this.p = (ImageView) this.h.findViewById(R.id.jadx_deobf_0x00001725);
this.q = (TextView) this.h.findViewById(R.id.jadx_deobf_0x00001723);
this.y = getResources().getDimension(R.dimen.jadx_deobf_0x00000b56);
this.z = getResources().getDimension(R.dimen.jadx_deobf_0x00000b55);
this.h.setOnTouchListener(this);
b((Context) this);
}
private void c(int i, int i2) {
int i3;
int width = this.j.getWidth();
if ((width / 2) + i < this.v / 2) {
this.E = true;
i3 = 0;
} else {
i3 = this.v - width;
this.E = false;
}
a(i3, i2);
this.h.setVisibility(0);
hcr.a(this, i3, i2);
}
public void g() {
if (this.h != null && this.g != null) {
if (this.g.x + (this.j.getWidth() / 2) < this.v / 2) {
this.g.x = 0;
} else {
this.g.x = this.v - this.j.getWidth();
}
}
}
private void h() {
this.J = true;
this.X = new bop(this);
this.X.a(this.T);
this.X.a(this.A, this.B);
}
private void i() {
this.J = false;
this.X = null;
}
public static void a(Context context) {
Intent intent = new Intent(context, (Class<?>) QuickHeplerFloatWindow.class);
if (hcr.v(context)) {
context.startService(intent);
} else {
context.stopService(intent);
}
}
private boolean j() {
return getResources().getConfiguration().orientation == 2;
}
private void k() {
this.T.sendEmptyMessage(1);
}
private void l() {
this.T.removeMessages(1);
}
private void m() {
try {
if (hcr.v(this)) {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("com.dianxinos.optimizer.action.ENTER_HOME");
intentFilter.addAction("com.dianxinos.optimizer.action.EXIT_HOME");
hnc.a(this, this.Z, intentFilter);
} else {
unregisterReceiver(this.Z);
}
} catch (Exception e2) {
}
}
private void n() {
Point x = hcr.x(this);
if (x.x == 0) {
this.g.x = x.x;
} else {
this.g.x = this.v - this.h.getWidth();
}
this.g.y = x.y;
hcr.a(this, x.x, x.y);
}
private static int o() {
int[] a2 = hkb.a();
return (int) ((((a2[1] - a2[0]) * 1.0f) / a2[1]) * 100.0f);
}
private void b(Context context) {
int color;
Resources resources = context.getResources();
int o = o();
this.q.setText(String.valueOf(o));
if (o >= 85) {
color = resources.getColor(R.color.jadx_deobf_0x00000d94);
} else {
color = resources.getColor(R.color.jadx_deobf_0x00000d6e);
}
this.n.setProgress(100);
this.n.setPaintColor(color);
}
private void a(Context context, boolean z) {
guw.a(this, this.T);
if (!this.F) {
this.E = this.g.x == 0;
q();
this.i.clearAnimation();
this.p.clearAnimation();
this.i.setVisibility(8);
this.p.setVisibility(0);
this.j.setVisibility(0);
this.l.clearAnimation();
this.l.setVisibility(8);
this.k.clearAnimation();
this.k.setVisibility(8);
if (!z) {
r();
} else {
this.t = boo.a(context);
if (this.t == 5) {
this.T.sendEmptyMessage(9);
r();
} else if (this.t != 0 && !this.R) {
this.p.clearAnimation();
this.k.clearAnimation();
this.l.clearAnimation();
if (this.t == 6) {
if (this.w > 50) {
a(this.t);
hnj.a(this).a("fw", "fw_wbs", (Number) 1);
} else {
r();
}
} else {
a(this.t);
hnj.a(context).a("fw", "as" + this.t, (Number) 1);
}
this.S = boo.a(this.t, context);
} else {
r();
}
}
this.F = true;
return;
}
if (z) {
this.t = boo.a(context);
if (this.t == 5) {
this.T.sendEmptyMessage(9);
return;
}
if (this.t != 0 && !this.R) {
this.p.clearAnimation();
this.k.clearAnimation();
this.l.clearAnimation();
if (this.t == 6) {
if (this.w > 50) {
a(this.t);
hnj.a(context).a("fw", "fw_wbs", (Number) 1);
} else {
this.l.setVisibility(8);
this.k.setVisibility(8);
this.o.setVisibility(8);
this.p.setImageResource(R.drawable.jadx_deobf_0x00000411);
this.p.setBackgroundResource(R.color.jadx_deobf_0x00000df6);
r();
}
} else {
a(this.t);
hnj.a(context).a("fw", "as" + this.t, (Number) 1);
}
this.S = boo.a(this.t, context);
return;
}
this.l.clearAnimation();
this.l.setVisibility(8);
this.k.clearAnimation();
this.k.setVisibility(8);
this.o.setVisibility(8);
this.p.setImageResource(R.drawable.jadx_deobf_0x00000411);
this.p.setBackgroundResource(R.color.jadx_deobf_0x00000df6);
r();
}
}
private void p() {
if (this.F) {
try {
this.f.removeView(this.h);
} catch (Exception e2) {
}
this.F = false;
}
}
private void q() {
try {
this.f.addView(this.h, this.g);
} catch (Exception e2) {
}
}
private boolean a(View view, float f, float f2) {
return f >= (-this.x) && f2 >= (-this.x) && f < ((float) (view.getRight() - view.getLeft())) + this.x && f2 < ((float) (view.getBottom() - view.getTop())) + this.x;
}
public void a(int i, int i2) {
if (this.u == 0) {
View rootView = this.h.getRootView();
Rect rect = new Rect();
rootView.getWindowVisibleDisplayFrame(rect);
this.u = rect.top;
}
this.g.x = i;
this.g.y = i2 - this.u;
if (this.F) {
b((Context) this);
try {
this.f.updateViewLayout(this.h, this.g);
} catch (Exception e2) {
}
}
}
private void r() {
if (!this.D && !this.C) {
ImageView imageView = this.p;
View view = this.i;
this.i.clearAnimation();
this.p.clearAnimation();
this.i.setVisibility(8);
this.p.setVisibility(0);
this.o.setVisibility(8);
this.k.setVisibility(8);
this.l.setVisibility(8);
float f = this.y / 2.0f;
float f2 = this.z / 2.0f;
ayf ayfVar = new ayf(0.0f, 90.0f, f, f2, 0.0f, true);
ayfVar.setDuration(800L);
ayfVar.setFillAfter(true);
ayfVar.setInterpolator(new AccelerateInterpolator());
ayf ayfVar2 = new ayf(-90.0f, 0.0f, f, f2, 0.0f, false);
ayfVar2.setDuration(800L);
ayfVar2.setFillAfter(true);
ayfVar2.setInterpolator(new DecelerateInterpolator());
ayfVar.setAnimationListener(new bqg(this, imageView, view, ayfVar2));
imageView.startAnimation(ayfVar);
}
}
private void s() {
this.j.clearAnimation();
int width = this.j.getWidth();
if (this.E) {
width = -width;
}
TranslateAnimation translateAnimation = new TranslateAnimation(0.0f, width, 0.0f, 0.0f);
translateAnimation.setDuration(300L);
translateAnimation.setFillAfter(true);
translateAnimation.setInterpolator(new AccelerateInterpolator());
translateAnimation.setAnimationListener(new bqh(this));
this.j.startAnimation(translateAnimation);
}
private void a(int i) {
this.C = true;
this.D = true;
if (this.E) {
this.l.clearAnimation();
this.l.setVisibility(8);
this.k.setVisibility(0);
this.h.setGravity(3);
} else {
this.l.setVisibility(0);
this.k.clearAnimation();
this.k.setVisibility(8);
this.h.setGravity(5);
}
this.l.setOnTouchListener(this);
this.k.setOnTouchListener(this);
this.j.clearAnimation();
this.r.setTextColor(getResources().getColor(R.color.jadx_deobf_0x00000d6e));
this.s.setTextColor(getResources().getColor(R.color.jadx_deobf_0x00000d6e));
this.k.setBackgroundResource(R.drawable.jadx_deobf_0x000005d9);
this.l.setBackgroundResource(R.drawable.jadx_deobf_0x000005d9);
switch (i) {
case 2:
this.r.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000020a7)));
this.s.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000020a7)));
this.p.setImageResource(R.drawable.jadx_deobf_0x0000040e);
this.p.setBackgroundResource(R.drawable.jadx_deobf_0x000005da);
break;
case 3:
this.r.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000020ac)));
this.s.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000020ac)));
this.p.setImageResource(R.drawable.jadx_deobf_0x00000417);
this.p.setBackgroundResource(R.drawable.jadx_deobf_0x000005df);
break;
case 4:
this.r.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000020aa)));
this.s.setText(Html.fromHtml(getResources().getString(R.string.jadx_deobf_0x000020aa)));
this.p.setImageResource(R.drawable.jadx_deobf_0x00000410);
this.p.setBackgroundResource(R.drawable.jadx_deobf_0x000005da);
break;
case 6:
if (this.w > 250) {
this.r.setText(R.string.jadx_deobf_0x000020a1);
this.s.setText(R.string.jadx_deobf_0x000020a1);
this.p.setImageResource(R.drawable.jadx_deobf_0x00000412);
this.p.setBackgroundResource(R.drawable.jadx_deobf_0x000005da);
} else if (this.w > 150) {
this.r.setText(R.string.jadx_deobf_0x000020a3);
this.s.setText(R.string.jadx_deobf_0x000020a3);
this.p.setImageResource(R.drawable.jadx_deobf_0x00000412);
this.p.setBackgroundResource(R.drawable.jadx_deobf_0x000005dc);
} else if (this.w > 50) {
this.r.setText(R.string.jadx_deobf_0x000020a2);
this.s.setText(R.string.jadx_deobf_0x000020a2);
this.p.setImageResource(R.drawable.jadx_deobf_0x00000412);
this.p.setBackgroundResource(R.drawable.jadx_deobf_0x000005db);
}
this.k.setPadding(0, 0, 0, 0);
this.l.setPadding(0, 0, 0, 0);
break;
case 8:
this.r.setText(R.string.jadx_deobf_0x000020a6);
this.s.setText(R.string.jadx_deobf_0x000020a6);
this.p.setImageResource(R.drawable.jadx_deobf_0x00000411);
this.p.setBackgroundResource(R.color.jadx_deobf_0x00000df6);
break;
}
x().a();
if (i == 8) {
hnj.a(this).a("fw", "nfsfws", (Number) 1);
}
}
public htp a(View view, int i, long j) {
htp htpVar = new htp();
htpVar.a(hug.a(view, "x", hvl.d(view) - i, hvl.d(view)).b(j), hug.a(view, "alpha", 0.0f, 1.0f).b(j));
view.setVisibility(0);
return htpVar;
}
public htp b(View view, int i, long j) {
htp htpVar = new htp();
float d2 = hvl.d(view) - i;
htpVar.a(hug.a(view, "x", i + d2, d2).b(j), hug.a(view, "alpha", 1.0f, 0.0f).b(j));
return htpVar;
}
private boolean t() {
long currentTimeMillis = System.currentTimeMillis();
if (currentTimeMillis - bpx.d(this) > 3600000) {
return false;
}
return currentTimeMillis - bpx.b(this) < 3600000;
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (this.Q) {
return false;
}
int action = motionEvent.getAction();
if (this.X != null) {
this.X.a(motionEvent);
}
fpx.a(this).a();
switch (action) {
case 0:
if (!this.P && !this.D) {
this.Y[0] = motionEvent.getX();
this.Y[1] = motionEvent.getY();
this.A = hvl.d(this.j);
this.B = hvl.e(this.j);
}
this.N = true;
this.M = false;
this.U = motionEvent;
this.V = hcr.x(this);
return true;
case 1:
this.O = true;
if (this.N) {
if (hcr.w(this) && (this.G || this.H)) {
return true;
}
u();
hnj.a(this).a("fw", "fwcfw", (Number) 1);
}
if (this.M) {
a(motionEvent);
}
return true;
case 2:
if (this.M || !a(this.h, motionEvent.getX(), motionEvent.getY())) {
this.M = true;
if (bpx.j(getApplicationContext()) && getResources().getConfiguration().orientation == 1 && !this.J) {
h();
}
this.N = false;
if (((int) (motionEvent.getRawX() - this.Y[0])) + (this.j.getWidth() / 2) < this.v / 2) {
this.E = true;
} else {
this.E = false;
}
a((int) (motionEvent.getRawX() - this.Y[0]), (int) (motionEvent.getRawY() - this.Y[1]));
bpx.v(this);
if (this.O) {
this.O = false;
Context applicationContext = getApplicationContext();
hnj.a(applicationContext).a("fw", "fwm", (Number) 1);
hnj.a(applicationContext).a("fw", "fwu", (Number) 1);
}
}
return true;
case 3:
this.N = false;
this.O = true;
if (this.N) {
}
if (this.M) {
}
return true;
default:
return true;
}
}
private void a(MotionEvent motionEvent) {
int i = 0;
int rawX = (int) (motionEvent.getRawX() - this.Y[0]);
int rawY = (int) (motionEvent.getRawY() - this.Y[1]);
int width = this.j.getWidth();
if (rawX + (width / 2) < this.v / 2) {
this.E = true;
} else {
int i2 = this.v - width;
this.E = false;
i = i2;
}
if (bpx.j(getApplicationContext())) {
if (this.J) {
i();
}
} else {
a(i, rawY);
hcr.a(this, i, rawY);
}
g();
if (this.P) {
v();
this.F = true;
this.T.sendEmptyMessage(11);
} else if (this.C || this.D) {
this.F = true;
}
}
private void u() {
if (!this.D || this.P) {
s();
return;
}
if (this.D || this.C) {
if (this.t == 6) {
String e2 = bpx.e(this);
if (!e2.equals("--") && !TextUtils.isEmpty(e2)) {
hna.a(this, getString(R.string.jadx_deobf_0x000020a4, new Object[]{e2}), "http://m.baidu.com/from=1010888r/s?word=" + getString(R.string.jadx_deobf_0x000020a4, new Object[]{e2}), true);
} else {
s();
}
hnj.a(this).a("fw", "fw_wbc", (Number) 1);
return;
}
if (this.S != null) {
if (this.t == 2 && 3 != bqr.a(this)) {
Message obtain = Message.obtain(this.T, 10);
obtain.arg1 = 1002;
obtain.sendToTarget();
}
a(this.S);
return;
}
this.F = true;
this.T.sendEmptyMessage(11);
}
}
private void v() {
this.D = false;
this.P = a();
}
private void a(Intent intent) {
if (this.t == 2) {
if (hnd.a(intent, "is_phone_acc", false)) {
bpx.i(this, System.currentTimeMillis());
w();
} else {
startActivity(intent);
}
} else {
startActivity(intent);
}
hnj.a(this).a("fw", "ack" + this.t, (Number) 1);
}
private void w() {
this.Q = true;
this.k.setVisibility(8);
this.l.setVisibility(8);
this.p.setVisibility(4);
this.o.setVisibility(0);
new bqi(this).start();
}
public void b(int i, int i2) {
Message obtain = Message.obtain();
obtain.arg1 = i;
obtain.arg2 = i2;
obtain.what = 12;
this.T.sendMessageDelayed(obtain, e.longValue());
}
private void b(int i) {
this.l.setOnTouchListener(null);
this.l.clearAnimation();
this.k.setOnTouchListener(null);
this.k.clearAnimation();
this.j.clearAnimation();
this.p.setImageResource(R.drawable.jadx_deobf_0x00000411);
this.p.setBackgroundResource(R.color.jadx_deobf_0x00000df6);
this.r.setTextColor(getResources().getColor(R.color.jadx_deobf_0x00000d6e));
this.s.setTextColor(getResources().getColor(R.color.jadx_deobf_0x00000d6e));
this.k.setBackgroundResource(R.drawable.jadx_deobf_0x000005d9);
this.l.setBackgroundResource(R.drawable.jadx_deobf_0x000005d9);
this.p.setVisibility(0);
this.K = true;
int c2 = c(i);
if (c2 > 0) {
this.r.setText(getString(R.string.jadx_deobf_0x000020a8, new Object[]{String.valueOf(c2)}) + "%");
this.s.setText(getString(R.string.jadx_deobf_0x000020a8, new Object[]{String.valueOf(c2)}) + "%");
} else if (c2 == 0) {
this.r.setText(getString(R.string.jadx_deobf_0x000020a9));
this.s.setText(getString(R.string.jadx_deobf_0x000020a9));
}
if (this.E) {
this.l.clearAnimation();
this.l.setVisibility(8);
this.k.setVisibility(0);
this.h.setGravity(3);
} else {
this.l.setVisibility(0);
this.k.clearAnimation();
this.k.setVisibility(8);
this.h.setGravity(5);
}
x().a();
}
private int c(int i) {
if (hkb.a().length > 0) {
int i2 = hkb.a()[0];
if (i2 < i) {
i2 = i;
}
int i3 = i2 - i;
if (i3 <= 0) {
return 0;
}
int i4 = i3 >= 1024 ? i3 : 1024;
if (hkb.a()[1] != 0) {
return (i4 * 100) / hkb.a()[1];
}
}
return 0;
}
private htp x() {
htp a2 = a(this.E ? this.k : this.l, this.E ? 100 : -100, c.longValue());
a2.a((htn) new bqk(this));
return a2;
}
public boolean a() {
return bpx.r(this) || (bpx.t(this) > 0 && bpx.u(this) && System.currentTimeMillis() - bpx.t(this) >= AlarmUtil.DAY);
}
@Override
public void a(avg avgVar) {
bpx.e((Context) this, avgVar.a);
}
}