VirtualPump: don't ask for BT permission
This commit is contained in:
parent
27355c18a2
commit
f519d37ac3
|
@ -17,6 +17,7 @@ import app.aaps.core.interfaces.androidPermissions.AndroidPermission
|
||||||
import app.aaps.core.interfaces.configuration.Config
|
import app.aaps.core.interfaces.configuration.Config
|
||||||
import app.aaps.core.interfaces.notifications.Notification
|
import app.aaps.core.interfaces.notifications.Notification
|
||||||
import app.aaps.core.interfaces.plugin.ActivePlugin
|
import app.aaps.core.interfaces.plugin.ActivePlugin
|
||||||
|
import app.aaps.core.interfaces.pump.VirtualPump
|
||||||
import app.aaps.core.interfaces.resources.ResourceHelper
|
import app.aaps.core.interfaces.resources.ResourceHelper
|
||||||
import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator
|
import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator
|
||||||
import app.aaps.core.ui.dialogs.OKDialog
|
import app.aaps.core.ui.dialogs.OKDialog
|
||||||
|
@ -105,6 +106,7 @@ class AndroidPermissionImpl @Inject constructor(
|
||||||
@SuppressLint("MissingPermission")
|
@SuppressLint("MissingPermission")
|
||||||
@Synchronized
|
@Synchronized
|
||||||
override fun notifyForBtConnectPermission(activity: FragmentActivity) {
|
override fun notifyForBtConnectPermission(activity: FragmentActivity) {
|
||||||
|
if (activePlugin.activePump !is VirtualPump)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
// Manifest.permission.BLUETOOTH_CONNECT
|
// Manifest.permission.BLUETOOTH_CONNECT
|
||||||
if (permissionNotGranted(activity, Manifest.permission.BLUETOOTH_CONNECT) || permissionNotGranted(activity, Manifest.permission.BLUETOOTH_SCAN))
|
if (permissionNotGranted(activity, Manifest.permission.BLUETOOTH_CONNECT) || permissionNotGranted(activity, Manifest.permission.BLUETOOTH_SCAN))
|
||||||
|
|
Loading…
Reference in a new issue