Forráskód Böngészése

1.扫码隐私模式的合作 第一次没有显示推流问题
2.显示密钥逻辑优化
3.扫码有密码的盒子跳过后网络弹框出现后密码需要输入两次问题

huangxiaodong 1 éve%!(EXTRA string=óta)
szülő
commit
052687f803

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

@@ -122,6 +122,9 @@ UIKIT_EXTERN NSString *const Const_default_backups_path;
 /*标记默认上传路径*/
 UIKIT_EXTERN NSString *const Const_default_upload_path;
 
+/*标记默认是否显示秘钥*/
+UIKIT_EXTERN NSString *const Const_need_show_Secret_key;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 2 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.m

@@ -118,4 +118,6 @@ NSString *const Const_default_backups_path = @"/sdcard/Download/";
 /*标记默认上传路径*/
 NSString *const Const_default_upload_path = @"/sdcard/Download/";
 
+/*标记默认是否显示秘钥*/
+NSString *const Const_need_show_Secret_key = @"need_show_Secret_key";
 @end

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

@@ -39,7 +39,7 @@
 @property(nonatomic, strong)  BaseNavigationController *preRootPlayerNav;
 
 @property(nonatomic, assign)   bool isQRCodeType;//第一次 扫码进来的
-@property(nonatomic, assign)   bool isNeedToShowSecretKey;//扫码进来的SN 没有密码 则需要显示秘钥
+//@property(nonatomic, assign)   bool isNeedToShowSecretKey;//扫码进来的SN 没有密码 则需要显示秘钥
 
 @property (nonatomic, assign)  BOOL isLoginAgainType;// 单点登录 点重新登录进来的
 
@@ -56,7 +56,7 @@
         
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showLockViewFun:)  name:lockBypwdNotification  object:nil];
         
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setPwdVCFun:)  name:setPwdNotification  object:nil];
+        //[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setPwdVCFun:)  name:setPwdNotification  object:nil];
         
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forgetPwdFun:)  name:forgetPwdNotification  object:nil];
         
@@ -290,17 +290,13 @@
         if(isPrivacyMode)
         {
             [playerRootVC setShowImgAndVoiceTypeFun:NO];
+            [self showCalculatorVC];
         }
         else{
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                 mainBlock(^{
                     playerRootVC.isPwdVCShow = NO;
                     [playerRootVC setShowImgAndVoiceTypeFun:YES];
-                    
-                    if(self->_isNeedToShowSecretKey){
-                        [playerRootVC showSecretkeyFun];
-                    }
-                    
                 });
             });
         }
@@ -494,6 +490,18 @@
         return;
     }
     
+    //修复扫描已经有密码的合作 点击跳过因为网络弹框再次覆盖一次密码(需要输入两次密码)
+    BaseNavigationController*curTopNav = (BaseNavigationController*)[iTools appRootViewController];
+    if([curTopNav isKindOfClass:[BaseNavigationController class]]){
+        NSArray *vcArr = [curTopNav viewControllers];
+        if(vcArr && vcArr.count >0){
+            UIViewController *lastVC = vcArr.lastObject;
+            if([lastVC isKindOfClass:[inputPWDViewController class]]){
+                return;
+            }
+        }
+    }
+    
     /*无有效时长直接返回不加载任何加密界面*/
     NSString *PwdStr = nil;
     NSDictionary *deviceDict = [HWDataManager getObjectWithKey:Const_Have_Add_Device];
@@ -675,6 +683,7 @@
     [[uploadFileManager shareInstance] suspendUploadFileFun:YES];
     [uploadFileManager shareInstance].databaseArr = [NSMutableArray new];
     [uploadFileManager shareInstance].fileModelDataArr = [NSMutableArray new];
+    [uploadFileManager shareInstance].curUploadFileDataModel.curUploadStateType = uploadStateWait;
     
     [[downloadManager shareInstance] suspendDownloadFileFun:YES];
     [downloadManager shareInstance].databaseArr = [NSMutableArray new];
@@ -703,10 +712,10 @@
 }
 
 #pragma mark 进入设置密码
-- (void)setPwdVCFun:(NSNotification*)not
-{
-    _isNeedToShowSecretKey = YES;
-}
+//- (void)setPwdVCFun:(NSNotification*)not
+//{
+//    _isNeedToShowSecretKey = YES;
+//}
 
 #pragma mark 忘记密码
 - (void)forgetPwdFun:(NSNotification*)not

+ 2 - 1
创维盒子/双子星云手机/Class/Guide/SetPWDFirstViewController.m

@@ -31,7 +31,8 @@
     
     //发个通知 记录进入了设置密码
     if(!_isForgetPwdType){
-        [[NSNotificationCenter defaultCenter] postNotificationName:setPwdNotification object:nil];
+        //[[NSNotificationCenter defaultCenter] postNotificationName:setPwdNotification object:nil];
+        [HWDataManager setBoolWithKey:Const_need_show_Secret_key value:YES];
     }
     
 }

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

@@ -462,6 +462,11 @@ ComontAlretViewControllerDelegate>
     
     //test code
     //[self showInsertPopViewFun:@"222"];
+    
+    BOOL isNeedShowSecret = [HWDataManager getBoolWithKey:Const_need_show_Secret_key];
+    if(isNeedShowSecret){
+        [self showSecretkeyFun];
+    }
 }
 
 - (void)opencommandChannelManagerrc_openURL
@@ -1987,6 +1992,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     
     KWeakSelf
     view.didCloseSecretKeyViewTip = ^{
+        [HWDataManager setBoolWithKey:Const_need_show_Secret_key value:NO];
         self->mPlayerView.controlBtn.hidden = NO;
         [weakSelf showControlBtnTipFun];
     };