Camera's don't have lasers (at least in smartphones).
You could use infrared with two cameras to do depth measurement like the Kinect and the Leap Motion, but I'm unaware of any smartphones currently doing this.
1. Algorithm to evaluate how blurred an image is.
2. Adjust the focus a little bit, is it getting less blurred? Keep going. More blurred? Other direction.
3. Keep adjusting until you find the point where adjusting either way means more blur.
its a passive system where the camera sensor collects image data before the picture is taken and analyzes the image, then activates the focus motor to adjust the focus. No emitter required.
You could use infrared with two cameras to do depth measurement like the Kinect and the Leap Motion, but I'm unaware of any smartphones currently doing this.