Android->services: change the policy of updateRotation,if want to auto-rotate, set HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY=1 in DatabaseHelper

This commit is contained in:
zhansb
2016-05-05 10:51:58 +08:00
parent ada4ae9fb3
commit b3c7d96b21

View File

@ -17,6 +17,7 @@
package com.android.server.wm;
import static android.view.WindowManager.LayoutParams.*;
import com.android.internal.view.RotationPolicy;
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import android.app.AppOpsManager;
@ -8445,9 +8446,11 @@ public class WindowManagerService extends IWindowManager.Stub
mRotation = Surface.ROTATION_0;
rotation = Surface.ROTATION_90;
}
if(mPolicy.getUserRotationMode() == WindowManagerPolicy.USER_ROTATION_FREE)
if(!RotationPolicy.isRotationLockToggleVisible(mContext)
&& mPolicy.getUserRotationMode() == WindowManagerPolicy.USER_ROTATION_FREE)
{
rotation = Surface.ROTATION_0;
Slog.v(TAG, "Not allow rotate, force to ROTATION_0");
}
/* $_rbox_$_modify_$_huangjc , force android rotation according to 0 */