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)