Discussion:
[android-porting] How do you set the default display orientation in Android 7 aosp?
Nirmit Shah
2017-12-11 20:07:57 UTC
Permalink
There used to be "ro.sf.hwrotation
<http://gpfw-aerial/source/s?path=ro.sf.hwrotation&project=pioneer>"
property in the previous android to set the default natural display
orientation. Can anyone tell me the correct way to set the default display
orientation, currently it defaults to portrait but I want it to be in
landscape mode? Is there a support doc for this?
--
--
unsubscribe: android-porting+***@googlegroups.com
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 android-porting+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jaymin D
2018-08-23 05:01:06 UTC
Permalink
Hi,

I have set the default orientation to LANDSCAPE in my Android AOSP 7, by
changing in file -
"packages/apps/Launcher3/src/com/android/launcher3/Launcher.java" as below:

setRequestedOrientation(
- ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
+ ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

Try this, may this will help you. It changes my display orientation to
landscape mode, the only thing is lock screen will not rotate.

Regards,
Post by Nirmit Shah
There used to be "ro.sf.hwrotation
<http://gpfw-aerial/source/s?path=ro.sf.hwrotation&project=pioneer>"
property in the previous android to set the default natural display
orientation. Can anyone tell me the correct way to set the default display
orientation, currently it defaults to portrait but I want it to be in
landscape mode? Is there a support doc for this?
--
--
unsubscribe: android-porting+***@googlegroups.com
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 android-porting+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...