Skip to content

Commit 1502b09

Browse files
fix: add a 50ms sleep to avoid strange rotate issue
1 parent ae8caad commit 1502b09

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/Player.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4242,6 +4242,11 @@ public void onClick(final View v) {
42424242
} else if (v.getId() == binding.screenRotationButton.getId()) {
42434243
// Only if it's not a vertical video or vertical video but in landscape with locked
42444244
// orientation a screen orientation can be changed automatically
4245+
try {
4246+
Thread.sleep(50); // don't know why we need this from 4.5.0, but without this it act strange when exiting
4247+
} catch (InterruptedException e) {
4248+
e.printStackTrace();
4249+
}
42454250
onScreenRotationButtonClicked();
42464251
} else if (v.getId() == binding.switchMute.getId()) {
42474252
onMuteUnmuteButtonClicked();

0 commit comments

Comments
 (0)