mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	add a crashfix when debugging
This commit is contained in:
		| @@ -23,6 +23,7 @@ public class MarshmallowCamera { | |||||||
|         try { |         try { | ||||||
|             final CameraManager manager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE); |             final CameraManager manager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE); | ||||||
|             final String[] list = manager.getCameraIdList(); |             final String[] list = manager.getCameraIdList(); | ||||||
|  |             if (list.length > 0) | ||||||
|                 manager.setTorchMode(list[0], enable); |                 manager.setTorchMode(list[0], enable); | ||||||
|         } catch (CameraAccessException e) { |         } catch (CameraAccessException e) { | ||||||
|             Log.e(TAG, "toggle marshmallow flashlight " + e.getMessage()); |             Log.e(TAG, "toggle marshmallow flashlight " + e.getMessage()); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user