Преглед изворни кода

1.去掉后台回到前面检查盒子状态需求
2.需求:客户端删除自动上报日志逻辑,仅保留用户手动上报日志逻辑。

huangxiaodong пре 1 недеља
родитељ
комит
316190dd0a

+ 83 - 83
创维盒子/code/NAS/NASViewController.m

@@ -1012,92 +1012,92 @@
     //[self beginShowAlertFun];
     //后台回来点击首页无效问题
     //self.tableView.userInteractionEnabled = YES;
-    [self checkBoxHeartbeatFun];
+    //[self checkBoxHeartbeatFun];
 }
 
-#pragma mark 检测盒子的心跳情况
-- (void)checkBoxHeartbeatFun
-{
-    //2、点击系统升级弹框确定按钮后30分钟内不弹;
-    NSNumber *preSecondNum =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type1_BoxHeartbeat")];
-    if(preSecondNum){
-        long seconds =  [iTools getNowTimeStamp];
-        if(seconds - preSecondNum.longValue <= 60*30){
-            return;
-        }
-    }
-    
-    //3、重启、恢复出厂设备、首次设置密码 3个情况下8分钟之内不弹
-    NSNumber *preSecondNum2 =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type2_BoxHeartbeat")];
-    if(preSecondNum2){
-        long seconds =  [iTools getNowTimeStamp];
-        if(seconds - preSecondNum2.longValue <= 60*8){
-            return;
-        }
-    }
-    
-    if(ksharedAppDelegate.didShowBoxHeartbeatAlertType
-       ||[webRtcManager shareManager].isResetingType
-       ||[webRtcManager shareManager].isRebootIngType
-       || [ksharedAppDelegate didShowImageRenewViewFun]){
-        return;
-    }
-    
-    //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
-    if(ksharedAppDelegate.isDidShowPwdType){
-        KWeakSelf
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [weakSelf checkBoxHeartbeatFun];
-        });
-        
-        return;
-    }
-    
-    //test code
-//    [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
-//                
+//#pragma mark 检测盒子的心跳情况
+//- (void)checkBoxHeartbeatFun
+//{
+//    //2、点击系统升级弹框确定按钮后30分钟内不弹;
+//    NSNumber *preSecondNum =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type1_BoxHeartbeat")];
+//    if(preSecondNum){
+//        long seconds =  [iTools getNowTimeStamp];
+//        if(seconds - preSecondNum.longValue <= 60*30){
+//            return;
+//        }
+//    }
+//    
+//    //3、重启、恢复出厂设备、首次设置密码 3个情况下8分钟之内不弹
+//    NSNumber *preSecondNum2 =  [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type2_BoxHeartbeat")];
+//    if(preSecondNum2){
+//        long seconds =  [iTools getNowTimeStamp];
+//        if(seconds - preSecondNum2.longValue <= 60*8){
+//            return;
+//        }
+//    }
+//    
+//    if(ksharedAppDelegate.didShowBoxHeartbeatAlertType
+//       ||[webRtcManager shareManager].isResetingType
+//       ||[webRtcManager shareManager].isRebootIngType
+//       || [ksharedAppDelegate didShowImageRenewViewFun]){
+//        return;
+//    }
+//    
+//    //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
+//    if(ksharedAppDelegate.isDidShowPwdType){
+//        KWeakSelf
+//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//            [weakSelf checkBoxHeartbeatFun];
+//        });
+//        
+//        return;
+//    }
+//    
+//    //test code
+////    [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
+////                
+////    }];
+//    
+//    if(ksharedAppDelegate.isWebSockLinkOKAginType && ksharedAppDelegate.cloudPhoneExtraFileListMod){
+//        return;
+//    }
+//    
+//    NSMutableDictionary *paraDict = [NSMutableDictionary new];
+//   
+//    KWeakSelf
+//    [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryHeartbeat Parameters:paraDict success:^(id  _Nonnull responseObject){
+//        queryHeartbeatModel *heartbeatMod = [[queryHeartbeatModel alloc] initWithDictionary:responseObject error:nil];
+//        if(heartbeatMod && heartbeatMod.data){
+//            [weakSelf checkBoxHeartbeatToShowPopViewFunBy:heartbeatMod];
+//        }
+//        
+//    } failure:^(NSError * _Nonnull error) {
 //    }];
-    
-    if(ksharedAppDelegate.isWebSockLinkOKAginType && ksharedAppDelegate.cloudPhoneExtraFileListMod){
-        return;
-    }
-    
-    NSMutableDictionary *paraDict = [NSMutableDictionary new];
-   
-    KWeakSelf
-    [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryHeartbeat Parameters:paraDict success:^(id  _Nonnull responseObject){
-        queryHeartbeatModel *heartbeatMod = [[queryHeartbeatModel alloc] initWithDictionary:responseObject error:nil];
-        if(heartbeatMod && heartbeatMod.data){
-            [weakSelf checkBoxHeartbeatToShowPopViewFunBy:heartbeatMod];
-        }
-        
-    } failure:^(NSError * _Nonnull error) {
-    }];
-
-}
-
-#pragma mark 根据盒子的心跳情况 显示异常谈了
-- (void)checkBoxHeartbeatToShowPopViewFunBy:(queryHeartbeatModel*)heartbeatMod
-{
-    if(!heartbeatMod || !heartbeatMod.data){
-        return;
-    }
-    
-    if (//!heartbeatMod.data.frpStatus&&
-        !heartbeatMod.data.hostAgentStatus
-        &&!heartbeatMod.data.containerAgentStatus) {//全部异常
-        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:1 didClickBut:^(NSInteger tag) {
-                    
-        }];
-    }
-    else if (heartbeatMod.data.hostAgentStatus
-            //&& !heartbeatMod.data.frpStatus
-            && !heartbeatMod.data.containerAgentStatus) {//frp异常
-        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
-                    
-        }];
-    }
-}
+//
+//}
+//
+//#pragma mark 根据盒子的心跳情况 显示异常谈了
+//- (void)checkBoxHeartbeatToShowPopViewFunBy:(queryHeartbeatModel*)heartbeatMod
+//{
+//    if(!heartbeatMod || !heartbeatMod.data){
+//        return;
+//    }
+//    
+//    if (//!heartbeatMod.data.frpStatus&&
+//        !heartbeatMod.data.hostAgentStatus
+//        &&!heartbeatMod.data.containerAgentStatus) {//全部异常
+//        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:1 didClickBut:^(NSInteger tag) {
+//                    
+//        }];
+//    }
+//    else if (heartbeatMod.data.hostAgentStatus
+//            //&& !heartbeatMod.data.frpStatus
+//            && !heartbeatMod.data.containerAgentStatus) {//frp异常
+//        [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
+//                    
+//        }];
+//    }
+//}
 
 #pragma mark 输入密码完成
 - (void)didInpuPwdOkFun

+ 12 - 12
创维盒子/code/webRtc/webRtcManager/webRtcManager.m

@@ -74,12 +74,12 @@
             tryRelinkNum ++;
             if(tryRelinkNum == 2){
                 _didReportWebRtcFailType = YES;
-                KWeakSelf
-                globalBlock(^{
-                    [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
-                        [weakSelf reportWebRtcRePoportTypeIsChannel:YES withStats:nil withSessionId:self->_webRtcChannelSessionId withLogKey:key];
-                    }];
-                });
+//                KWeakSelf
+//                globalBlock(^{
+//                    [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
+//                        [weakSelf reportWebRtcRePoportTypeIsChannel:YES withStats:nil withSessionId:self->_webRtcChannelSessionId withLogKey:key];
+//                    }];
+//                });
                 //检测盒子心跳
                 [self checkBoxHeartbeatFun];
             }
@@ -1016,12 +1016,12 @@
         case RTCIceConnectionStateClosed:{
             if(!_didReportWebRtcFailType && state == RTCIceConnectionStateFailed){//还没上报过通道链接情况
                 _didReportWebRtcFailType = YES;
-                KWeakSelf
-                globalBlock(^{
-                    [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
-                        [weakSelf reportWebRtcRePoportTypeIsChannel:YES withStats:nil withSessionId:self->_webRtcChannelSessionId withLogKey:key];
-                    }];
-                });
+//                KWeakSelf
+//                globalBlock(^{
+//                    [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
+//                        [weakSelf reportWebRtcRePoportTypeIsChannel:YES withStats:nil withSessionId:self->_webRtcChannelSessionId withLogKey:key];
+//                    }];
+//                });
                 
             }
             //链接关闭

+ 10 - 10
创维盒子/code/webRtc/webRtcPlayerViewController.m

@@ -431,11 +431,11 @@
                     tryRelinkNum = 0;
                     _didReportWebRtcFailType = YES;
                     
-                    globalBlock(^{
-                        [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
-                            [[webRtcManager shareManager] reportWebRtcRePoportTypeIsChannel:NO withStats:nil withSessionId:self->_webRtcPlayerSessionId withLogKey:key];
-                        }];
-                    });
+//                    globalBlock(^{
+//                        [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
+//                            [[webRtcManager shareManager] reportWebRtcRePoportTypeIsChannel:NO withStats:nil withSessionId:self->_webRtcPlayerSessionId withLogKey:key];
+//                        }];
+//                    });
                     
                     
                     //[self showLinkPhoneErrorFun];
@@ -1172,11 +1172,11 @@
         case RTCIceConnectionStateClosed:{
             if(!_didReportWebRtcFailType && state == RTCIceConnectionStateFailed){//还没上报过通道链接情况
                 _didReportWebRtcFailType  = YES;
-                globalBlock(^{
-                    [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
-                        [[webRtcManager shareManager] reportWebRtcRePoportTypeIsChannel:NO withStats:nil withSessionId:self->_webRtcPlayerSessionId withLogKey:key];
-                    }];
-                });
+//                globalBlock(^{
+//                    [[addLogObject shareInstance] gotoAddLogFunBySuccess:^(NSString * _Nonnull key) {
+//                        [[webRtcManager shareManager] reportWebRtcRePoportTypeIsChannel:NO withStats:nil withSessionId:self->_webRtcPlayerSessionId withLogKey:key];
+//                    }];
+//                });
             }
             //链接关闭
             [self relinkWebRtcFun];