Till now, I only find the source code for user to set the orientation in Android source code. Can anyone tell me where is the source code that the system use to automatically change the screen orientation?
In WindowManagerService.java
, method public boolean updateRotationUncheckedLocked(boolean inTransaction);
do the rotation.