Setting natural rotation in Android Lollipop

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting natural rotation in Android Lollipop

Martin Fuzzey
Hi,

we are building two types of custom devices, both have identical 640x480 displays, but in one device the display is mounted in landscape orientation and the other in portrait orientation.

They are working fine under Android 4.1.1 using the "ro.sf.hwrotation" build property.

However, we are now upgrading to Android 5.1.1 and this property has been removed with the comment "get rid of ro.sf.hwrotation, it's not used anymore"
[see https://android.googlesource.com/platform/frameworks/native/+/98a121aa916eb7acbf11df0e3e31a6fede6fc9d ]

Setting the properties

persist.demo.remoterotation=portarait
persist.demo.rotationlock=true

Fixes it for the Android UI but the orientation is still wrong in the bootanimation
Furthermore, reading the code in frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java it would seem these are intended for remote displays.

So, what is the proper way of doing this?

Martin

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting natural rotation in Android Lollipop

Dave McLaughlin
I know this is a very old post but I was wondering if you got it to work?

When the bootanimation starts, it is 90 deg out and after a few seconds, sorts itself out and in the correct landscape orientation. 

The LCD screen is orientated as LANDSCAPE during u-boot as the boot image is correct. 

I've checked though the source and cannot find any reason why the boot animation would seem to orientate to portrait on the initial boot.


On Sunday, 18 October 2015 04:49:13 UTC+7, Martin Fuzzey wrote:
Hi,

we are building two types of custom devices, both have identical 640x480 displays, but in one device the display is mounted in landscape orientation and the other in portrait orientation.

They are working fine under Android 4.1.1 using the "ro.sf.hwrotation" build property.

However, we are now upgrading to Android 5.1.1 and this property has been removed with the comment "get rid of ro.sf.hwrotation, it's not used anymore"
[see <a href="https://android.googlesource.com/platform/frameworks/native/+/98a121aa916eb7acbf11df0e3e31a6fede6fc9d" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://android.googlesource.com/platform/frameworks/native/+/98a121aa916eb7acbf11df0e3e31a6fede6fc9d&#39;;return true;" onclick="this.href=&#39;https://android.googlesource.com/platform/frameworks/native/+/98a121aa916eb7acbf11df0e3e31a6fede6fc9d&#39;;return true;">https://android.googlesource.com/platform/frameworks/native/+/98a121aa916eb7acbf11df0e3e31a6fede6fc9d ]

Setting the properties

persist.demo.remoterotation=portarait
persist.demo.rotationlock=true

Fixes it for the Android UI but the orientation is still wrong in the bootanimation
Furthermore, reading the code in frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java it would seem these are intended for remote displays.

So, what is the proper way of doing this?

Martin

--
--
unsubscribe: [hidden email]
website: http://groups.google.com/group/android-porting

---
You received this message because you are subscribed to the Google Groups "android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/a44e1e2f-a67e-4cca-be3d-d053f307caaf%40googlegroups.com.