summaryrefslogtreecommitdiff
path: root/service-t/src
diff options
context:
space:
mode:
authorChalard Jean <jchalard@google.com>2020-05-11 11:20:00 +0900
committerChalard Jean <jchalard@google.com>2020-05-11 11:21:15 +0900
commitbddcfc0c48dd4902e11a92d38c80973f6bcd388a (patch)
tree790ed8d8d9364c526f7925919576453f5973ed29 /service-t/src
parent4b9a7dd13d2ca18dcf67c38c8a64a779b6462add (diff)
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
Diffstat (limited to 'service-t/src')
-rw-r--r--service-t/src/com/android/server/ethernet/EthernetTracker.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/service-t/src/com/android/server/ethernet/EthernetTracker.java b/service-t/src/com/android/server/ethernet/EthernetTracker.java
index c8c3bdfb59..d37e0c9c86 100644
--- a/service-t/src/com/android/server/ethernet/EthernetTracker.java
+++ b/service-t/src/com/android/server/ethernet/EthernetTracker.java
@@ -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;
}