Open the following file from Android framework.
/android/frameworks/base/services/java/com/android/server/wm/WindowManagerService.java
- Go to “computeForcedAppOrientationLocked” function.
- Add below code at appropriate place.
[code lang=”java”]
int req = getOrientationFromWindowsLocked();
if (req == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) {
req = getOrientationFromAppTokensLocked();
}
+req = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
return req;
[/code]



Leave a Reply