光环助手V3.7.2 RELEASE 20200117-1830 测试汇总 3,4 https://gitlab.ghzs.com/pm/halo-app-issues/issues/764

This commit is contained in:
张玉久
2020-01-19 15:34:26 +08:00
parent 347cfdb72d
commit dcfa4fdaaf
3 changed files with 50 additions and 12 deletions

View File

@ -2,6 +2,7 @@ package com.gh.download.cache;
import com.danikula.videocache.file.FileNameGenerator;
import com.danikula.videocache.file.Md5FileNameGenerator;
import com.gh.common.AppExecutor;
import com.halo.assistant.HaloApp;
import com.shuyu.gsyvideoplayer.utils.StorageUtils;
@ -214,10 +215,12 @@ public class CacheManager {
}
public void removeAllCall() {
for (Map.Entry<String, Call> entry : getDownCalls().entrySet()) {
entry.getValue().cancel();
}
getDownCalls().clear();
AppExecutor.getIoExecutor().execute(() -> {
for (Map.Entry<String, Call> entry : getDownCalls().entrySet()) {
entry.getValue().cancel();
}
AppExecutor.getUiExecutor().execute(() -> getDownCalls().clear());
});
}
private List<File> getAllFile() {