android设置系统 默认方向

frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

 

public int rotationForOrientationLw(int orientation, int lastRotation) {

  synchronized (mLock) {

  int sensorRotation = mOrientationListener.getProposedRotation();

  if (sensorRotation < 0) {

    mPortraitRotation = Surface.ROTATION_270;

    mLandscapeRotation = Surface.ROTATION_0;

    mUpsideDownRotation = Surface.ROTATION_90;

    mSeascapeRotation = Surface.ROTATION_180;

  }

  ...

}

posted @ 2013-08-02 14:46  adam.li  阅读(527)  评论(0编辑  收藏  举报