Override HDMI rotation when undocked.
The hardware composer HAL does not fully support multiple
displays so we must force the orientation to landscape when
plugged into HDMI and not docked so that mirrored framebuffer
content appears in the correct orientation on the display.
Note that when plugged into a portrait dock with HDMI, the
HAL disables mirroring of the framebuffer and instead only
mirrors video surfaces and internally transforms them to
landscape orientation.
Bug: 8511721
Change-Id: I11248daade288e774b446ec1482dbac745d8aa62
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 2cd1c67..4ad6456 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -33,6 +33,7 @@
<!-- Our amoled doesn't animate well. -->
<bool name="config_animateScreenLights">false</bool>
+ <integer name="config_undockedHdmiRotation">90</integer>
<integer name="config_deskDockKeepsScreenOn">0</integer>
<integer name="config_carDockKeepsScreenOn">1</integer>
<bool name="config_deskDockEnablesAccelerometer">true</bool>