Revert "platform: Implement set underlying networks for android"

This reverts commit eb4a184b7e.
This commit is contained in:
世界
2024-12-26 14:39:57 +08:00
parent 41f4b71a11
commit d7ff5a7ac3
8 changed files with 0 additions and 43 deletions

View File

@@ -240,9 +240,6 @@ func (r *NetworkManager) UpdateInterfaces() error {
newInterfaces := common.Filter(interfaces, func(it adapter.NetworkInterface) bool {
return it.Flags&net.FlagUp != 0
})
for _, networkInterface := range newInterfaces {
networkInterface.RawNetwork = nil
}
r.networkInterfaces.Store(newInterfaces)
if len(newInterfaces) > 0 && !slices.EqualFunc(oldInterfaces, newInterfaces, func(oldInterface adapter.NetworkInterface, newInterface adapter.NetworkInterface) bool {
return oldInterface.Interface.Index == newInterface.Interface.Index &&
@@ -263,15 +260,6 @@ func (r *NetworkManager) UpdateInterfaces() error {
}
return F.ToString(it.Name, " (", strings.Join(options, ", "), ")")
}), ", "))
if C.IsAndroid {
err = r.platformInterface.SetUnderlyingNetworks(newInterfaces)
if err != nil {
r.logger.Error("set underlying networks: ", err)
}
}
}
for _, networkInterface := range interfaces {
networkInterface.RawNetwork = nil
}
return nil
}