Skip to content

Commit

Permalink
Fix rotation when when auto-rotate is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbox87 committed Sep 8, 2020
1 parent 530f745 commit 7ad18f9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,11 @@ public void onScreenRotationButtonClicked() {
return;
}

if (isLandscape() && PlayerHelper.globalScreenOrientationLocked(activity)) {
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
return;
}

final int newOrientation = isLandscape()
? ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
: ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
Expand Down

0 comments on commit 7ad18f9

Please sign in to comment.