Compare commits

...

1 Commits

Author SHA1 Message Date
Romain Vimont
eb004b010e Improve manual rotation reliability
Manually requesting a device orientation change using MOD+r often fails.

Introducing a small delay dramatically improves reliability.
2024-12-10 19:12:26 +01:00

View File

@ -206,6 +206,10 @@ public final class Device {
// restore auto-rotate if necessary
if (accelerometerRotation) {
if (displayId == 0) {
// HACK: rotation on the main display often fail on recent Android devices if thawRotation() is called immediately
SystemClock.sleep(10);
}
wm.thawRotation(displayId);
}
}