Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af1707d5 authored by Scott Anderson's avatar Scott Anderson Committed by Android (Google) Code Review
Browse files

Merge "Support dynamic rotation of HDMI displays"

parents 59be800e 8786ed9b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -166,6 +166,12 @@ final class LocalDisplayAdapter extends DisplayAdapter {
                    if ("portrait".equals(SystemProperties.get("persist.demo.hdmirotation"))) {
                        mInfo.rotation = Surface.ROTATION_270;
                    }

                    // For demonstration purposes, allow rotation of the external display
                    // to follow the built-in display.
                    if (SystemProperties.getBoolean("persist.demo.hdmirotates", false)) {
                        mInfo.flags |= DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT;
                    }
                }
            }
            return mInfo;
+1 −2
Original line number Diff line number Diff line
@@ -258,8 +258,7 @@ final class LogicalDisplay {
        // The orientation specifies how the physical coordinate system of the display
        // is rotated when the contents of the logical display are rendered.
        int orientation = Surface.ROTATION_0;
        if (device == mPrimaryDisplayDevice
                && (displayDeviceInfo.flags & DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT) != 0) {
        if ((displayDeviceInfo.flags & DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT) != 0) {
            orientation = displayInfo.rotation;
        }