Go back to sleep if phone is down

If the phone orientation is pointed down (how I keep it in my pocket) don't allow it to activate if a button is pressed. I used to use the proximity sensor for this, but mine broke so I came up with this.