浏览代码

1.磁盘插拔相关

huangxiaodong 1 年之前
父节点
当前提交
e8d7632bfe

+ 8 - 0
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -163,6 +163,8 @@
 		6B0582862B0457C400D37290 /* uploadFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0582842B0457C400D37290 /* uploadFileManager.m */; };
 		6B0582892B045E0B00D37290 /* uploadFileDataModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0582872B045E0B00D37290 /* uploadFileDataModel.h */; };
 		6B05828A2B045E0B00D37290 /* uploadFileDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0582882B045E0B00D37290 /* uploadFileDataModel.m */; };
+		6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */; };
+		6B1CC2C72B677F3E00AD4217 /* extraMediaEventModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */; };
 		6B1FBD222B43DAD200926382 /* backupsSetViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD202B43DAD200926382 /* backupsSetViewController.h */; };
 		6B1FBD232B43DAD200926382 /* backupsSetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD212B43DAD200926382 /* backupsSetViewController.m */; };
 		6B1FBD262B4503E700926382 /* photosBackupsTaskModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD242B4503E700926382 /* photosBackupsTaskModel.h */; };
@@ -602,6 +604,8 @@
 		6B0582842B0457C400D37290 /* uploadFileManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileManager.m; sourceTree = "<group>"; };
 		6B0582872B045E0B00D37290 /* uploadFileDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileDataModel.h; sourceTree = "<group>"; };
 		6B0582882B045E0B00D37290 /* uploadFileDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileDataModel.m; sourceTree = "<group>"; };
+		6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = extraMediaEventModel.h; sourceTree = "<group>"; };
+		6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = extraMediaEventModel.m; sourceTree = "<group>"; };
 		6B1FBD202B43DAD200926382 /* backupsSetViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsSetViewController.h; sourceTree = "<group>"; };
 		6B1FBD212B43DAD200926382 /* backupsSetViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = backupsSetViewController.m; sourceTree = "<group>"; };
 		6B1FBD242B4503E700926382 /* photosBackupsTaskModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = photosBackupsTaskModel.h; sourceTree = "<group>"; };
@@ -960,6 +964,8 @@
 				6B5D40262B4BC402000965CF /* couldPhoneFileListModel.m */,
 				6B45C4FB2B57BC87007E6911 /* cloudPhoneExtraFileListModel.h */,
 				6B45C4FC2B57BC87007E6911 /* cloudPhoneExtraFileListModel.m */,
+				6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */,
+				6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -1963,6 +1969,7 @@
 				6B1FBD3A2B467A8000926382 /* backupsFilerecordTableView.h in Headers */,
 				6BF0F3D02AD391D8000AA133 /* connectDeviceManager.h in Headers */,
 				6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */,
+				6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */,
 				6B5B607A2B3E71B6009A2AE2 /* filePathCreatTableViewCell.h in Headers */,
 				18FCE5442AD136FF0020F623 /* ShortcutManager.h in Headers */,
 				6B2170A02B15D39900656670 /* privacyModeTipViewController.h in Headers */,
@@ -2409,6 +2416,7 @@
 				183AE6532A8A2CF000B11CB0 /* AFImageDownloader.m in Sources */,
 				A003F6B327D841EE00715CBF /* UIColor+HZXColor.m in Sources */,
 				18E557222A3C5D75005CC84B /* CalculatorViewController.m in Sources */,
+				6B1CC2C72B677F3E00AD4217 /* extraMediaEventModel.m in Sources */,
 				6B5D401B2B4A9850000965CF /* couldPhoneFolderListModel.m in Sources */,
 				6B1FBD2B2B452B3800926382 /* backupsFileManager.m in Sources */,
 				6BFF269A2AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m in Sources */,

+ 17 - 0
创维盒子/双子星云手机/CloudPlayer/Model/extraMediaEventModel.h

@@ -0,0 +1,17 @@
+//
+//  extraMediaEventModel.h
+//  隐私保护
+//
+//  Created by xd h on 2024/1/29.
+//
+
+#import "SuperModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface extraMediaEventModel : SuperModel
+@property (nonatomic, copy) NSString * name;// 文件夹名称(磁盘)
+@property (nonatomic, assign) int  event;//0  插入  1拔出 2 安全拔出
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
创维盒子/双子星云手机/CloudPlayer/Model/extraMediaEventModel.m

@@ -0,0 +1,12 @@
+//
+//  extraMediaEventModel.m
+//  隐私保护
+//
+//  Created by xd h on 2024/1/29.
+//
+
+#import "extraMediaEventModel.h"
+
+@implementation extraMediaEventModel
+
+@end

+ 1 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h

@@ -40,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)getExtraFilesResponseFun:(NSDictionary *)dataDict;
 - (void)saveLastImageFun;
 - (void)readLastImageFun;
+- (void)getExtraMediaEventResponseFun:(NSDictionary *)dataDict;
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -21,6 +21,7 @@
 #import "cloudPhoneExtraFileListModel.h"
 #import "AppDelegate.h"
 #import "cachesFileManager.h"
+#import "extraMediaEventModel.h"
 
 @implementation PlayerViewController (otherDelegate)
 
@@ -415,4 +416,26 @@
     }
 }
 
+- (void)getExtraMediaEventResponseFun:(NSDictionary *)dataDict
+{
+    extraMediaEventModel *model = [[extraMediaEventModel alloc] initWithDictionary:dataDict error:nil];
+    
+    NSString *tip = nil;
+    if(model.event == 0){
+        tip = NSLocalizedString(@"disk_insertion_tip",nil);
+    }
+    else if(model.event == 1){
+        tip = NSLocalizedString(@"disk_extract_tip",nil);
+    }
+    else if(model.event == 2){
+        tip = NSLocalizedString(@"disk_save_extract_tip",nil);
+    }
+    
+    NSString *totalTips = [[NSString alloc] initWithFormat:@"%@%@",model.name,tip];
+    
+    mainBlock(^{
+        [[iToast makeText:totalTips] show];
+    });
+}
+
 @end

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

@@ -773,6 +773,10 @@ ComontAlretViewControllerDelegate>
             else if ([messageType isEqualToString:@"getExtraFiles"]){/*创建文件夹*/
                 [weakSelf getExtraFilesResponseFun:dataDict];
             }
+            else if ([messageType isEqualToString:@"extraMediaEvent"]){/*磁盘插拔*/
+                [weakSelf getExtraMediaEventResponseFun:dataDict];
+                [weakSelf getExtraFilesListFun];
+            }
         } failure:^(NSError *error) {
             [self showNetErrorAlertFun:2];
         }];
@@ -1696,6 +1700,12 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     [[backupsFileManager shareInstance] AutohandlePhotosBackupsFun];
     
     //获取磁盘外挂
+    [self getExtraFilesListFun];
+}
+
+#pragma mark 获取外挂产品
+- (void)getExtraFilesListFun
+{
     NSString *ExtraCommondStr  = [RCCommandHelp getExtraFilesList];
     [self send_data:ExtraCommondStr];
 }

+ 1 - 1
创维盒子/双子星云手机/CloudPlayer/View/PlayerView.m

@@ -71,7 +71,7 @@ ShowImageViewDelegate>{
                   inRect:CGRectMake(0, 0, glkshowImageView.drawableWidth, glkshowImageView.drawableHeight)
                 fromRect:[ciImage extent]];
     
-    //[self->glkshowImageView display];
+    [self->glkshowImageView display];
 }
 
 - (void)showIMage

+ 3 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -379,3 +379,6 @@
 "disk_phone_default_tip"   = "云机";
 "disk_Extra_default_tip"   = "磁盘";
 "File_upload_path_new_save"   = "文件夹已存在";
+"disk_extract_tip"   = "磁盘拔出";
+"disk_save_extract_tip"   = "磁盘安全拔出";
+"disk_insertion_tip"   = "磁盘插入";