msm8909竖屏改横屏

2019-07-13 03:26发布

1.在文件device/qcom/msm8909/system.prop中,把persist.panel.orientation=90加进去
2、修改frameworks/base/services/core/java/com/android/server/wm/WindowManagerService.java
在函数boolean updateOrientationFromAppTokensLocked(boolean inTransaction)中添加如下:
req = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;//横屏

req = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;//竖屏
在这里插入图片描述
3.修改/frameworks/base/cmds/bootanimation/BootAnimation.cpp sp control = session()->createSurface(String8(“BootAnimation”),
dinfo.orientation == 1 ? dinfo.h : dinfo.w, dinfo.orientation == 1 ? dinfo.w : dinfo.h, PIXEL_FORMAT_RGB_565); 4、编译烧写