ソースを参照

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