From 1e48be1abf647e8583ed67d0c363f279cb5c50b6 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 25 Oct 2022 15:59:19 +0200 Subject: [PATCH] Fixed missing OS check for Android-specific code --- sbapp/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sbapp/main.py b/sbapp/main.py index 8666238..bd613a9 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -345,9 +345,10 @@ class SidebandApp(MDApp): self.announces_view = None - ActivityInfo = autoclass('android.content.pm.ActivityInfo') - activity = autoclass('org.kivy.android.PythonActivity').mActivity - activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) + if RNS.vendor.platformutils.is_android(): + ActivityInfo = autoclass('android.content.pm.ActivityInfo') + activity = autoclass('org.kivy.android.PythonActivity').mActivity + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) screen = Builder.load_string(root_layout)