Recently, I suddenly said that I started a new project. The project is vertical screen. The students who do car machines know that the default is horizontal screen, just like a tablet. Therefore, it is necessary to modify the default display of the entire Android system to vertical screen, and record it. ,for reference only
Regarding modifying the entire system to be a vertical screen machine, there are three main places that need to be modified:
(1) The ro.sf.hwrotation=0 attribute in the device.mk file in the android\device\actions\s700_cb6\ directory is modified to ro.sf.hwrotation=270, and it needs to be cut to ADDITIONAL_BUILD_PROPERTIES+=\ to take effect ,PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ will not take effect;
(2) ActivityManagerNative.getDefault().setRequestedOrientation(mToken,ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) in the setRequestedOrientation() method in the android/frameworks/base/core/java/android/app/Activity.java class and the following mParent.setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT parameter in ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) ;
(3) a.info.screenOrientation = 1 in the android/frameworks/base/core/java/android/content/pm/PackageParser.java class ; //1 means vertical screen, 0 means landscape screen
The directory location involved in the above content is subject to your own project