summaryrefslogtreecommitdiff
path: root/framework/src/android/net/TestNetworkSpecifier.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove Preconditions usage in TestNetworkSpecifierRemi NGUYEN VAN2021-03-191-3/+3
| | | | | | | | | Preconditions is a hidden API utility. It can be easily replace by inline checks. Bug: 177046265 Test: m Change-Id: I3f722075fb9c74e12e40348ba4faad2f0fa67178
* Add Ethernet, TestNetworkSpecifier APIRemi NGUYEN VAN2021-03-091-0/+97
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only production user), and make it module-lib API. The original StringNetworkSpecifier file is actually kept to satisfy some invalid dependencies; it will be removed separately. This allows specifying an Ethernet interface with a non-deprecated API: until this change the only way to do so would be to use NetworkRequest#setSpecifier(String), which is deprecated. Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to replace previous usage of StringNetworkSpecifier. TestNetworkManager is module API, so TestNetworkSpecifier should be module API too. This allows tests to request the test interface specifically, without using the deprecated NetworkRequest#setSpecifier(String). Bug: 179329291 Test: m Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620