Add capability they should always have to eth networks.
There is a stopgap hack in ConnectivityService doing this automatically, but individual agents should be doing this themselves. Test: FrameworksNetTests NetworkStackTests Bug: 150570873 Change-Id: I6f75e2b26eb9f554243bc418142a4dc18839aa79
This commit is contained in:
@@ -464,6 +464,7 @@ final class EthernetTracker {
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING);
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED);
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED);
|
||||
|
||||
return nc;
|
||||
}
|
||||
@@ -542,6 +543,11 @@ final class EthernetTracker {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Ethernet networks have no way to update the following capabilities, so they always
|
||||
// have them.
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING);
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED);
|
||||
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED);
|
||||
|
||||
return nc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user