mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-24 15:25:22 -04:00
Fixed bluetooth permissions on API levels < 30
This commit is contained in:
parent
1f1cb5ca17
commit
5739b33f06
4 changed files with 14 additions and 5 deletions
|
@ -377,7 +377,12 @@ class SidebandApp(MDApp):
|
|||
mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
|
||||
Context = autoclass('android.content.Context')
|
||||
|
||||
if check_permission("android.permission.BLUETOOTH_CONNECT"):
|
||||
if android_api_version > 30:
|
||||
bt_permission_name = "android.permission.BLUETOOTH_CONNECT"
|
||||
else:
|
||||
bt_permission_name = "android.permission.BLUETOOTH"
|
||||
|
||||
if check_permission(bt_permission_name):
|
||||
RNS.log("Have bluetooth connect permissions", RNS.LOG_DEBUG)
|
||||
self.sideband.setpersistent("permissions.bluetooth", True)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue