Preliminary support for stacked links
This commit is contained in:
@@ -2,6 +2,7 @@ package be.mygod.vpnhotspot.net.monitor
|
||||
|
||||
import android.net.LinkProperties
|
||||
import be.mygod.vpnhotspot.util.Services
|
||||
import be.mygod.vpnhotspot.util.allInterfaceNames
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -29,7 +30,7 @@ class InterfaceMonitor(val iface: String) : UpstreamMonitor() {
|
||||
private set
|
||||
override val currentLinkProperties get() = Services.connectivity.allNetworks
|
||||
.map { Services.connectivity.getLinkProperties(it) }
|
||||
.singleOrNull { it?.interfaceName == iface }
|
||||
.singleOrNull { it?.allInterfaceNames?.contains(iface) == true }
|
||||
|
||||
override fun registerCallbackLocked(callback: Callback) {
|
||||
if (!registered) {
|
||||
|
||||
Reference in New Issue
Block a user