How can I easily tell if a cellphone sensor or lens is damaged?
wipe the lens and take some pictures closeup and far away and see how they look.
To check of the plastic lens parts are warped by heat, take an image of a checker board and see if the warp is smooth pincussion or barrel .
Sensor damage is easy to see by just snapping images.
For minor defects, Take an image of a clear sky or white wall and check the smoothness.
If you have focused on the Sun or on a spotlight for long, you will end up sensor pixels burnt out. This is easy to test. Make these two photos:
Now, do the following for each image:
It is easy to find those ones:
The lens itself will not be damaged from extended exposure to sun. The glue there will not necessarily like extended UV exposure, and increased heat, but if it seems to work, focuses, etc. then it works.