|
|
@@ -369,7 +369,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
|
|
|
//在这里处理任务执行中的状态,如进度进度条的刷新
|
|
|
@Download.onTaskRunning
|
|
|
protected void running(DownloadTask task) {
|
|
|
- if(TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
+ if(gameEntity == null || TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
return;
|
|
|
}
|
|
|
if (find_game_down_tv != null && gameEntity.downLinks().equals(task.getKey())) {
|
|
|
@@ -379,7 +379,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
@Download.onTaskStop
|
|
|
void taskStop(DownloadTask task) {
|
|
|
- if(TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
+ if(gameEntity == null || TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
return;
|
|
|
}
|
|
|
if (find_game_down_tv != null && gameEntity.downLinks().equals(task.getKey())) {
|
|
|
@@ -393,7 +393,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
@Download.onTaskCancel
|
|
|
void taskCancel(DownloadTask task) {
|
|
|
- if(TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
+ if(gameEntity == null || TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
return;
|
|
|
}
|
|
|
if (find_game_down_tv != null && gameEntity.downLinks().equals(task.getKey())) {
|
|
|
@@ -403,7 +403,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
@Download.onTaskFail
|
|
|
void taskFail(DownloadTask task) {
|
|
|
- if(TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
+ if(gameEntity == null || TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
return;
|
|
|
}
|
|
|
if (find_game_down_tv != null && gameEntity.downLinks().equals(task.getKey())) {
|
|
|
@@ -413,7 +413,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
|
|
|
|
|
|
@Download.onTaskComplete
|
|
|
void taskComplete(DownloadTask task) {
|
|
|
- if(TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
+ if(gameEntity == null || TextUtils.isEmpty(gameEntity.downLinks())) {//游戏任务
|
|
|
return;
|
|
|
}
|
|
|
if (find_game_down_tv != null && gameEntity.downLinks().equals(task.getKey())) {
|
|
|
@@ -429,7 +429,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
|
|
|
public void onEventMainThread(Intent intent) {
|
|
|
if (intent != null && intent.getAction() != null && intent.getDataString() != null && intent.getDataString().contains("package:")) {
|
|
|
String packageName = intent.getDataString().replace("package:", "");
|
|
|
- if (!TextUtils.equals(packageName, playGameEntity.getPackage_names())) {
|
|
|
+ if (playGameEntity == null || !TextUtils.equals(packageName, playGameEntity.getPackage_names())) {
|
|
|
return;
|
|
|
}
|
|
|
|