Lines Matching defs:orientation
39 // If the framework orientation is locked.
43 // don't allow the orientation to be unlocked if the value is true.
65 // We can choose to lock the framework orientation or not. If we lock the
66 // framework orientation, we calculate a a compensation value according to
67 // current device orientation and send it to listeners. If we don't lock
68 // the framework orientation, we always set the compensation value to 0.
72 * Lock the framework orientation to the current device orientation
86 * Unlock the framework orientation, so it can change when the device
92 Log.d(TAG, "unlock orientation");
100 if (mActivity.getResources().getConfiguration().orientation
119 // This listens to the device orientation, so we can update the compensation.
126 public void onOrientationChanged(int orientation) {
127 // We keep the last known orientation. So if the user first orient
129 // the correct orientation.
130 if (orientation == ORIENTATION_UNKNOWN) return;
131 orientation = roundOrientation(orientation, 0);
143 private static int roundOrientation(int orientation, int orientationHistory) {
148 int dist = Math.abs(orientation - orientationHistory);
153 return ((orientation + 45) / 90 * 90) % 360;