I dropped my phone awhile back and the screen rotation wouldn't work, i checked in the dev menu thing and my accelerometer and gyroscope are locked at (0, 0, 0,)
Mabye when you dropped your phone, you accidentally knocked out the Gyroscope. I.D.K. where this is located inside the phone, but you need to check this.