mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-15 02:18:04 -04:00
#1351 renamed to hadshake
This commit is contained in:
parent
11343a694a
commit
77d894a911
@ -47,7 +47,7 @@ import java.util.ArrayList
|
||||
*/
|
||||
internal class PeerGroupHandshake(private val wifiDirectManager: WifiDirectManager) {
|
||||
private val HANDSHAKE_MESSAGE = "Request Kiwix File Sharing"
|
||||
suspend fun peer(): InetAddress? = withContext(Dispatchers.IO) {
|
||||
suspend fun handshake(): InetAddress? = withContext(Dispatchers.IO) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
Log.d(TAG, "Handshake in progress")
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ class WifiDirectManager @Inject constructor(
|
||||
peerGroupHandshake = PeerGroupHandshake(this)
|
||||
.also {
|
||||
lifecycleCoroutineScope.launch {
|
||||
val inetAddress = it.peer()
|
||||
val inetAddress = it.handshake()
|
||||
inetAddress?.let(::setClientAddress) ?: if (BuildConfig.DEBUG) {
|
||||
Log.d(TAG, "InetAddress is null")
|
||||
displayToast(R.string.connection_refused, "", Toast.LENGTH_LONG)
|
||||
|
Loading…
x
Reference in New Issue
Block a user