Bladeren bron

1.推流页横屏时 锁屏问题修复

huangxiaodong 7 maanden geleden
bovenliggende
commit
241fd4034b

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

@@ -154,6 +154,12 @@
         return (UIInterfaceOrientationMask)orientationMask;
     }
     HLog(@"处理旋转屏幕:%d",self.supportScreenRotateType)
+    
+    //显示密码了
+    if(ksharedAppDelegate.isDidShowPwdType){
+        return UIInterfaceOrientationMaskPortrait;
+    }
+    
     if(self.supportScreenRotateType){
         return UIInterfaceOrientationMaskAllButUpsideDown;
     }

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

@@ -602,23 +602,31 @@
 - (void)sceneDidEnterBackground:(UIScene *)scene  API_AVAILABLE(ios(13.0)){
     HLog(@"sceneDidEnterBackground")
     
-    BOOL isNeeddelayedType = NO;
-    //这里强制竖屏 处理图片详情 和视频详情的横屏情况
-    BaseNavigationController*mainNav =  ksharedAppDelegate.mainTabBar.selectedViewController;
-    if([mainNav isKindOfClass:[BaseNavigationController class]]){
-        NSArray* vcArr =  mainNav.viewControllers;
-        
-        if(vcArr.count >= 2){
-            UIViewController *curVC = vcArr.lastObject;
-            if([curVC isKindOfClass:[imageDetailsScrollViewController class]]
-               ||[curVC isKindOfClass:[videoPlayByAVPlayerViewController class]]
-               ||[curVC isKindOfClass:[webRtcPlayerViewController class]]){
-                //切换到竖屏
-                ksharedAppDelegate.supportScreenRotateType = YES;
-                [curVC hx_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
-                //ksharedAppDelegate.supportScreenRotateType = NO;
-                isNeeddelayedType = YES;
-                HLog(@"sceneDidEnterBackground 旋转屏幕为竖屏")
+    BOOL isPrivacyMode = [HWDataManager getBoolWithKey:Const_Have_Add_Device_Privacy_Mode];
+    
+    if(ksharedAppDelegate.DeviceThirdIdMod){
+        isPrivacyMode = ksharedAppDelegate.DeviceThirdIdMod.data.isPrivacyMode;
+    }
+    
+    if(isPrivacyMode){//隐私模式 需要弹密码框 转竖屏
+        BOOL isNeeddelayedType = NO;
+        //这里强制竖屏 处理图片详情 和视频详情的横屏情况
+        BaseNavigationController*mainNav =  ksharedAppDelegate.mainTabBar.selectedViewController;
+        if([mainNav isKindOfClass:[BaseNavigationController class]]){
+            NSArray* vcArr =  mainNav.viewControllers;
+            
+            if(vcArr.count >= 2){
+                UIViewController *curVC = vcArr.lastObject;
+                if([curVC isKindOfClass:[imageDetailsScrollViewController class]]
+                   ||[curVC isKindOfClass:[videoPlayByAVPlayerViewController class]]
+                   ||[curVC isKindOfClass:[webRtcPlayerViewController class]]){
+                    //切换到竖屏
+                    ksharedAppDelegate.supportScreenRotateType = YES;
+                    [curVC hx_rotateToInterfaceOrientation:UIInterfaceOrientationPortrait];
+                    //ksharedAppDelegate.supportScreenRotateType = NO;
+                    isNeeddelayedType = YES;
+                    HLog(@"sceneDidEnterBackground 旋转屏幕为竖屏")
+                }
             }
         }
     }