Created
February 14, 2017 08:26
-
-
Save dmpatel151282/135f7e24ba2c95efb4feafb6d35f60f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
int req = getOrientationFromWindowsLocked(); | |
if (req == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { | |
req = getOrientationFromAppTokensLocked(); | |
} | |
+req = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; | |
return req; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment