Fixed missing OS check for Android-specific code

This commit is contained in:
Mark Qvist 2022-10-25 15:59:19 +02:00
parent 623bfd31eb
commit 1e48be1abf

View File

@ -345,6 +345,7 @@ class SidebandApp(MDApp):
self.announces_view = None self.announces_view = None
if RNS.vendor.platformutils.is_android():
ActivityInfo = autoclass('android.content.pm.ActivityInfo') ActivityInfo = autoclass('android.content.pm.ActivityInfo')
activity = autoclass('org.kivy.android.PythonActivity').mActivity activity = autoclass('org.kivy.android.PythonActivity').mActivity
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)