安全中心 v4.9.2版本的 MD5 值为:d64c0ec7920c532fa6e6d9bb001cf9bf
以下内容为反编译后的 RealtimeProtectGuideActivity.java 源代码,内容仅作参考
package com.tencent.server.fore;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import com.tencent.qqpimsecure.storage.n;
import com.tencent.server.fore.guide.GuideDesktopView;
import java.util.ArrayList;
import meri.pluginsdk.PluginIntent;
import meri.util.AccessHelper;
import tcs.aav;
import tcs.ahk;
import tcs.ahl;
import tcs.akv;
import tcs.amy;
import tcs.bdh;
import tcs.bgh;
import tcs.ve;
import tcs.vv;
import tcs.yu;
import tcs.yz;
import tcs.za;
import uilib.components.QButton;
import uilib.components.QTextView;
public class RealtimeProtectGuideActivity extends BaseSafeActivity {
private WindowManager anA;
private int bsn;
private GuideDesktopView hFP;
private RealtimeProtectGuideStateView hFQ;
private QTextView hFR;
private QTextView hFS;
private QButton hFT;
private QButton hFU;
private View hFV;
private View hFW;
private View hFX;
private boolean hFY;
private boolean hFZ;
private int hGa;
private int hGb;
private int hGc;
private uilib.templates.a hlF;
private boolean hGd = false;
private Handler mHandler = new amy(Looper.getMainLooper());
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
requestWindowFeature(1);
Window window = getWindow();
window.setBackgroundDrawable(new ColorDrawable(bdh.c.fbJ));
window.addFlags(67108864);
this.anA = (WindowManager) com.tencent.server.base.d.agJ().getSystemService("window");
Intent intent = getIntent();
if (intent != null) {
this.bsn = intent.getIntExtra(n.a.j.aCc, 0);
this.hGa = intent.getIntExtra("g_r_t", 0);
this.hFY = intent.getBooleanExtra("p_t_p_g_p", false);
if (intent.getBooleanExtra("d_t_g_g", false)) {
this.hFZ = intent.getBooleanExtra("n_r_a_f", false);
if (com.tencent.qqpimsecure.dao.h.mu().EP()) {
finish();
return;
} else {
this.mHandler.post(new Runnable() {
@Override
public void run() {
RealtimeProtectGuideActivity.this.hT(true);
}
});
return;
}
}
}
this.hFP = new GuideDesktopView(new Bundle(), this);
this.hFP.setNegativeButton(getString(bdh.h.fkJ), new View.OnClickListener() {
@Override
public void onClick(View view) {
com.tencent.qqpimsecure.dao.h mu = com.tencent.qqpimsecure.dao.h.mu();
ArrayList arrayList = new ArrayList();
if (RealtimeProtectGuideActivity.this.hFY && !mu.Fx()) {
PluginIntent pluginIntent = new PluginIntent(ve.g.eGS);
pluginIntent.putExtra(PluginIntent.csC, 1);
e.a((Intent) pluginIntent, -1, false);
RealtimeProtectGuideActivity.this.finish();
arrayList.add(String.valueOf(0));
arrayList.add(String.valueOf(4));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.eOP, arrayList, 4);
return;
}
mu.ED();
RealtimeProtectGuideActivity.this.hT(true);
RealtimeProtectGuideActivity.this.xp(0);
if (RealtimeProtectGuideActivity.this.hGa == 2 || RealtimeProtectGuideActivity.this.hGa == 3) {
arrayList.add(String.valueOf(0));
arrayList.add(String.valueOf(RealtimeProtectGuideActivity.this.hGa));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.eOP, arrayList, 4);
}
}
});
if (com.tencent.qqpimsecure.dao.h.mu().EE()) {
this.hFP.setPositiveButton(getString(bdh.h.fkI), new View.OnClickListener() {
@Override
public void onClick(View view) {
RealtimeProtectGuideActivity.this.hFP.setVisibility(8);
RealtimeProtectGuideActivity.this.aVA();
RealtimeProtectGuideActivity.this.xp(1);
yz.c(bgh.PQ().kH(), meri.service.usespermission.c.eNN, 4);
}
});
yz.c(bgh.PQ().kH(), meri.service.usespermission.c.eNO, 4);
}
this.hFP.setOnCloseListener(new GuideDesktopView.a() {
@Override
public void onClose() {
RealtimeProtectGuideActivity.this.xp(2);
}
});
try {
addContentView(this.hFP, new LinearLayout.LayoutParams(-1, -1));
} catch (Throwable th) {
}
if (this.hGa == 2 || this.hGa == 3) {
ArrayList arrayList = new ArrayList();
arrayList.add(String.valueOf(this.hGa));
arrayList.add(String.valueOf(0));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.eOP, arrayList, 4);
}
}
@Override
protected void onStart() {
super.onStart();
}
@Override
protected void onResume() {
super.onResume();
meri.service.usespermission.b.Fc();
switch (this.hGb) {
case 1:
this.hGb = 0;
if (AccessHelper.Cz() == 0) {
meri.service.usespermission.b.Fc();
aVG();
yz.c(bgh.PQ().kH(), meri.service.usespermission.c.eNS, 4);
return;
} else {
this.hGc = 1;
aVB();
return;
}
default:
return;
}
}
@Override
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
if (keyEvent.getKeyCode() != 4 || this.hGd) {
return super.dispatchKeyEvent(keyEvent);
}
return true;
}
@Override
public void onBackPressed() {
super.onBackPressed();
if (this.hlF != null) {
this.anA.removeView(this.hlF.Zu());
this.hFQ.clearBitmap();
}
}
public void aVA() {
this.hGd = true;
uilib.templates.d dVar = new uilib.templates.d(this, getString(bdh.h.fkL));
View a = uilib.frame.f.a(bdh.g.fja, (ViewGroup) null);
a.findViewById(bdh.f.fgI).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
RealtimeProtectGuideActivity.this.hT(true);
yz.a(bgh.PQ().kH(), meri.service.usespermission.c.eNM, String.valueOf(0), 4);
ArrayList arrayList = new ArrayList();
arrayList.add(String.valueOf(0));
arrayList.add(String.valueOf(RealtimeProtectGuideActivity.this.hGa));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.eOP, arrayList, 4);
}
});
a.findViewById(bdh.f.ffw).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
com.tencent.qqpimsecure.dao.h.mu().EF();
uilib.components.g.d(RealtimeProtectGuideActivity.this, bdh.h.fkK);
yz.a(bgh.PQ().kH(), meri.service.usespermission.c.eNM, String.valueOf(1), 4);
}
});
a.findViewById(bdh.f.fgv).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
za.b(RealtimeProtectGuideActivity.this, "http://feedback.qq.com/?productId=1#!/detail/qid/6", null);
RealtimeProtectGuideActivity.this.finish();
yz.a(bgh.PQ().kH(), meri.service.usespermission.c.eNM, String.valueOf(2), 4);
}
});
dVar.k(a);
dVar.b(new View.OnClickListener() {
@Override
public void onClick(View view) {
RealtimeProtectGuideActivity.this.finish();
yz.a(bgh.PQ().kH(), meri.service.usespermission.c.eNM, String.valueOf(3), 4);
}
});
addContentView(dVar.Zu(), new LinearLayout.LayoutParams(-1, -1));
}
public void aVB() {
if (this.hFZ) {
finish();
if (this.hGc == 0) {
com.tencent.qqpimsecure.dao.h.mu().Fh();
yz.c(bgh.PQ().kH(), meri.service.usespermission.c.eNR, 4);
yz.d(bgh.PQ().kH(), meri.service.usespermission.c.eOm, 0);
ArrayList arrayList = new ArrayList();
arrayList.add(String.valueOf(this.bsn));
arrayList.add(String.valueOf(200));
arrayList.add(String.valueOf(1));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.aKT, arrayList, 4);
}
if (this.hlF != null) {
this.anA.removeView(this.hlF.Zu());
this.hFQ.clearBitmap();
return;
}
return;
}
this.hGd = true;
if (this.hlF == null) {
aVC();
} else {
this.hlF.Zu().setVisibility(0);
}
this.hFV.setVisibility(0);
if (this.hGc == 0) {
com.tencent.qqpimsecure.dao.h.mu().EF();
com.tencent.qqpimsecure.dao.h.mu().Fh();
this.hFQ.setGrantState(1);
this.hFR.setText(getString(bdh.h.fkU));
this.hFS.setText(getString(bdh.h.fkW));
this.hFU.setText(bdh.h.fkV);
this.hFU.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
RealtimeProtectGuideActivity.this.finish();
RealtimeProtectGuideActivity.this.anA.removeView(RealtimeProtectGuideActivity.this.hlF.Zu());
RealtimeProtectGuideActivity.this.hFQ.clearBitmap();
}
});
this.hFU.setVisibility(0);
yz.c(bgh.PQ().kH(), meri.service.usespermission.c.eNR, 4);
yz.d(bgh.PQ().kH(), meri.service.usespermission.c.eOm, 0);
ArrayList arrayList2 = new ArrayList();
arrayList2.add(String.valueOf(this.bsn));
arrayList2.add(String.valueOf(200));
arrayList2.add(String.valueOf(1));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.aKT, arrayList2, 4);
} else {
this.hFQ.setGrantState(2);
this.hFR.setText(getString(bdh.h.fkP));
this.hFS.setText(getString(bdh.h.fkR));
this.hFT.setText(bdh.h.fkH);
this.hFT.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
RealtimeProtectGuideActivity.this.finish();
RealtimeProtectGuideActivity.this.anA.removeView(RealtimeProtectGuideActivity.this.hlF.Zu());
RealtimeProtectGuideActivity.this.hFQ.clearBitmap();
}
});
this.hFU.setText(bdh.h.fkQ);
this.hFU.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
RealtimeProtectGuideActivity.this.hT(false);
}
});
this.hFT.setVisibility(0);
this.hFU.setVisibility(0);
}
this.hFW.setVisibility(8);
this.hFX.setVisibility(0);
}
private void aLs() {
if (this.hlF == null) {
aVC();
} else {
this.hlF.Zu().setVisibility(0);
}
this.hFQ.setGrantState(0);
this.hFR.setText(getString(bdh.h.fkS));
this.hFS.setText(getString(bdh.h.fkT));
this.hFT.setVisibility(8);
this.hFU.setVisibility(8);
this.hFV.setVisibility(8);
this.hFW.setVisibility(0);
this.hFX.setVisibility(8);
}
private void aVC() {
this.hlF = new uilib.templates.a(this);
View a = uilib.frame.f.a(bdh.g.fjc, (ViewGroup) null);
this.hFQ = (RealtimeProtectGuideStateView) a.findViewById(bdh.f.fgK);
this.hFR = (QTextView) a.findViewById(bdh.f.fgJ);
this.hFS = (QTextView) a.findViewById(bdh.f.fgL);
this.hFT = (QButton) a.findViewById(bdh.f.ffD);
this.hFU = (QButton) a.findViewById(bdh.f.ffI);
this.hFV = a.findViewById(bdh.f.ffC);
this.hFW = a.findViewById(bdh.f.fgH);
this.hFX = a.findViewById(bdh.f.fgG);
this.hlF.k(a);
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(-1, -1, akv.cRk, 67108904, -3);
layoutParams.screenOrientation = 1;
this.anA.addView(this.hlF.Zu(), layoutParams);
}
public void hT(boolean z) {
if (z) {
if (!aVD()) {
aVE();
}
} else if (!aVE()) {
aVD();
}
}
private boolean aVD() {
if (meri.service.usespermission.d.Fo() != null) {
switch (AccessHelper.Cz()) {
case -52:
aVF();
return true;
case 0:
aVG();
return true;
default:
this.hGc = 1;
aVB();
return true;
}
}
return false;
}
private boolean aVE() {
ahk xs = ahk.xs();
aav kM = xs.kM(vv.a.b.eFR);
if (kM != null) {
try {
xs.a(this.bsn, vv.a.b.eFR, kM, new ahl() {
@Override
public void kH(int i) {
}
});
finish();
if (this.hlF == null) {
return true;
}
this.anA.removeView(this.hlF.Zu());
this.hFQ.clearBitmap();
return true;
} catch (Throwable th) {
this.hGc = 1;
aVB();
return true;
}
}
return false;
}
private void aVF() {
this.hGb = 1;
if (this.hlF != null) {
this.hlF.Zu().setVisibility(8);
}
AccessHelper.aS(true);
AccessHelper.a(this, true, null, 10000L, -1, -1);
yz.c(bgh.PQ().kH(), meri.service.usespermission.c.eNT, 4);
}
private void aVG() {
yu Fo = meri.service.usespermission.d.Fo();
if (Fo != null) {
this.hGb = 2;
this.hGc = 0;
aLs();
AccessHelper.a(vv.a.b.eFM, Fo, new AccessHelper.c() {
@Override
public void onStart() {
}
@Override
public void I(int i, int i2) {
if (i2 == 2) {
RealtimeProtectGuideActivity.this.mHandler.post(new Runnable() {
@Override
public void run() {
RealtimeProtectGuideActivity.this.hGc = 1;
}
});
}
}
@Override
public void onFinish() {
RealtimeProtectGuideActivity.this.mHandler.post(new Runnable() {
@Override
public void run() {
RealtimeProtectGuideActivity.this.hGb = 0;
RealtimeProtectGuideActivity.this.aVB();
}
});
}
});
}
}
public void xp(int i) {
ArrayList arrayList = new ArrayList();
arrayList.add(String.valueOf(i));
arrayList.add(String.valueOf(this.hGa));
yz.b(bgh.PQ().kH(), meri.service.usespermission.c.eNU, arrayList, 4);
}
}