I'd like to have the comment say where the number 9.2 comes from.  How about this:

// If the camera is close to horizontal (pointing up or down) then we can't tell what orientation the user intends, so
// we just return now without changing the orientation. The constant 9.2 is the force of gravity (9.8) times
// the cosine of 20 degrees.  So if the phone is within 20 degrees of horizontal, we will never change the orientation.