Check bluetooth supported before registering pan
This commit is contained in:
@@ -95,7 +95,7 @@ class BluetoothTethering(context: Context, val stateListener: () -> Unit) :
|
||||
private val receiver = broadcastReceiver { _, _ -> stateListener() }
|
||||
|
||||
init {
|
||||
try {
|
||||
if (BluetoothAdapter.getDefaultAdapter() != null) try {
|
||||
pan = pan(context, this)
|
||||
} catch (e: InvocationTargetException) {
|
||||
Timber.w(e)
|
||||
|
||||
Reference in New Issue
Block a user