If the sensor (I think the G4 uses the front camera to detect light intensity, but don't quote me on that) is faulty, then sadly the only thing that can be done is repair.
However if it worked (sorta) and it changed with the OS update, then it's most likely a firmware glitch. The best thing to do is to wipe your system cache. Can you boot into recovery mode?
After that, if it doesn't help then a factory reset would be the next thing to try. Backup all your important data first, please, including files, photos, music, text messages, email, etc.