Search code examples
androidscreen-orientationandroid-source

How does the Android system automatically change the screen orientation?


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?


Solution

  • In WindowManagerService.java, method public boolean updateRotationUncheckedLocked(boolean inTransaction); do the rotation.