The camera on an iPhone 4 does have the capability to get great low-light photos, but taking a photo using flash out of a front pocket of a pair of loose short wouldn't be a good idea. The image quality is not great in extremely low light.
I think you need to rephrase this question a bit better. It's difficult to understand. Are you asking what is the likely hood of a Iphone 4 automatically taking a photo as it's taken out of the pocket in loose shorts?