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.
71 // Lock the framework orientation to the current device orientation
82 // Unlock the framework orientation, so it can change when the device
87 Log.d(TAG, "unlock orientation");
95 if (mActivity.getResources().getConfiguration().orientation
114 // This listens to the device orientation, so we can update the compensation.
121 public void onOrientationChanged(int orientation) {
122 // We keep the last known orientation. So if the user first orient
124 // the correct orientation.
125 if (orientation == ORIENTATION_UNKNOWN) return;
126 orientation = roundOrientation(orientation, 0);
140 private static int roundOrientation(int orientation, int orientationHistory) {
145 int dist = Math.abs(orientation - orientationHistory);
150 return ((orientation + 45) / 90 * 90) % 360;