360手机助手 v5.2.50版本的 MD5 值为:087c008db9e518cd556c792742e6830c
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.qihoo360.mobilesafe.pcdaemon.conn;
import android.content.Context;
import android.util.Log;
import com.qihoo360.mobilesafe.util.ab;
import java.lang.ref.SoftReference;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class g extends Thread {
private static final boolean a = com.qihoo.appstore.h.a.a;
private final com.qihoo360.mobilesafe.pcdaemon.c.g c;
private SoftReference d;
private ThreadPoolExecutor b = null;
private h e = new h(this);
private ConnectionAsClient f = null;
private f g = null;
public g(Context context, com.qihoo360.mobilesafe.pcdaemon.c.g gVar) {
this.c = gVar;
this.d = new SoftReference(context);
}
@Override
public void run() {
if (this.b == null) {
if (com.qihoo.appstore.h.a.a) {
Log.e("zy", "I am try to tryKillProcess ");
}
Context context = null;
if (this.d != null) {
context = (Context) this.d.get();
}
if (context != null) {
if (ab.a(context)) {
try {
sleep(200L);
} catch (Exception e) {
}
if (com.qihoo.appstore.h.a.a) {
Log.e("zy", "tryKillProcess ok ");
}
} else if (com.qihoo.appstore.h.a.a) {
Log.e("zy", "tryKillProcess fail");
}
if (com.qihoo.appstore.h.a.a) {
Log.e("zy", "I am try to bind socket ");
}
if (a) {
Log.d("ConnectionMgr", "ConnectAcceptThread Start Accepting!");
}
c();
}
}
}
public void a() {
if (this.f != null) {
this.f.b();
this.f = null;
}
if (this.g != null) {
this.g.a();
this.g = null;
}
if (this.b != null) {
try {
this.b.shutdown();
} catch (Throwable th) {
}
this.b = null;
}
}
private void c() {
Context context = null;
try {
if (this.d != null) {
context = (Context) this.d.get();
}
if (context != null) {
com.qihoo360.mobilesafe.pcdaemon.c.c i = com.qihoo360.mobilesafe.pcdaemon.c.c.i();
com.qihoo360.mobilesafe.pcdaemon.c.c.i();
i.a("READY");
if (this.b == null) {
this.b = new ThreadPoolExecutor(com.qihoo360.mobilesafe.pcdaemon.data.b.a, com.qihoo360.mobilesafe.pcdaemon.data.b.b, 5000L, TimeUnit.MILLISECONDS, new ArrayBlockingQueue(10), new com.qihoo.utils.thread.f("ConnectionMgr"), new ThreadPoolExecutor.CallerRunsPolicy());
this.b.allowCoreThreadTimeOut(true);
}
if (this.f == null && j.a()) {
this.f = new ConnectionAsClient("10.0.2.2", 3883, this.e, context);
this.f.a();
}
if (this.g == null) {
this.g = new f(3880, this.e);
this.g.start();
}
}
} catch (Exception e) {
}
}
}