| 
					
				 | 
			
			
				@@ -7,6 +7,7 @@ using ET; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using FairyGUI; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using UI.DressUp; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using UnityEngine; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using UnityEngine.Android; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -64,10 +65,27 @@ namespace GFGGame 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private void OnClickBtnSave() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            string fileName = "wsj" + TimeHelper.ServerNowSecs + ".jpg"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            PhotographUtil.Instance.SavePicturoToLocal(bytes, fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _ui.m_btnSave.touchable = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //检查用户是否已授予对需要授权的设备资源或信息的访问权。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!Permission.HasUserAuthorizedPermission(Permission.ExternalStorageWrite)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //请求用户授权访问需要授权的设备资源或信息. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PermissionCallbacks permissionCallbacks = new PermissionCallbacks(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                permissionCallbacks.PermissionGranted += (string a) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    TrySavePicturoToLocal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Permission.RequestUserPermission(Permission.ExternalStorageWrite, permissionCallbacks); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            TrySavePicturoToLocal(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private void TrySavePicturoToLocal() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (Permission.HasUserAuthorizedPermission(Permission.ExternalStorageWrite)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                string fileName = "wsj" + TimeHelper.ServerNowSecs + ".jpg"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PhotographUtil.Instance.SavePicturoToLocal(bytes, fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _ui.m_btnSave.touchable = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private async void OnClickBtnSavePhoto() 
			 |