From 416e4c78da191a75ea445ae7a2861ee3c783cd06 Mon Sep 17 00:00:00 2001 From: Jean-Marie BARAN Date: Fri, 4 Oct 2024 10:19:32 +0200 Subject: [PATCH] Honor the system orientation lock #144 Revert "Fix unlockAllOrientations on Android (#133)" This reverts commit 7a7db411d7da08efc08590883716b1dd2286fb37. Refer to the issue for more information, particularly this comment: https://github.com/wonday/react-native-orientation-locker/issues/144#issuecomment-1303216433 --- .../src/main/java/org/wonday/orientation/OrientationModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/org/wonday/orientation/OrientationModule.java b/android/src/main/java/org/wonday/orientation/OrientationModule.java index 9603ab0..6c7e858 100644 --- a/android/src/main/java/org/wonday/orientation/OrientationModule.java +++ b/android/src/main/java/org/wonday/orientation/OrientationModule.java @@ -309,7 +309,7 @@ public void unlockAllOrientations() { final Activity activity = getCurrentActivity(); if (activity == null) return; - activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); isLocked = false; //force send an UI orientation event when unlock