fix: now auto orientation follows system settings, closes #1093 and closes #1098 (#1122)

This commit is contained in:
Huang Xin 2025-05-11 20:57:05 +08:00 committed by GitHub
parent 2e46bc1627
commit da49526f4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -355,7 +355,7 @@ class NativeBridgePlugin(private val activity: Activity): Plugin(activity) {
when (orientation) {
"portrait" -> activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
"landscape" -> activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
"auto" -> activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR
"auto" -> activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
else -> {
invoke.reject("Invalid orientation mode")
return