From 7e4b76f6ea027f31e4b98c931e1853442705ee05 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Thu, 23 May 2024 14:43:30 +0700 Subject: [PATCH] change(android): active init of orientation if not yet set otherwise --- .../KMEA/app/src/main/java/com/keyman/engine/KMManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java index d693d6813e9..fc93e0f19ba 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMManager.java @@ -2032,7 +2032,11 @@ static void setOrientation(int orientationFlag) { } public static int getOrientation(Context context) { - return orientation; + if(orientation == Configuration.ORIENTATION_UNDEFINED) { + return detectOrientation(context); + } else { + return orientation; + } } public static int detectOrientation(Context context) {