mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 02:05:20 +00:00
check for support
This commit is contained in:
@@ -318,6 +318,15 @@ class WifiAwareMeshService(private val context: Context) : MeshService, Transpor
|
||||
Log.i(TAG, "Wi-Fi Aware transport disabled by debug settings; not starting")
|
||||
return
|
||||
}
|
||||
val supportStatus = com.bitchat.android.wifiaware.WifiAwareSupport.evaluate(context)
|
||||
if (!supportStatus.supported) {
|
||||
Log.i(TAG, "Wi-Fi Aware unsupported on this device; not starting (${supportStatus.reason})")
|
||||
return
|
||||
}
|
||||
if (!supportStatus.available) {
|
||||
Log.i(TAG, "Wi-Fi Aware unavailable right now; not starting (${supportStatus.reason})")
|
||||
return
|
||||
}
|
||||
if (recoveryInProgress) {
|
||||
Log.i(TAG, "Wi-Fi Aware recovery cleanup still in progress; deferring start")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user