Bladeren bron

1.隐私模式挤下线等输入密码框后再显示

huangxiaodong 10 maanden geleden
bovenliggende
commit
39b54bc6cc

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

@@ -34,6 +34,9 @@
 @property (nonatomic, copy) NSString * NASShareFileService;//走公网的
 @property (nonatomic, copy) NSString * NASFileByBoxService;//本盒子的IP
 
+//与 isFirstInputPwdDone 有重复的地方 后续优化
+@property (nonatomic, assign)  BOOL isDidShowPwdType;// 是否显示密码界面了
+
 @property (nonatomic, assign)BOOL supportScreenRotateType;
 +(AppDelegate*)sharedAppDelegate;
 @end

+ 7 - 7
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -61,7 +61,7 @@
 @property (nonatomic, assign)  BOOL isLoginAgainType;// 单点登录 点重新登录进来的
 
 @property (nonatomic, assign)  BOOL isNeedToStopWork;// 无网络报错
-@property (nonatomic, assign)  BOOL isDidShowPwdType;// 是否显示密码界面了
+
 
 @property(nonatomic, copy)   NSString *getShareStr;//拿到分享的字符串
 
@@ -748,7 +748,7 @@
         [self closeCalculatorVC];
         _inputVC = [[inputPWDViewController alloc] init];
         [self.window addSubview:_inputVC.view];
-        _isDidShowPwdType = YES;
+        ksharedAppDelegate.isDidShowPwdType = YES;
     }
     else if (maskModel == 2){
         /*浏览器*/
@@ -757,14 +757,14 @@
         _webVC.pwd = PwdStr;
         _webVC.webUrl = @"https://baidu.com";
         [self.window addSubview:_webVC.view];
-        _isDidShowPwdType = YES;
+        ksharedAppDelegate.isDidShowPwdType = YES;
     }else{
         /*计算器*/
         [self closeCalculatorVC];
         _calculatorVC = [[CalculatorViewController alloc] init];
         _calculatorVC.pwd = PwdStr;
         [self.window addSubview:_calculatorVC.view];
-        _isDidShowPwdType = YES;
+        ksharedAppDelegate.isDidShowPwdType = YES;
     }
     
     [[NSNotificationCenter defaultCenter] postNotificationName:ShowPwdVCNotification object:nil];
@@ -786,7 +786,7 @@
     if(_inputVC){
         [_inputVC.view removeFromSuperview];
     }
-    _isDidShowPwdType = NO;
+    ksharedAppDelegate.isDidShowPwdType = NO;
     
     if(self->_session && self->_connectionOptions){
         [self scene:self->_session openURLContexts:self->_connectionOptions.URLContexts];
@@ -1044,7 +1044,7 @@
 {
     NSInteger maskModel = [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
     
-    if(maskModel !=0 && _isDidShowPwdType){
+    if(maskModel !=0 && ksharedAppDelegate.isDidShowPwdType){
         return;
     }
     
@@ -1336,7 +1336,7 @@
 - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
 {
     NSInteger index = tabBarController.selectedIndex;
-    //HLog(@"hxd %ld",index);
+
     
     int eventType = 1;
     NSString* eventValue = @"Nas";

+ 7 - 5
创维盒子/双子星云手机/Class/Calculator/CalculatorViewController.m

@@ -412,13 +412,15 @@
                     }
                     
                     [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
-                    
+                    ksharedAppDelegate.isDidShowPwdType = NO;
                     [self.view removeFromSuperview];
                     //被别的设备挤下线 重新链接 如果是链接中 走这个函数会被return
-                    [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
-                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                        [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
-                    });
+                    if(![webSocketManager shareInstance].isWaitShowLogoutAlert){
+                        [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
+                        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                            [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
+                        });
+                    }
                 }
 
         }

+ 7 - 5
创维盒子/双子星云手机/Class/Controller/HWWebViewController.m

@@ -354,13 +354,15 @@
                         }
                         
                         [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
-                        
+                        ksharedAppDelegate.isDidShowPwdType = NO;
                         [self.view removeFromSuperview];
                         //被别的设备挤下线 重新链接 如果是链接中 走这个函数会被return
-                        [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
-                        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                            [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
-                        });
+                        if(![webSocketManager shareInstance].isWaitShowLogoutAlert){
+                            [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
+                            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                                [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
+                            });
+                        }
                     }
                     else if([text isEqualToString:keyToForgetPwd]){
                         [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdNotification object:nil];

+ 9 - 5
创维盒子/双子星云手机/Class/Guide/inputPWDViewController.m

@@ -514,15 +514,19 @@
     }
     
     [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
+    ksharedAppDelegate.isDidShowPwdType = NO;
+    
     if(_isQRCodeType){
         [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
     }
    
-    //被别的设备挤下线 重新链接 如果是链接中 走这个函数会被return
-    [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
-    });
+    //非隐私模式被别的设备挤下线 重新链接 如果是链接中 走这个函数会被return
+    if(![webSocketManager shareInstance].isWaitShowLogoutAlert){
+        [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
+        });
+    }
     
     //view 加载在windows上
     [self.view removeFromSuperview];

+ 1 - 2
创维盒子/双子星云手机/Class/Set/previewFile/videoPlayByAVPlayerViewController.m

@@ -207,7 +207,7 @@
     
     UIDeviceOrientation  orient = [UIDevice currentDevice].orientation; 
     
-    HLog(@"hxd 333333 orientChangeFun :%d--%ld",_didHandlePortraitType,orient)
+    HLog(@"orientChangeFun :%d--%ld",_didHandlePortraitType,orient)
     if(_didHandlePortraitType && orient == UIDeviceOrientationPortrait){
         return;
     }
@@ -259,7 +259,6 @@
 
 - (void)handleDeviceOrientationChange
 {
-    HLog(@"hxd 333333")
     [self orientChangeFun];
 }
 #pragma mark 竖屏转横屏

+ 0 - 8
创维盒子/双子星云手机/connectDeviceManager/connectDeviceManager.m

@@ -625,33 +625,25 @@ static connectDeviceManager *connectDeviceManagerInstance = nil;
         return;
     }
     
-    //HLog(@"WebSocket11111  hxd-1")
     //局域网不通 瑞云还没连接好
     if(!self.isPingOk && !didRuiyunLinkType){
         return;
     }
 
     //切换设备
-    //HLog(@"WebSocket11111  hxd0")
     if([webSocketManager shareInstance].commandChannelManager){
         
 //        [[webSocketManager shareInstance].commandChannelManager rc_close];
 //        [webSocketManager shareInstance].commandChannelManager = nil;
         ksharedAppDelegate.isWebSockLinkOKAginType = NO;
-        
-        //HLog(@"WebSocket11111  hxd1")
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            //HLog(@"WebSocket11111  hxd2")
             if([connectDeviceManager shareInstance].isFirstInputPwdDone){
-                //HLog(@"WebSocket11111  hxd3")
                 [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
             }
         });
     }
     else{//第一次启动
-        //HLog(@"WebSocket11111  hxd10")
         if([connectDeviceManager shareInstance].isFirstInputPwdDone){
-            //HLog(@"WebSocket11111  hxd11")
             [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
         }
     }