Quellcode durchsuchen

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

huangxiaodong vor 1 Jahr
Ursprung
Commit
efa5136737

+ 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"];
     }