same thing happened to me when I did a screen change.
didn't know if it was a hardware or a software issue, so I installed a camera app, and now the rear camera works fine. so not a hardware issue. unfortunately, the app doesn't allow me to switch to front camera, but im guessing it would work.
only problem is, I now lnow its a software issue, but can't seem to find a way to fix it :( its running the latest firmware, and i've also done a reset. all to no avail.