屏蔽下载限速,修复专题详情闪退问题

This commit is contained in:
chenjuntao
2020-01-19 11:13:17 +08:00
parent 4840c5c604
commit cc75cb497d
2 changed files with 7 additions and 4 deletions

View File

@ -39,7 +39,6 @@ import com.lightgame.download.DownloadConfig;
import com.lightgame.download.DownloadDao;
import com.lightgame.download.DownloadEntity;
import com.lightgame.download.DownloadService;
import com.lightgame.download.DownloadSpeedController;
import com.lightgame.download.DownloadStatus;
import com.lightgame.download.DownloadStatusListener;
import com.lightgame.download.DownloadStatusManager;
@ -664,11 +663,11 @@ public class DownloadManager implements DownloadStatusListener {
}
public void disableDownloadSpeedLimit() {
DownloadSpeedController.disableSpeedLimit();
// DownloadSpeedController.disableSpeedLimit();
}
public void updateSpeedLimitationReleaseDelay(int delay) {
DownloadSpeedController.updateLimitationReleaseDelay(delay);
// DownloadSpeedController.updateLimitationReleaseDelay(delay);
}
public void checkRetryDownload() {

View File

@ -13,6 +13,7 @@ import com.gh.gamecenter.R
import com.gh.gamecenter.baselist.ListFragment
import com.gh.gamecenter.baselist.LoadType
import com.gh.gamecenter.entity.GameEntity
import com.gh.gamecenter.entity.SubjectData
import com.gh.gamecenter.eventbus.EBDownloadStatus
import com.gh.gamecenter.eventbus.EBPackage
import com.gh.gamecenter.game.columncollection.detail.ColumnCollectionDetailActivity
@ -66,7 +67,10 @@ class SubjectListFragment : ListFragment<GameEntity, SubjectListViewModel>(), On
val factory = SubjectListViewModel.Factory(HaloApp.getInstance().application
, arguments?.getParcelable(EntranceUtils.KEY_SUBJECT_DATA)!!)
if (requireContext() is SubjectActivity) {
mSubjectViewModel = viewModelProviderFromParent()
requireActivity().intent.getParcelableExtra<SubjectData>(EntranceUtils.KEY_SUBJECT_DATA)?.let {
val f = SubjectViewModel.Factory(HaloApp.getInstance().application, it)
mSubjectViewModel = viewModelProviderFromParent(f)
}
}
return ViewModelProviders.of(this, factory).get(SubjectListViewModel::class.java)
}