mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-03 16:15:55 +01:00
also catch potential stopAdvertising exceptions
This commit is contained in:
parent
88d14e9e8a
commit
10455df7e2
@ -218,7 +218,11 @@ class AdvertiserService : LifecycleService() {
|
|||||||
Log.i(TAG, "Tried calling stopAdvertisingSet without android.permission.BLUETOOTH_ADVERTISE permission.", )
|
Log.i(TAG, "Tried calling stopAdvertisingSet without android.permission.BLUETOOTH_ADVERTISE permission.", )
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
advertiser?.stopAdvertising(callback)
|
try {
|
||||||
|
advertiser?.stopAdvertising(callback)
|
||||||
|
} catch (e: SecurityException) {
|
||||||
|
Log.i(TAG, "stopAdvertising() failed with a SecurityException. Maybe some permissions are missing?", )
|
||||||
|
}
|
||||||
}
|
}
|
||||||
handler.postDelayed(startLaterRunnable, 1000)
|
handler.postDelayed(startLaterRunnable, 1000)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user