Lines Matching defs:rotation
60 * our threshold is x degrees. We will only notify UI when our current rotation is within x
66 // Rotation threshold is 10 degrees. So if the rotation angle is within 10 degrees of any of
70 /** Cache the current rotation of the device. */
103 * <p>Note that this API receives sensor rotation in degrees as a param and we convert that to one
107 * @param rotation The new device sensor rotation in degrees
110 public void onOrientationChanged(int rotation) {
111 if (rotation == OrientationEventListener.ORIENTATION_UNKNOWN) {
115 final int orientation = toScreenOrientation(rotation);
171 * Converts sensor rotation in degrees to screen orientation constants.
173 * @param rotation sensor rotation angle in degrees
178 private int toScreenOrientation(int rotation) {
180 // function returns the screen orientation. So we convert sensor rotation 90 to 270 and
182 if (isInLeftRange(rotation, SCREEN_ORIENTATION_360, ROTATION_THRESHOLD)
183 || isInRightRange(rotation, SCREEN_ORIENTATION_0, ROTATION_THRESHOLD)) {
185 } else if (isWithinThreshold(rotation, SCREEN_ORIENTATION_90, ROTATION_THRESHOLD)) {
187 } else if (isWithinThreshold(rotation, SCREEN_ORIENTATION_180, ROTATION_THRESHOLD)) {
189 } else if (isWithinThreshold(rotation, SCREEN_ORIENTATION_270, ROTATION_THRESHOLD)) {