TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 GameHeroesProtocol.java 源代码,内容仅作参考
package com.tencent.av.guild;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import com.tencent.av.app.SessionInfo;
import com.tencent.av.app.VideoAppInterface;
import com.tencent.av.utils.ImageResUtil;
import com.tencent.common.app.AppInterface;
import com.tencent.common.config.AppSetting;
import com.tencent.mobileqq.filemanager.util.FileUtil;
import com.tencent.mobileqq.mqsafeedit.MD5;
import com.tencent.mobileqq.unifiedebug.UnifiedTraceRouter;
import com.tencent.mobileqq.utils.HttpDownloadUtil;
import com.tencent.qphone.base.util.QLog;
import java.io.File;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import mqq.manager.TicketManager;
public class GameHeroesProtocol {
static final String f81372a = "GameHeroesProtocol";
static final String f81373b = "http://league.gamecenter.qq.com/cgi-bin/gc_league_asyn_fcgi";
public VideoAppInterface f1360a;
public String f81374c;
public String e;
public fnp f1361a = null;
public Map f1362a = new ConcurrentHashMap();
public String d = AppSetting.g;
public GameHeroesProtocol(VideoAppInterface videoAppInterface) {
this.f1360a = null;
this.f1360a = videoAppInterface;
this.f81374c = this.f1360a.getAccount();
this.e = ((TicketManager) this.f1360a.getManager(2)).getSkey(this.f81374c);
}
public void a(fnp fnpVar) {
this.f1361a = fnpVar;
}
public void a(String str, long j, SessionInfo.HeroDetail heroDetail) {
long j2;
long parseLong;
if (heroDetail != null) {
if (str != null) {
try {
parseLong = Long.parseLong(str);
} catch (NumberFormatException e) {
j2 = -1;
}
} else {
parseLong = -1;
}
j2 = parseLong;
if (j2 == -1 || j == -1) {
heroDetail.f81252a--;
if (this.f1361a != null) {
this.f1361a.mo458a();
return;
}
return;
}
String str2 = "" + j2 + j;
if (((fnq) this.f1362a.get(str2)) == null) {
if (QLog.isColorLevel()) {
QLog.d(f81372a, 2, "[GameHeroesProtocol] ====== pull info ====== uin(" + str + "), groupId(" + j + UnifiedTraceRouter.f);
}
fnq fnqVar = new fnq(this, j2, j, heroDetail);
this.f1362a.put(str2, fnqVar);
fnqVar.start();
}
}
}
void a(long j, long j2) {
if (j != -1 && j2 != -1) {
fnq fnqVar = (fnq) this.f1362a.get("" + j + j2);
if (fnqVar != null) {
fnqVar.m11205a();
}
}
}
public Bitmap a(String str) {
try {
String str2 = ImageResUtil.a() + MD5.toMD5(str) + str.substring(str.lastIndexOf("."));
if (!FileUtil.m6632b(str2)) {
boolean m9191a = HttpDownloadUtil.m9191a((AppInterface) this.f1360a, str, new File(str2));
if (QLog.isColorLevel()) {
QLog.d(f81372a, 2, "[GameHeroesProtocol] download hero url=" + str + ", path=" + str2 + ", ret=" + m9191a);
}
} else if (QLog.isColorLevel()) {
QLog.d(f81372a, 2, "[GameHeroesProtocol] download hero exited file=" + str2);
}
if (FileUtil.m6632b(str2)) {
try {
return BitmapFactory.decodeFile(str2);
} catch (OutOfMemoryError e) {
return null;
}
}
return null;
} catch (Exception e2) {
return null;
}
}
}