mirror of
				https://github.com/SimpleMobileTools/Simple-Camera.git
				synced 2025-06-27 09:02:59 +02:00 
			
		
		
		
	move Utils to the proper folder
This commit is contained in:
		| @@ -30,13 +30,11 @@ class Utils { | |||||||
|                 return false |                 return false | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             val parameters = camera.parameters |             if (camera.parameters.flashMode == null) { | ||||||
| 
 |  | ||||||
|             if (parameters.flashMode == null) { |  | ||||||
|                 return false |                 return false | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             val supportedFlashModes = parameters.supportedFlashModes |             val supportedFlashModes = camera.parameters.supportedFlashModes | ||||||
|             if (supportedFlashModes == null || supportedFlashModes.isEmpty() || |             if (supportedFlashModes == null || supportedFlashModes.isEmpty() || | ||||||
|                     supportedFlashModes.size == 1 && supportedFlashModes[0] == Camera.Parameters.FLASH_MODE_OFF) { |                     supportedFlashModes.size == 1 && supportedFlashModes[0] == Camera.Parameters.FLASH_MODE_OFF) { | ||||||
|                 return false |                 return false | ||||||
| @@ -56,9 +54,9 @@ class Utils { | |||||||
| 
 | 
 | ||||||
|             val timestamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) |             val timestamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) | ||||||
|             return if (isPhoto) { |             return if (isPhoto) { | ||||||
|                 mediaStorageDir.path + File.separator + "IMG_" + timestamp + ".jpg" |                 "${mediaStorageDir.path}${File.separator}IMG_$timestamp.jpg" | ||||||
|             } else { |             } else { | ||||||
|                 mediaStorageDir.path + File.separator + "VID_" + timestamp + ".mp4" |                 "${mediaStorageDir.path}${File.separator}VID_$timestamp.mp4" | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
		Reference in New Issue
	
	Block a user