summaryrefslogtreecommitdiff
path: root/service-t/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | Merge "Replace Preconditions.checkNotNull with Objects.requireNonNull."Xiao Ma2021-12-221-3/+1
| | | |\ \
| | | | * | Replace Preconditions.checkNotNull with Objects.requireNonNull.Xiao Ma2021-12-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ethernet service related files are going to be moved into Connectivity mainline module. Replace the Preconditions.checkNotNull usage in EthernetNetworkFactory with Objects.requireNonNull. Bug: 210586283 Test: atest EthernetServiceTests Change-Id: Ibeaf687f706e8400f825cb2ca97bb1341774a97d
| | | * | | Import InterfaceParams class from f/libs/net/common.Xiao Ma2021-12-211-1/+1
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ethernet service related files are going to be moved into Connectivity mainline module. Import InterfaceParams class in EthernetNetworkFactory from f/libs/net/common, which is visible to Connectivity module. Bug: 210586283 Test: atest EthernetServiceTests Change-Id: I98ebb04cc3c2b685464e7f2689424794957088b3
| | | * | Merge "Remove NetdService usage from EthernetTracker."Xiao Ma2021-12-161-2/+3
| | | |\ \
| | | | * | Remove NetdService usage from EthernetTracker.Xiao Ma2021-12-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ethernet service related files are going to be moved into Connectivity module. So, NetdService won't be visible to EthernetTracker since it's a hidden class. Alternatively, get the INetd instance from system service instead. Bug: 210586283 Test: atest FrameworksNetTests Test: atest EthernetServiceTests Change-Id: Iea021ac25cbe4b8836fdab2cd6b4bd3ead5bf725
| | | * | | Handle neighbor lost eventPavan Kumar M2021-12-151-0/+16
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neighbor lost event is received when gateway is not reachable. Ethernet Factory currently doesn't handle the neighbor lost event and network will not be brought down. This results in loss of connectivity even if there are other networks like WiFi. Restart NetworkInterfaceState when neighbor lost event is received. If there is a better network like WiFi, it will become default and apps will be able to use internet. If ethernet gets connected again, and has backhaul connectivity, it will become default. Bug: 180077540 Tests: Builds, Boots, EthernetServiceTests Change-Id: I26d720994ecb35f6529358a53e115091e7817c2f
| | | * | Adding test coverage for eth transport overridesJames Mattis2021-12-071-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added test coverage regarding how EthernetTracker consumes the xml config as set in config_ethernet_interfaces. Additionally, adding test coverage for transport override functionality in EthernetNetworkFactory. Bug: 206170402 Test: atest com.android.server.ethernet.EthernetTrackerTest && atest com.android.server.ethernet.EthernetNetworkFactoryTest Change-Id: I3d55a230d3f28154ed6fdac6d63ed57bf589d3bd
| | | * | Removing unused int network score from eth factoryJames Mattis2021-12-072-82/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hard coded network scores are no longer used however they still exist in EthernetNetworkFactory. This change removes this unused code in favor of the NetworkScore object. Bug: 209679953 Test: m && atest com.android.server.ethernet.EthernetNetworkFactoryTest Change-Id: Ic9035964fc0e0bdf1dbd1ee845ba3293c753dd8d
| | | * | Stop using NetworkStack#checkNetworkStackPermission* am: d6789606d5paulhu2021-09-162-8/+7
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1827093 Change-Id: I304701a1ad5be47bec534d679eca259b06cb084d
| | | | * | Stop using NetworkStack#checkNetworkStackPermission*paulhu2021-09-152-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace them with PermissionUtils.enforceNetworkStackPermission* since those methods are deprecated. Bug: 177187957 Test: atest EthernetServiceTests Change-Id: Ifde4a8898439b86e6cc49b7469787bc5e4a91835
| | | * | | Merge "prevent nullptr dereference when calling unwanted" am: 03f03d7acfTreehugger Robot2021-08-201-2/+5
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1802269 Change-Id: I703f0c9fb9748cc2a211acd667f7d27a265025a7
| | | | * | Merge "prevent nullptr dereference when calling unwanted"Treehugger Robot2021-08-201-2/+5
| | | | |\ \
| | | | | * | prevent nullptr dereference when calling unwantedPatrick Rohr2021-08-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the EthernetNetworkAgent has already been stopped, a call to unwanted will cause a crash due to a nullptr derefernce. Bug: 197279734 Test: atest EthernetNetworkFactoryTest Change-Id: Ice39c603bdd3e3139aa8ece7fb897bf7b567e74b
| | | * | | | Add null check for the taken callback am: c57eb8c6adChiachang Wang2021-08-201-0/+3
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1802597 Change-Id: I8fe9b5918e2af72d6edd7ae334f6062e32bbfdad
| | | | * | | Add null check for the taken callbackChiachang Wang2021-08-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The requestTetheredInterface() and releaseTetheredInterface() in EthernetManager is annotated as @NonNull. Basically, the taken callback parameter to the service implementation should also be @NonNull. However, it still possible to use native commands to call the method in the aidl. If a null callback is taken, it may cause unexpected results and cause crashes. Add a null check and throw NPE as a warning. Bug: 190058445 Test: adb commands Change-Id: I18fd63aba3f7326597fc3a8c93ba8c9097bf7348
| | | | * | | Merge "Revert "Set EthernetNetworkSpecifier on each ethernet network for ↵Ady Abraham2021-08-121-4/+0
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | multi-ethernet""
| | | | | * | | Revert "Set EthernetNetworkSpecifier on each ethernet network for ↵Ady Abraham2021-08-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi-ethernet" This reverts commit b94c4e74539452158b0472f1a6b645115cf9dc18. Reason for revert: b/196387077 Change-Id: I8e27ce915b6069b642c614a018aa5e1788ae07af
| | | | * | | | Merge "Set EthernetNetworkSpecifier on each ethernet network for multi-ethernet"Treehugger Robot2021-08-121-0/+4
| | | | |\| | | | | | | | |/ / | | | | |/| |
| | | | | * | Set EthernetNetworkSpecifier on each ethernet network for multi-ethernetMilim Lee2021-07-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 175199512 Test: Build and test multi-ethernet Change-Id: I6ec50b42bee89520f6f27d40e0d2b0d774b8e2e5
| | | * | | | Remove Unused Code From EthernetNetworkFactory am: 698b59510f am: e7048826baPatrick Rohr2021-07-291-20/+0
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1722876 Change-Id: I2a4f5caa041f6b0e6f950e536ab74be71a5a2a53
| | | | * | | Remove Unused Code From EthernetNetworkFactoryPatrick Rohr2021-07-281-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: atest EthernetNetworkFactoryTest Change-Id: Ibe0190b3108dca644da2d67bd107954cb26f41ce
| | | * | | | Add Tests for EthernetNetworkFactory am: e78e8828d6 am: f5e25fcc5dPatrick Rohr2021-07-282-20/+117
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1486182 Change-Id: Id09046b501b7b280830e51d5b82f2d5e8f7fa6d7
| | | | * | | Add Tests for EthernetNetworkFactoryPatrick Rohr2021-07-282-20/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: atest EthernetNetworkFactoryTest Bug: 191635995 Change-Id: I1c07bb6d30706c4e13002eb402fadfecb97b36d1
| | | * | | | Merge "Stop using LinkPropertiesParcelableUtil." am: 0b58e409a1 am: a04fb395b6Lorenzo Colitti2021-06-211-3/+1
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ethernet/+/1733473 Change-Id: I51829f89466e518712f117675eef40792577ece3
| | | | * | | Stop using LinkPropertiesParcelableUtil.Lorenzo Colitti2021-06-121-3/+1
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its methods are all no-ops. Stop using them. Test: m Bug: 151052811 Change-Id: Iace3ba898bec2940ec3c3323c5bf8a13627d545f
| | | | * | Replace clearAll with withoutDefaultCapabilities in NC#BuilderChiachang Wang2021-05-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the naming and usgae according to API review feedback. Bug: 184735772 Test: atest EthernetTrackerTest Change-Id: Ie8dc0bcdf46ceebda5d6062231b48c1f63b250f6 Merged-In: Ie8dc0bcdf46ceebda5d6062231b48c1f63b250f6
| | | | * | Add transport type in capabilities filter of EthernetNetworkFacotrylucaslin2021-05-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 167544279 Test: atest EthernetServiceTests Change-Id: Ie64e3cff0ace413f14682736de7a1b65fa93e705 Merged-In: Ie64e3cff0ace413f14682736de7a1b65fa93e705 (Cherry-picked from ag/14031548)
| | | | * | Use public API instead of hidden API in EthernetTrackerlucaslin2021-03-231-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use public API of StaticIpConfiguration.Builder to set ipaddress, domains, gateway and dnsServers. - Use public constructor to create an instance of IpConfiguration and set IpAssignment, ProxySettings, StaticIpConfiguration and HttpProxy by public API. Bug: 182963415 Test: m ethernet-service Change-Id: Idce8bfe7afc31baa644c816afa1f8004987e8c6e Merged-In: Idce8bfe7afc31baa644c816afa1f8004987e8c6e
| | | * | | Replace clearAll with withoutDefaultCapabilities in NC#BuilderChiachang Wang2021-05-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the naming and usgae according to API review feedback. Bug: 184735772 Test: atest EthernetTrackerTest Change-Id: Ie8dc0bcdf46ceebda5d6062231b48c1f63b250f6
| | | * | | Enforce ACCESS_NETWORK_STATE to getAvailableInterfaces()paulhu2021-04-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getAvailableInterfaces() will return available ethernet interfaces which are the information about networks. So it should enforce ACCESS_NETWORK_STATE permission check to ensure the applications are allowed to access the information. Bug: 174573778 Test: TetheringTests Test: CtsTetheringTest Change-Id: I7aaa5225d56f2feecc51ba263489ed0ce02fd651
| | | * | | Add transport type in capabilities filter of EthernetNetworkFacotrylucaslin2021-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 167544279 Test: atest EthernetServiceTests Change-Id: Ie64e3cff0ace413f14682736de7a1b65fa93e705
| | | * | | Merge "Use public API instead of hidden API in EthernetTracker" into sc-devLucas Lin2021-03-191-7/+15
| | | |\ \ \ | | | | |/ / | | | |/| |
| | | | * | Use public API instead of hidden API in EthernetTrackerlucaslin2021-03-191-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use public API of StaticIpConfiguration.Builder to set ipaddress, domains, gateway and dnsServers. - Use public constructor to create an instance of IpConfiguration and set IpAssignment, ProxySettings, StaticIpConfiguration and HttpProxy by public API. Bug: 182963415 Test: m ethernet-service Change-Id: Idce8bfe7afc31baa644c816afa1f8004987e8c6e
| | | * | | Replace reference of NetworkAgent#setLegacyExtraInfojunyulai2021-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 182963415 Test: m ethernet-service Test: atest EthernetServiceTests Change-Id: I4a66f34daa129b3158e4dd2fb720c175611eaf69
| | | * | | Replace references of request.networkCapabiliesjunyulai2021-03-191-3/+4
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced by request.canBesatisfiedBy() to avoid direct reference of hidden member. Bug: 182963415 Test: m ethernet-service Test: atest EthernetServiceTests Change-Id: I2a27410a6148c525e17a11cb1ba3570f04e60b5d
| | | * | Use clearAll() of NetworkCapabilities.Builder insteadlucaslin2021-03-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetworkCapabilities#clearAll() is a hidden API, use clearAll() of NetworkCapabilities.Builder instead. Bug: 182963415 Test: m ethernet-service Test: atest EthernetServiceTests Change-Id: I87745b5f7a5817f95cdbc623b2313c181ff48f19
| | | * | Merge "Rename StringNetworkSpecifier to Ethernet"Remi NGUYEN VAN2021-03-111-3/+4
| | | |\ \
| | | | * | Rename StringNetworkSpecifier to EthernetRemi NGUYEN VAN2021-03-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new specifier represents ethernet interfaces more specifically and is part of the public API. Bug: 179329291 Test: atest CtsNetTestCases Merged-In: I6cba1709b3007a22d95849a1281237c77e1464a4 Change-Id: I6cba1709b3007a22d95849a1281237c77e1464a4
| | | * | | Merge "[CS09]Remove hidden API usage of NetworkRequest"Frank Li2021-03-111-4/+0
| | | |\ \ \
| | | | * | | [CS09]Remove hidden API usage of NetworkRequestlifr2021-03-111-4/+0
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The connection service will become the mainline module. So, need to remove the hidden API usage of NetworkRequest. The NetworkRequest.type(TRACK_DEFAULT) is no longer sent to the factories. So, remove the (TRACK_DEFAULT) check to avoid using hidden API. Bug: 170598012 Test: atest EthernetServiceTests Change-Id: I5b5fed864318e9ac7e190c40d4f52076ab0eece8
| | | * / / [CS07]Remove hidden API usage of NetworkCapabilitieslifr2021-03-051-14/+15
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The connection service will become the mainline module. The mutable NetworkCapabilities is deprecated, and the NetworkCapabilities should be built through their Builder instead. Bug: 170598012 Test: atest EthernetServiceTests Change-Id: I09661ddda24d652ed791a7c6b093541e20a15e77
| | | * | [CS02]Remove hidden API usage of NetworkCapabilitieslifr2021-02-092-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The connection service will become the mainline module. The mutable NetworkCapabilities is deprecated, and the NetworkCapabilities should be built through their Builder instead. Bug: 170598012 Test: atest EthernetServiceTests Change-Id: I31f12a39a924302beca980b8d920e3c5c18816d4
| | | * | Merge "Replace the usage of NetworkManagementService with NetdUtils"Lucas Lin2021-02-021-1/+9
| | | |\ \
| | | | * | Replace the usage of NetworkManagementService with NetdUtilslucaslin2021-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since NetdUtils has the same method(setInterfaceUp) as NetworkManagementService, replace the usage of NMS with NetdUtils. Bug: 170598012 Test: atest EthernetServiceTests Change-Id: Id0f8e17e9d6237fa8ab157c96dd982c47007a453
| | | * | | [VCN07.4] Add NOT_VCN_MANAGED for NetworkAgent implementationsjunyulai2021-01-281-0/+1
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up from aosp/1549897, the capability will not be in default capabilities, but will be in most of the NetworkRequests which requires internet. Thus, add the capabilities into all NetworkAgent implementations by default to provide backward compatibility. Test: TH Bug: 175662146 Change-Id: Ib6e203571946e3094e4ce534b108f796cc3b8fb7
| | | * | [NS01.eth] Remove a useless argumentChalard Jean2021-01-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Test: FrameworksNetTests Change-Id: Ib262871e4909ae65b5e6b2e52d2f25bf5a653f34
| | | * | Add TRANSPORT_TEST to test ethernet interfacesRemi NGUYEN VAN2020-05-271-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because they operate on test interfaces, ethernet interfaces included with setIncludeTestInterfaces should have TRANSPORT_TEST. Bug: 156319532 Test: atest CaptivePortalApiTest Change-Id: Ife3eab06432cabf3ee626de49abc31c8349b4316
| | | * | Add capability they should always have to eth networks.Chalard Jean2020-05-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * | Address further API council comments.Chalard Jean2020-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: FrameworksNetTests NetworkStackTests Bug: 152238712 Copy from ag/10857997 Change-Id: I7c27f76c54a76abeae46dcdcddaeb3ca48afa358 Merged-In: I7c27f76c54a76abeae46dcdcddaeb3ca48afa358
| | | * | Convert the Ethernet factory to the new network agentChalard Jean2020-04-011-36/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a combination of ag/10147368 and ag/10438581. ag/10147368 implemented this conversion together with using the planned NetworkScore API, while ag/10438581 reverted the parts that had to do with NetworkScore. This is just a squash of these two patches and it brings the factory in line with the code in rvc-dev. Test: FrameworksNetTests NetworkStackTests EthernetTetheringTest Change-Id: Ib214fbbd042f2c0ebd01cf5b0ec33d922629677e Merged-In: Ie7b70750ef0e17141080f4266dea6155c3601569