Browse Source

1.优化1.3以下的镜像限制文件传输

huangxiaodong 1 year ago
parent
commit
601b165936

+ 1 - 0
创维盒子/双子星云手机/AppDelegate/AppDelegate.h

@@ -19,6 +19,7 @@
 //@property (nonatomic, strong)couldPhoneBaseInfoModel *couldPhoneBaseInfoMod;
 @property (nonatomic, assign)BOOL getSystemPermissType;//主动获取权限进入后台
 @property (nonatomic, assign)BOOL DisabledFileTransferType;//禁用文件传输
+@property (nonatomic, assign)BOOL isWebSockLinkOKAginType;//WebSock断开后或者链接上了
 +(AppDelegate*)sharedAppDelegate;
 @end
 

+ 11 - 0
创维盒子/双子星云手机/Class/Set/MySetViewController.m

@@ -157,6 +157,11 @@
     KWeakSelf
     switch (tag) {
         case 1:{
+                if(!ksharedAppDelegate.isWebSockLinkOKAginType){
+                    [[iToast makeText:NSLocalizedString(@"check_could_phone_state",nil)] show];
+                    return;
+                }
+            
                 fileTransfeSetViewController *nextVC = [fileTransfeSetViewController new];
                 [self.navigationController pushViewController:nextVC animated:YES];
             }
@@ -169,6 +174,12 @@
                 return;
             }
             
+            if(!ksharedAppDelegate.isWebSockLinkOKAginType){
+                [[iToast makeText:NSLocalizedString(@"check_could_phone_state",nil)] show];
+                return;
+            }
+            
+
             fileTransferPopView * fileTransferPopV = [[fileTransferPopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
             if(tag==2){
                 fileTransferPopV.fileTransferType =1;

+ 5 - 0
创维盒子/双子星云手机/Class/Set/view/mySetHeadView.m

@@ -569,6 +569,11 @@
                 return;
             }
             
+            if(!ksharedAppDelegate.isWebSockLinkOKAginType){
+                [[iToast makeText:NSLocalizedString(@"check_could_phone_state",nil)] show];
+                return;
+            }
+            
             //相册权限
             if (![[TZImageManager manager] authorizationStatusAuthorized]){
                 [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {

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

@@ -121,7 +121,7 @@ ComontAlretViewControllerDelegate>
     NSTimer *forceStartTimer;//请知重启timer
     
     int preIFrameNum;
-    BOOL isWebSockLinkOKAginType;//WebSock断开后或者链接上了
+    
     
 }
 @property (nonatomic, strong, nullable) RCVideoRecoderManager *recoderManager;
@@ -811,7 +811,7 @@ ComontAlretViewControllerDelegate>
             }
             
         } failure:^(NSError *error) {
-            self->isWebSockLinkOKAginType = NO;
+            ksharedAppDelegate.isWebSockLinkOKAginType = NO;
             [self showNetErrorAlertFun:2];
             [self WebSocketNeedRelinkFun];
         }];
@@ -1711,7 +1711,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
 #pragma mark 盒子链接成功后需要处理的各种各样事情
 - (void)handlAllMsgAfterDidLinkFun
 {
-    self->isWebSockLinkOKAginType = YES;
+    ksharedAppDelegate.isWebSockLinkOKAginType = YES;
     
     //获取云机尺寸 兼容 720*1080 &1080*1920 不同分辨率的展示和触控
     NSString *getPhoneSizeStr = [RCCommandHelp getPhoneSizecommand];
@@ -2199,7 +2199,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     
     if(linkFailAlretVC
        ||[connectDeviceManager shareInstance].isReInitType//瑞云重新init 耗时2-7s 他们说的
-       ||(self->isWebSockLinkOKAginType && type == 2) //重连上了但是延时消息来了
+       ||(ksharedAppDelegate.isWebSockLinkOKAginType && type == 2) //重连上了但是延时消息来了
        ){
         return;
     }

+ 1 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -405,3 +405,4 @@
 5、备份文件时,请保持APP前台运行,退出将会导致传输中断;\n
 6、备份文件时,可能会影响云机操作体验,建议先完成文件传输再进行云机操作;";
 "File_Transfer_Disable_tip"   = "此功能暂时无法使用,请插拔电源更新设备。恢复电源和网络后,预计需要15分钟完成更新,更新期间将无法使用云机。";
+"check_could_phone_state"   = "请先进入云机后再进行操作!";