浏览代码

【IOS】上传过程中,开启后台运行,后关闭后台运行,退出后台,剩余任务仍全部上传成功(在开关关闭后不切页面直接退回后台)

huangxiaodong 1 年之前
父节点
当前提交
efa5136737
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

+ 2 - 1
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -463,8 +463,9 @@
    BOOL isBackupsingType = [[backupsFileManager shareInstance] checkBackupsingFun];
    BOOL isUploadingType = [[uploadFileManager shareInstance] checkUploadingFun];
    BOOL isDownloadingType = [[downloadManager shareInstance] checkDownloadingFun];
+   BOOL isBackground = [HWDataManager getBoolWithKey:stringKeyAddSn(Const_file_Transfe_working_background)];
     
-    if (isBackupsingType || isUploadingType || isDownloadingType) {
+    if ((isBackupsingType || isUploadingType || isDownloadingType) && isBackground) {
         HLog(@"后台保活中");
         [cachesFileManager writeLogsWithMsg:@"Background working"];
     }