Browse Source

1.重启盒子应该提示:设备重启成功

huangxiaodong 6 months ago
parent
commit
9f2f2cf6cb

+ 2 - 0
创维盒子/code/NAS/BoxHeartbeatAlertTool/BoxHeartbeatReStartSucView.h

@@ -10,7 +10,9 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface BoxHeartbeatReStartSucView : UIView
+@property(nonatomic,assign)NSInteger type;//1 云手机 2 盒子
 
+- (id)initWithType:(NSInteger)type;
 @end
 
 NS_ASSUME_NONNULL_END

+ 17 - 2
创维盒子/code/NAS/BoxHeartbeatAlertTool/BoxHeartbeatReStartSucView.m

@@ -9,9 +9,19 @@
 
 @implementation BoxHeartbeatReStartSucView
 
-- (id)initWithFrame:(CGRect)frame{
-    self = [super initWithFrame:frame];
+//- (id)initWithFrame:(CGRect)frame{
+//    self = [super initWithFrame:frame];
+//    self.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
+//    [self drawAnyView];
+//    
+//    return self;
+//}
+
+- (id)initWithType:(NSInteger)type
+{
+    self = [super init];
     self.backgroundColor = [UIColor hwColor:@"000000" alpha:0.6];
+    self.type = type;
     [self drawAnyView];
     
     return self;
@@ -59,6 +69,11 @@
     }];
     
     NSString *curTitleStr = NSLocalizedString(@"Heartbeat_box_restart_Suc_phone",nil);
+    
+    if(_type == 2){
+        curTitleStr = NSLocalizedString(@"Heartbeat_box_restart_Suc_Box",nil);
+    }
+    
     UILabel *titleLab = [[UILabel alloc] init];
     titleLab.text = curTitleStr;
     titleLab.numberOfLines = 0;

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

@@ -224,14 +224,14 @@
     if(ksharedAppDelegate.needToShowReStratSucType){
         ksharedAppDelegate.needToShowReStratSucType = NO;
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [self showReStartSucFun];
+            [self showReStartSucFun:1];
         });
     }
     
     if(self.isReRestartIngBoxType){
         self.isReRestartIngBoxType = NO;
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [self showReStartSucFun];
+            [self showReStartSucFun:2];
         });
     }
     
@@ -1187,14 +1187,14 @@
     }
 }
 
-#pragma mark 显示重启成功
-- (void)showReStartSucFun
+#pragma mark 显示重启成功 type:1 云手机 2 盒子
+- (void)showReStartSucFun:(NSInteger)type
 {
     //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
     if(ksharedAppDelegate.isDidShowPwdType){
         KWeakSelf
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [weakSelf showReStartSucFun];
+            [weakSelf showReStartSucFun:type];
         });
         
         return;
@@ -1203,7 +1203,7 @@
     [self closeBoxHeartbeatReStartViewFun];
     
     
-    BoxHeartbeatReStartSucView *view = [[BoxHeartbeatReStartSucView alloc] init];
+    BoxHeartbeatReStartSucView *view = [[BoxHeartbeatReStartSucView alloc] initWithType:type];
     [ksharedAppDelegate.window addSubview:view];
     
     [view mas_makeConstraints:^(MASConstraintMaker *make) {

+ 1 - 1
创维盒子/code/zh-Hans.lproj/Localizable.strings

@@ -681,4 +681,4 @@
 "alert_install_TV_msg_2"      = "个文件预计需要";
 "alert_install_TV_msg_3"      = "秒。";
 "audio_not_Cache_Tip"      = "这首音频未缓存不能离线听,\n请连接网络后重试。";
-
+"Heartbeat_box_restart_Suc_Box" = "设备重启成功";