summaryrefslogtreecommitdiff
path: root/service/src/com/android/server/connectivity/TcpKeepaliveController.java
Commit message (Collapse)AuthorAgeFilesLines
* Use separate catch for getTcpKeepalivePacketRemi NGUYEN VAN2022-03-221-1/+6
| | | | | | | | | | | | | | | Having a combined catch block causes the code to be "optimized" by R8 to just throw a NullPointerException, with smali code: const/4 p0, 0x0 throw p0 Workaround the issue by having separate catch blocks instead. Bug: 217391956 Bug: 226127213 Test: atest ConnectivityManagerTest Change-Id: Ib51fc66c44e1c2baa1f7ba4d1b0c2d1c94c3591d
* Move fromStableParcelable to KeepaliveControllerRemi NGUYEN VAN2021-11-011-2/+81
| | | | | | | | | | | | | | | | | TcpKeepaliveController is the only user of KeepalivePacketDataUtil.fromStableParcelable. Because of fromStableParcelable, networkstack-client needs to depend on net-utils-framework-commonm, which pulls a lot of unnecessary classes. This is particularly problematic considering that networkstack-client may need to be redistributed as a prebuilt. Move the method to TcpKeepaliveController, simplifying dependencies. This also shows that fromStableParcelable could be removed altogether (or moved to tests) if TcpKeepaliveController built a TcpKeepalivePacketData class directly. Test: atest ConnectivityCoverageTests Change-Id: I554318f6bcd07c73d153598a0231e9fcaf912e90
* Remove workarounds to use core platform APIRemi NGUYEN VAN2021-07-021-8/+7
| | | | | | | | | | | | | | | | | | | Core platform API stubs are now correctly included in module_current and system_server_current, so workarounds used to use such APIs can be removed. OsCompat and InetAddressCompat were only necessary because manually adding the stubs did not resolve the problem for classes that had public API stubs, which shadowed the module API stubs. The manual stubs dependency was already removed in another change. Also remove the service jar dependency on android_system_server_stubs_current as it is already included in sdk_version system_server_current. Bug: 183097033 Test: atest CtsNetTestCases Change-Id: Id448be03b679f832edb24f1b77f471227faf5268
* Add OsCompatRemi NGUYEN VAN2021-06-011-7/+8
| | | | | | | | | | | | | | | | Although the InetAddress symbols used by Connectivity are stable core platform API, and should be usable, the core_current stubs are not yet part of the module_current API. Until that is fixed, add an InetAddressCompat utility that calls the three static methods by reflection. Original change (project moved): I8d1a4811a1cc7dbc62f4033c2b320246d1d72b28 Test: atest FrameworksNetTests CtsNetTestCases Bug: 183097033 Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f Change-Id: I70f14edaa2848f78d3b0f1f5b55e0cca4f80ae99
* Move connectivity sources to packages/ConnectivityRemi NGUYEN VAN2021-05-131-0/+339
The service-connectivity sources should be in packages/modules/Connectivity. Move them to frameworks/base/packages/Connectivity, so that the whole directory can be moved to the dedicated packages/modules/Connectivity git project. Bug: 186628461 Test: m Merged-In: I26d1a274058fa38763ad4f605549d880865b4d76 Change-Id: Ie0562db92ebee269b901926d763ae907bde61b98