Rotation lock.

IWindowManager now supports two new methods,
freezeRotation() and thawRotation(), that allow a caller to
temporarily stash the device's current rotation as the
default rotation (when no other constraints are present).

The system bar uses this to implement a user-accessible
rotation lock by calling freezeRotation() and then turning
off accelerometer-based display rotation; unless overridden
by an app, the display will continue to appear in the frozen
rotation until the rotation is unlocked by the user (either
via the rotation lock icon in the system bar or by checking
"rotate screen automatically" in Settings).

Bug: 2949639
Change-Id: Icd21c169d1053719590e72401f229424b254622f
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index d4dd05c..a54f342 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -156,4 +156,17 @@
      * calls back when it changes.
      */
     int watchRotation(IRotationWatcher watcher);
+
+	/**
+	 * Lock the device orientation to the current rotation. Sensor input will
+	 * be ignored until thawRotation() is called.
+	 * @hide
+	 */
+	void freezeRotation();
+
+	/**
+	 * Release the orientation lock imposed by freezeRotation().
+	 * @hide
+	 */
+	void thawRotation();
 }