summaryrefslogtreecommitdiff
path: root/services/net/java/android
AgeCommit message (Collapse)Author
2021-06-21Remove most of the NetworkStack dependencies on frameworks/base.Lorenzo Colitti
Most of these files are being moved to the networkstack-client library in packages/modules/NetworkStack, with the exception of DhcpResultsCompatUtil which is unused and is being deleted. Test: m Bug: 151052811 Original-Change: https://android-review.googlesource.com/1734913 Merged-In: I72ec43987faf9138cd68dc47c6bf2abe8c67aa38 Change-Id: I72ec43987faf9138cd68dc47c6bf2abe8c67aa38
2021-04-09Merge "Replace fields with getters in keepalive API" am: 8c5ae7e37f am: ↵Remi NGUYEN VAN
e07d038931 am: b4d44cfe7f Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669345 Change-Id: I73f6f89eb2d1255743d10c1ec1c92770845bdd63
2021-04-08Replace fields with getters in keepalive APIRemi NGUYEN VAN
General guidance is to have getters in the API instead of fields. Fixes: 181014882 Test: m Change-Id: Id4bfc447701e8d0380163047779fbba043f17b6f
2020-12-15Merge changes from topic "tcp_keepalive_fix" am: eada640d5d am: a0038ffa9d ↵Remi NGUYEN VAN
am: 66508a1e66 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1494039 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I26fa0ae4a1f41f1b970f6f7b192dfc4fe4bedb1d
2020-12-15Add TcpKeepalivePacketData to SystemApi am: 103ec4aa8d am: a232c68028 am: ↵Remi NGUYEN VAN
40190840bb Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1494038 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1aa9deefefcaf75959463e8a8a87bfeefb98f0ee
2020-12-14Use API TcpKeepalivePacketData in ClientModeImplRemi NGUYEN VAN
Instead of statically linking against and jarjaring TcpKeepalivePacketData, use the new android.net.TcpKeepalivePacketData API for S. On R, build the KeepalivePacketDataParcelable from the base KeepalivePacketData class. The current ClientModeImpl code that uses a statically linked TcpKeepalivePacketData is actually broken, as since R the system_server has been sending a @hide android.net.TcpKeepalivePacketData, and ClientModeImpl was testing it against com.android.wifi.x.android.net.*. To fix this on R, this change rebuilds a TcpKeepalivePacketDataParcelable class from the packet data included in the base KeepalivePacketData class. Bug: 172789687 Test: atest ConnectivityManagerTest#testCreateTcpKeepalive See associated test change Change-Id: Ia32b4444dbf90306b2cfd37ec13d4ba4e90cd1e8
2020-12-14Add TcpKeepalivePacketData to SystemApiRemi NGUYEN VAN
This is consistent with NattKeepalivePacketData, which is also a subclass of KeepalivePacketData. TcpKeepalivePacketData is already used by the wifi module, but statically linked. Bug: 172789687 Test: m Change-Id: I6aee1ae205987521bea4a3838bbece279ffa0e37
2020-10-09Merge "Move IpUtils to frameworks/libs/net" am: e842db3548 am: 62e99304d6 ↵Remi NGUYEN VAN
am: e55c9f1335 am: 364672242c Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440234 Change-Id: I27072c126ee7eedc2de3d1cdccd0fd503f1577a1
2020-10-07Tighten up Binder.clearCallingIdentity() usage.Jeff Sharkey
This is a third CL in a chain that adjusts existing malformed code to follow AndroidFrameworkBinderIdentity best-practices. Specifically, if a thread clears an identity they need to restore it to avoid obscure security vulnerabilities. In addition, the relevant "try" block must start immediately after the identity is cleared to ensure that its restored if/when any exceptions are thrown. Bug: 155703208 Test: make Exempt-From-Owner-Approval: trivial refactoring Change-Id: I74cb958b68d55a647547aae21baff6ddc364859b
2020-10-05Move IpUtils to frameworks/libs/netRemi NGUYEN VAN
The utility classes are useful for mainline modules and their tests, for example IpClientIntegrationTest. Bug: 168868607 Test: m && atest NetworkStaticLibTests Change-Id: If2b1613aa18a7990391e2d31cc2951ca93f1cf3c
2020-08-07Revert "Revert "Move Inet[4]AddressUtils to libs/net""Chalard Jean
This patch is still needed and should go in now that the error is fixed. The patch was submitted into rvc-dev and is already in rvc-dev-plus-aosp (patch in in ag/11923559, revert skipped in ag/12072199). A follow-up will remove the unused services.net-module-wifi target. Test: originally tested in aosp/1324109 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Change-Id: I1074eedb0b0f156a1135e11210ec102de15ea674 Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b
2020-07-02Revert "Move Inet[4]AddressUtils to libs/net"Chalard Jean
This reverts commit 57d68e3c55176083ba40947be8f335534d958006. Reason for revert: Breaks the build b/160390899 Merged-In: Icd141a992c46290c74929785e261a1cd57bc001b Change-Id: Ie10e66f61393602f17fbb61bf17230b176bf1f44
2020-07-02Move Inet[4]AddressUtils to libs/netRemi NGUYEN VAN
The classes should not be picked up from frameworks/base, as they are part of several mainline modules. Also refine comments in DhcpResults following feedback in previous change. (cherry-pick from internal branch skipping wifi classes; no other conflict) Bug: 151052811 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Merged-In: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
2020-06-12Move Inet[4]AddressUtils to libs/netRemi NGUYEN VAN
The classes should not be picked up from frameworks/base, as they are part of several mainline modules. Also refine comments in DhcpResults following feedback in previous change. Bug: 151052811 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
2020-06-11Remove IpClientCallbacks dependency on DhcpResultsRemi NGUYEN VAN
DhcpResults should only be used inside the NetworkStack: modules are expected to use DhcpResultsParcelable instead. Add a compat utility so current users of DhcpResults can do the conversion (wifi in AOSP in particular). The utility can be removed when changes to stop depending on DhcpResults are merged in AOSP. Bug: 149403767 Test: built, flashed, WiFi working Original-Change: https://android-review.googlesource.com/1277608 Merged-In: I5b85c1a541ecdf9dd3e9403b9fb1c2b5aba98dd8 Change-Id: I5b85c1a541ecdf9dd3e9403b9fb1c2b5aba98dd8
2020-06-09Remove IpClientCallbacks dependency on DhcpResultsRemi NGUYEN VAN
DhcpResults should only be used inside the NetworkStack: modules are expected to use DhcpResultsParcelable instead. Add a compat utility so current users of DhcpResults can do the conversion (wifi in AOSP in particular). The utility can be removed when changes to stop depending on DhcpResults are merged in AOSP. Bug: 149403767 Test: built, flashed, WiFi working Change-Id: I5b85c1a541ecdf9dd3e9403b9fb1c2b5aba98dd8
2020-04-02Add new method to update Layer2 information when L2 roaming happens.Xiao Ma
Bug: 131797393 Test: atest FrameworksNetTests Merged-In: I171bd5e22b5afd5c62029392af627d7bdfe32161 (cherry picked from commit 1083b27f7c30d6ccfd8a6f4402788b4b4789ef60) Change-Id: I23019658acfec18d342d38e8c189dcfaeb7b6f4a
2020-03-31Merge "Add new method to update Layer2 information when L2 roaming happens."Xiao Ma
2020-03-24API review: access field by methodAaron Huang
- InvalidPacketException, public field should be a method so add getter to get error code. - KeepalivePacketData, public fields should be methods so add getter for fields. Bug: 151322799 Test: atest FrameworksNetTests atest FrameworksWifiTests atest FrameworksTelephonyTests: some failure in CarrierAppUtilsTest Copy from ag/10731108 Change-Id: Id01e6135193716cc21bba11da529bf1507a954f7 Merged-In: Id01e6135193716cc21bba11da529bf1507a954f7
2020-03-19API review: access field by methodAaron Huang
- InvalidPacketException, public field should be a method so add getter to get error code. - KeepalivePacketData, public fields should be methods so add getter for fields. Bug: 151322799 Test: atest FrameworksNetTests atest FrameworksWifiTests atest FrameworksTelephonyTests: some failure in CarrierAppUtilsTest Change-Id: Id01e6135193716cc21bba11da529bf1507a954f7
2020-03-16services.net: Add a static library needed by wifi moduleRoshan Pius
Add a new static library that compiles against system_current which includes all the parts needed by the wifi mainline module. Also, a) Refactored TcpKeepalivePacketData to use public APIs. The parcel read/write methods in the base class are @hide and they're not used by the other child class (NatKeepalivePacketData). So, remove the @hide method from base class and use it direcly in the child class. Bug: 145825329 Test: Device boots up & connects to wifi networks. Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c Merged-In: Ifde69b579cfe5b813766f676acb10e436e64a44c
2020-03-13services.net: Add a static library needed by wifi moduleRoshan Pius
Add a new static library that compiles against system_current which includes all the parts needed by the wifi mainline module. Also, a) Refactored TcpKeepalivePacketData to use public APIs. The parcel read/write methods in the base class are @hide and they're not used by the other child class (NatKeepalivePacketData). So, remove the @hide method from base class and use it direcly in the child class. b) Add jar-jar rules for all the statically linked dependencies in wifi service jar rules. Exempt-From-Owner-Approval: Minor change on top of owner's approval. Bug: 145825329 Test: Device boots up & connects to wifi networks. Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c
2020-03-12services.net: Use the new ModuleNetworkStackClientRoshan Pius
Use the new ModuleNetworkStackClient to retrieve instances IpMemoryStore & IpClient. Bug: 145825329 Test: Compiles Change-Id: I065525fdbd64b9509ef0f47bb35954d267c65fd2 Merged-In: I065525fdbd64b9509ef0f47bb35954d267c65fd2
2020-03-12services.net: Use the new ModuleNetworkStackClientRoshan Pius
Use the new ModuleNetworkStackClient to retrieve instances IpMemoryStore & IpClient. Bug: 145825329 Test: Compiles Change-Id: I065525fdbd64b9509ef0f47bb35954d267c65fd2
2020-03-05Add new method to update Layer2 information when L2 roaming happens.Xiao Ma
Bug: 131797393 Test: atest FrameworksNetTests Change-Id: I72f2752f73be9df693996c4b23115937c4bcadb3
2020-01-29Add implementation of getInterfaceHash()Paul Trautrim
Exempt-From-Owner-Approval: cherry-pick from internal Bug: 136065010 Test: m Change-Id: I314f19aeca82cc8653eab71c9526ea7a208e6b50 Merged-In: I314f19aeca82cc8653eab71c9526ea7a208e6b50
2020-01-28Add implementation of getInterfaceHash()Paul Trautrim
Bug: 136065010 Test: m Change-Id: I314f19aeca82cc8653eab71c9526ea7a208e6b50
2020-01-10Merge "Add IpClientCallbacks.onNewDhcpResults(DhcpResultsParcelable)"Treehugger Robot
2020-01-10Merge "Add keepalive related methods and fields to system APIs"Aaron Huang
2020-01-10Add IpClientCallbacks.onNewDhcpResults(DhcpResultsParcelable)Chiachang Wang
Add new callback to replace old one. Target to remove onNewDhcpResults(Dhcpresults). The previous onNewDhcpResults callback will be removed after clients are migrated. Bug: 135998869 Test: build Test: atest FrameworksNetTests NetworkStackTests Change-Id: Id6c72228560dc3c387755c27adacaa9aece6309a
2019-12-17Add keepalive related methods and fields to system APIsAaron Huang
Add KeepalivePacketData to system API for mainline support. Also, remove InvalidPacketException class from SocketKeepalive and create a new InvalidPacketException class in android.net Bug: 139268426 Bug: 135998869 Bug: 138306002 Test: atest FrameworksNetTests atest NetworkStackTests atest FrameworksTelephonyTests ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh atest android.net.cts atest android.net.wifi.cts atest android.telephony.cts Change-Id: I2d982e8abb5cb6b4c74a20483550b18cf814320d Merged-In: I2d982e8abb5cb6b4c74a20483550b18cf814320d
2019-12-17Add services-stubs for in-process APIs in services.jarJiyong Park
services-stubs is a stubs library for services.jar. It provides the in-process APIs that's available inside the system server process running services.jar. Currently, all APIs in the jar are hidden by annotating com.android.server package with @android.annotation.Hide. To add some APIs, 1) remove package-info.java for com.android.server 2) add package-info.java for other sub packages 3) annotate them with @android.annotation.Hide except for the package where the newly added APIs are in This change also added android.annotation.Hide class which can be used to hide an API without using the @hide javadoc tag. This opens up the possibility of running metalava over the compiled jar, which is expected to be much faster than when ran with source files. Bug: 139391334 Test: m Test: m services-stubs Exempt-From-Owner-Approval: cherry-pick from internal Merged-In: I027b8a22b3e7533f6203aabb9dc3f690e4e842a6 (cherry picked from commit abc72e45c647d6f617ce90b7a5d4a3121c0aa87d) Change-Id: I027b8a22b3e7533f6203aabb9dc3f690e4e842a6
2019-12-05Merge "Add DHCP Rapid Commit FILS support."Xiao Ma
2019-12-03Add DHCP Rapid Commit FILS support.Xiao Ma
Bug: 140223017 Test: atest FrameworksNetTests NetworkStackTests Test: atest NetworkStackIntegrationTests Test: manual Change-Id: Ia73e92058f30acee16eff27e05ec53d2eb0e7110
2019-11-30[Tether07] Migrate Tethering into modulemarkchien
am: 0df2ebc43d Change-Id: I1aaa034e91eae2d6e9abcbbd70741a54a18b3ddc
2019-11-30[Tether07] Migrate Tethering into modulemarkchien
Now tethering would be run in dedicated service. TetheringManager is the interface used to communicate with TetheringService. The new call flow would be: ConnectivityManager -> ConnectivityService -> TetheringManager -> TetheringService. Note: the return value of #tether(), #untether() and #setUsbTethering() APIs would always be no error. Client can use #getLastTetherError() or #getTetheredIfaces or listen tether state change to check status of corresponding interface. Bug: 136040414 Bug: 144742179 Test: -build, flash, boot -atest TetheringTests -atest FrameworksNetTests Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3 Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-21Merge "Move shared packages to NetworkStack project"Remi NGUYEN VAN
am: 27253f29ad Change-Id: I17068de9e9b4388b8ec025ce3e1dc722e471ccbb
2019-11-22Merge "Move shared packages to NetworkStack project"Remi NGUYEN VAN
2019-11-20Move shared packages to NetworkStack projectRemi NGUYEN VAN
Both were already statically linked both in the NetworkStack module and the framework, so this change only reorganizes the file locations. It makes more sense to have the library files in the NetworkStack module folder, as changes to these files will be released with the same cadence as the module, not the framework. Bug: 139106271 Test: built, flashed, WiFi working Change-Id: Ifaa882b53d1084ef32db6b27d35b56eb226c468f
2019-11-19Merge "NetworkStackClient: Use @SystemApi alternative for isSameApp"Roshan Pius
am: 6a612863e6 Change-Id: Ib2cea3e218fdee4ebe054912465b4a1f575b3dd2
2019-11-18NetworkStackClient: Use @SystemApi alternative for isSameAppRoshan Pius
This introduces an @hide dependency on the wifi stack which is statically linking services.net library. Bug: 142935310 Test: Compiles Change-Id: I0040df6b3392fc68e950364092ed07cf5dc5a00e (cherry-picked from e1a2455d503917d080038b0e714beb7b3506cbd7)
2019-10-31Merge "DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into ↵TreeHugger Robot
stage-aosp-master" into stage-aosp-master
2019-10-31Merge "[Tether05] Migrate UpstreamNetworkMonitor into module"Mark Chien
2019-10-30DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into ↵Xin Li
stage-aosp-master Bug: 142003500 Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30[Tether05] Migrate UpstreamNetworkMonitor into modulemarkchien
Bug: 136040414 Test: -build, flash, boot -atest TetheringTests -atest FrameworksNetTests Change-Id: Ic1d9deecb66aaba0a4264a57f2e6579ea491ac9b
2019-10-25Merge "[Tether03] Migrate IpServer into module"Mark Chien
2019-10-24Merge "Extend netlink class to fit the data structure"Chiachang Wang
2019-10-24[Tether03] Migrate IpServer into modulemarkchien
Add IpServer which is used to serve ip configuration, dhcp, dns proxy and nat for downstream interface. Bug: 136040414 Test: -build, flash, boot -atest TetheringTests -atest FrameworksNetTests Change-Id: I23652ae0b9509abe7d38da96d523eb22ab00a343
2019-10-23Extend netlink class to fit the data structureChiachang Wang
In order to get the tcp_info via netlink socket from kernel, NetworkStack needs to use netlink class to pack and parse the InetDiagReq. Current design hardcodes ididag_ext field in InetDiagReqV2. The structure is also not allowed to take null id to not to specify certain socket. Update the constructor and backward support exising constructor. Bug: 136162280 Test: atest FrameworksNetTests NetworkStackTests Change-Id: Id66da1797da183ae3d99073f80bad1df929946dc
2019-10-18Merge "p2p: mirgrate p2p into tethering modes"Jimmy Chen