Kaynağa Gözat

1.修复路径显示需求

huangxiaodong 1 yıl önce
ebeveyn
işleme
2813fa0c3b

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

@@ -2766,7 +2766,7 @@
 				ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2845,7 +2845,7 @@
 				ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

+ 17 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/backupsSetViewController.m

@@ -32,6 +32,13 @@
     [self drawAnyView];
 }
 
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    
+    [self setUploadFilePathLabelTitleFun];
+}
+
 - (void)drawAnyView{
     
     [self.view addSubview:self.tableView];
@@ -148,6 +155,16 @@
         [HWDataManager setStringWithKey:Const_photo_backups_default_path value:backupsDefaultPath];
     }
     
+    if([backupsDefaultPath containsString:@"mnt/media_rw"]){
+        backupsDefaultPath = [backupsDefaultPath stringByReplacingOccurrencesOfString:@"mnt/media_rw" withString:NSLocalizedString(@"disk_Extra_default_tip",nil)];
+    }
+    else if([backupsDefaultPath containsString:@"storage/emulated/0"]){
+        backupsDefaultPath = [backupsDefaultPath stringByReplacingOccurrencesOfString:@"storage/emulated/0" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+    }
+    else if([backupsDefaultPath containsString:@"sdcard"]){
+        backupsDefaultPath = [backupsDefaultPath stringByReplacingOccurrencesOfString:@"sdcard" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+    }
+    
     NSString * rightStr = backupsDefaultPath;
     
     NSString *totalStr = [[NSString alloc] initWithFormat:@"%@%@",leftStr,rightStr];

+ 17 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/fileTransfeSetViewController.m

@@ -31,6 +31,13 @@
     [self drawAnyView];
 }
 
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    
+    [self setUploadFilePathLabelTitleFun];
+}
+
 - (void)drawAnyView{
     
     [self.view addSubview:self.tableView];
@@ -146,6 +153,16 @@
         uploadDefaultPath = Const_default_upload_path;
     }
     
+    if([uploadDefaultPath containsString:@"mnt/media_rw"]){
+        uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"mnt/media_rw" withString:NSLocalizedString(@"disk_Extra_default_tip",nil)];
+    }
+    else if([uploadDefaultPath containsString:@"storage/emulated/0"]){
+        uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"storage/emulated/0" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+    }
+    else if([uploadDefaultPath containsString:@"sdcard"]){
+        uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"sdcard" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+    }
+    
     NSString * rightStr = uploadDefaultPath;
     
     NSString *totalStr = [[NSString alloc] initWithFormat:@"%@%@",leftStr,rightStr];

+ 14 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileBottomView.m

@@ -48,7 +48,20 @@
     if(!savePath||savePath.length == 0){
         savePath = Const_default_upload_path;
     }
-    _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),savePath];
+    
+    NSString *uploadDefaultPath = savePath;
+    
+    if([uploadDefaultPath containsString:@"mnt/media_rw"]){
+        uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"mnt/media_rw" withString:NSLocalizedString(@"disk_Extra_default_tip",nil)];
+    }
+    else if([uploadDefaultPath containsString:@"storage/emulated/0"]){
+        uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"storage/emulated/0" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+    }
+    else if([uploadDefaultPath containsString:@"sdcard"]){
+        uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"sdcard" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+    }
+    
+    _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),uploadDefaultPath];
     
     [self addSubview:_uploadFileRoutelabel];
     

+ 13 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.m

@@ -401,7 +401,19 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
     
     if(curUploadStateType == uploadStateDone){
         
-        _curUploadFileDataModel.savePath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+        NSString *uploadDefaultPath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+        
+        if([uploadDefaultPath containsString:@"mnt/media_rw"]){
+            uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"mnt/media_rw" withString:NSLocalizedString(@"disk_Extra_default_tip",nil)];
+        }
+        else if([uploadDefaultPath containsString:@"storage/emulated/0"]){
+            uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"storage/emulated/0" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+        }
+        else if([uploadDefaultPath containsString:@"sdcard"]){
+            uploadDefaultPath = [uploadDefaultPath stringByReplacingOccurrencesOfString:@"sdcard" withString:NSLocalizedString(@"disk_phone_default_tip",nil)];
+        }
+        
+        _curUploadFileDataModel.savePath = uploadDefaultPath;
         
         _curUploadFileDataModel.videoData = [NSData new];
         

+ 9 - 9
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+upLoadFile.m

@@ -324,15 +324,15 @@
 #pragma mark 处理上传过程
 - (void)handleUploadingFun:(NSNumber*)fileLengthNum
 {
-//    BOOL isCanUseCellular = [HWDataManager getBoolWithKey:Const_file_Transfe_canUse_Cellular];
-//    
-//    if(!isCanUseCellular){//不允许流量备份
-//        //
-//        if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN){
-//            self.isSuspendUploadType = YES;
-//        }
-//        
-//    }
+    BOOL isCanUseCellular = [HWDataManager getBoolWithKey:Const_file_Transfe_canUse_Cellular];
+    
+    if(!isCanUseCellular){//不允许流量备份
+        //
+        if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN){
+            self.isSuspendUploadType = YES;
+        }
+        
+    }
     
     if(self.isSuspendUploadType){
         //暂停

+ 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