Here is how I solved the problem.
I didn't want to open the back cover and do the hardware fixes like some users display in YouTube.
I entered the maintenance menus of the LG G2 D802 using 3845#*802# and navigated to Device Test --> Individual Item --> Sensor Test.
After waiting for the various...