At present, our customers have a request to manually set the display direction of HDMI.
method:
First you need to set, packages/apps/Settings/src/com/android/settings/display$ gedit HdmiSettings.java
boolean showSystemRotation = true; There will be an option for system orientation setting in HDMI under settings.
Then set the ro.vendor.hdmirotationlock property to false in the *.prop file under the device directory, and the direction will not be locked when the HDMI is inserted.
You will find that after the screen is off, the system has restored the display direction that the system does not have by default. Does not meet our requirements. This is because the lock screen direction of the main interface is locked.
So set the lockscreen.rot_override property to true again, and the problem is solved! ! ! !