mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	convert context to local variable
This commit is contained in:
		| @@ -12,14 +12,12 @@ import com.squareup.otto.Bus; | ||||
| class MarshmallowCamera { | ||||
|     private static final String TAG = MyCameraImpl.class.getSimpleName(); | ||||
|  | ||||
|     private Context mContext; | ||||
|     private CameraManager manager; | ||||
|     private String cameraId; | ||||
|  | ||||
|     @TargetApi(Build.VERSION_CODES.M) | ||||
|     MarshmallowCamera(Context cxt) { | ||||
|         mContext = cxt; | ||||
|         manager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE); | ||||
|     MarshmallowCamera(Context context) { | ||||
|         manager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE); | ||||
|         try { | ||||
|             final String[] list = manager.getCameraIdList(); | ||||
|             cameraId = list[0]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user