|
|
@@ -35,6 +35,9 @@ import static com.sheep.gamegroup.model.entity.TaskEty.TASK_TYPE_APP;
|
|
|
* 下载游戏辅助类
|
|
|
*/
|
|
|
public class DownloadHelper {
|
|
|
+
|
|
|
+ private final static int LAST_CLICK_TIME = 101;
|
|
|
+
|
|
|
private int downLoadType;
|
|
|
|
|
|
/**
|
|
|
@@ -74,9 +77,17 @@ public class DownloadHelper {
|
|
|
down_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
+ Object obj = view.getTag(LAST_CLICK_TIME);
|
|
|
+ if (obj != null) {
|
|
|
+ Long lastClickTime = (Long) obj;
|
|
|
+ if (System.currentTimeMillis() - lastClickTime < 3000) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (callBack != null)
|
|
|
callBack.call(-1);
|
|
|
downloadApp(iTask);
|
|
|
+ view.setTag(LAST_CLICK_TIME, new Long(System.currentTimeMillis()));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -167,7 +178,7 @@ public class DownloadHelper {
|
|
|
action1.call(true);
|
|
|
if (isInstalled) {
|
|
|
boolean needUpgrade = false;
|
|
|
- if(!TextUtils.isEmpty(taskEty.getVersions())) {
|
|
|
+ if (!TextUtils.isEmpty(taskEty.getVersions())) {
|
|
|
needUpgrade = PackageUtil.needAppUpgrade(SheepApp.getInstance(), taskEty.getPackage_names(), taskEty.getVersions());
|
|
|
}
|
|
|
if (!needUpgrade) {
|