<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Default display orientation in Android 8 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760253#M118148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently, this is a feature that was removed by Google a long time ago. The last patch that we have in our possession is the one that you posted. You can apply it at your own risk, or you may go with professional services support and they can create a patch for you. I apologize for the inconveniences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diego.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2018 22:06:21 GMT</pubDate>
    <dc:creator>diegoadrian</dc:creator>
    <dc:date>2018-04-20T22:06:21Z</dc:date>
    <item>
      <title>Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760250#M118145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on an i.MX6 SabreSD based board using the Android O8.0.0 release I'm trying to change the default display orientation to portrait mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Up until Android 7.1.2 this could be done setting ro.sf.hwrotation to 270 in the init.rc. Though an additional patch was needed, to rotate the touch input, too. But this doesn't work any more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there another way to set the default display orientation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and best regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2018 14:25:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760250#M118145</guid>
      <dc:creator>thomaselste</dc:creator>
      <dc:date>2018-04-03T14:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760251#M118146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class=""&gt;Do you know what modifies the patch that you are mentioning?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diego.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2018 20:52:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760251#M118146</guid>
      <dc:creator>diegoadrian</dc:creator>
      <dc:date>2018-04-06T20:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760252#M118147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the patches are for &lt;A href="https://source.codeaurora.org/external/imx/aosp/platform/frameworks/native"&gt;frameworks/native&lt;/A&gt; and add the evaluation of the ro.sf.hwrotation property to SurfaceFlinger and InputReader. This seems deprecated as it was removed from ASOP a long while ago (but always added back by NXP). That's why I asked if there is another way to do the screen rotation. But in the meantime I was able to apply the patches to the O8 tag (see attached files).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2018 07:09:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760252#M118147</guid>
      <dc:creator>thomaselste</dc:creator>
      <dc:date>2018-04-09T07:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760253#M118148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently, this is a feature that was removed by Google a long time ago. The last patch that we have in our possession is the one that you posted. You can apply it at your own risk, or you may go with professional services support and they can create a patch for you. I apologize for the inconveniences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diego.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 22:06:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760253#M118148</guid>
      <dc:creator>diegoadrian</dc:creator>
      <dc:date>2018-04-20T22:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760254#M118149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Diego&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the following commands still exist in android 8.0 oreo?&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;settings put system accelerometer_rotation &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;0
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit;"&gt;settings put system user_rotation &lt;/SPAN&gt;&lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;3&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I&amp;nbsp;can&amp;nbsp;use them on android 7.1, but can't work on android 8.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Yen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2019 03:56:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760254#M118149</guid>
      <dc:creator>yenchao</dc:creator>
      <dc:date>2019-03-21T03:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760255#M118150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any update?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Yen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 06:33:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760255#M118150</guid>
      <dc:creator>yenchao</dc:creator>
      <dc:date>2019-03-25T06:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760256#M118151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm facing the same problem on Oreo for iMX6 board that only runs on landscape mode and the commands related to user_rotation has no effect. Has anyone tried to rotate the hdmi system orientation yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 21:34:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760256#M118151</guid>
      <dc:creator>nilson_oliveira</dc:creator>
      <dc:date>2019-06-06T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760257#M118152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this patch&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff --git a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java&lt;BR /&gt;index 7407fd4..951e9fb 100644&lt;BR /&gt;--- a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java&lt;BR /&gt;+++ b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java&lt;BR /&gt;@@ -7110,11 +7110,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {&lt;BR /&gt; // been specified in the configuration (only for legacy devices without&lt;BR /&gt; // full multi-display support).&lt;BR /&gt; // Note that the dock orientation overrides the HDMI orientation.&lt;BR /&gt;- preferredRotation = mUndockedHdmiRotation;&lt;BR /&gt;+// modifided by Yen for screen rotation&lt;BR /&gt;+// preferredRotation = mUndockedHdmiRotation;&lt;BR /&gt;+ preferredRotation = mUserRotation;&lt;BR /&gt;+////&lt;BR /&gt; } else if (mDemoRotationLock) {&lt;BR /&gt; // Ignore sensor when demo rotation lock is enabled.&lt;BR /&gt; // Note that the dock orientation and HDMI rotation lock override this.&lt;BR /&gt;- preferredRotation = mDemoRotation;&lt;BR /&gt;+// modifided by Yen for screen rotation&lt;BR /&gt;+// preferredRotation = mDemoRotation;&lt;BR /&gt;+ preferredRotation = mUndockedHdmiRotation;&lt;BR /&gt;+////&lt;BR /&gt; } else if (mPersistentVrModeEnabled) {&lt;BR /&gt; // While in VR, apps always prefer a portrait rotation. This does not change&lt;BR /&gt; // any apps that explicitly set landscape, but does cause sensors be ignored,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Yen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 02:19:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760257#M118152</guid>
      <dc:creator>yenchao</dc:creator>
      <dc:date>2019-06-10T02:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Default display orientation in Android 8</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760258#M118153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been struggling with this issue off/on over the last couple weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like Android has an ever increasing truth table of how/and what you can do in the way of rotation.&lt;/P&gt;&lt;P&gt;I have an hdmi connected variscite dev board. Could not get it into reverse_landscape,..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried the patches here: Gave me BSP,boot up control over orientation, but not application level Reverse_landscape.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For application level control (Oreo 8, hdmi display) the following worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added to the onCreate in my app.&lt;/P&gt;&lt;PRE style="background-color: #ffffff; color: #000000; font-family: 'DejaVu Sans Mono'; font-size: 9.0pt;"&gt;Settings.System.&lt;SPAN style="font-style: italic;"&gt;putInt&lt;/SPAN&gt;(getContentResolver(), Settings.System.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;ACCELEROMETER_ROTATION&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;);&lt;SPAN style="color: #808080; font-style: italic;"&gt;// turn off rotation according to accelerometer
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;//Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_0);//landscape
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;//Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_90);//portrait
&lt;/SPAN&gt;Settings.System.&lt;SPAN style="font-style: italic;"&gt;putInt&lt;/SPAN&gt;(getContentResolver(), Settings.System.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;USER_ROTATION&lt;/SPAN&gt;, Surface.&lt;SPAN style="color: #660e7a; font-weight: bold; font-style: italic;"&gt;ROTATION_180&lt;/SPAN&gt;);&lt;SPAN style="color: #808080; font-style: italic;"&gt;//reverse landscape
&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;//Settings.System.putInt(getContentResolver(), Settings.System.USER_ROTATION, Surface.ROTATION_270);//portrait

&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Add to manifest: (you may have to navigate SElinux permissions for this)&lt;/P&gt;&lt;P&gt;&amp;lt;uses-permission android:name="android.permission.WRITE_SETTINGS"&amp;gt;&amp;lt;/uses-permission&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I no longer "need" the above patches unless you want to control the orientation right from boot up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone else finds this useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/***&lt;/P&gt;&lt;P&gt;Update: Still needs at least one of the patches described above. Default build doesn't work, but with patches it did&amp;nbsp;&lt;/P&gt;&lt;P&gt;***/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 15:58:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Default-display-orientation-in-Android-8/m-p/760258#M118153</guid>
      <dc:creator>jgoncalves1</dc:creator>
      <dc:date>2019-09-04T15:58:46Z</dc:date>
    </item>
  </channel>
</rss>

