Skip to content

Commit

Permalink
change(android): active init of orientation if not yet set otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
jahorton committed May 23, 2024
1 parent 131b37b commit 7e4b76f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7e4b76f

Please sign in to comment.