summaryrefslogtreecommitdiff
path: root/framework/src/android/net/Network.java
Commit message (Collapse)AuthorAgeFilesLines
* Ensure created fd being closedChiachang Wang2021-12-011-14/+15
| | | | | | | | | | | If exception s thrown while calling bindSocket(fd), the temporary created ParcelFileDescriptor may not be closed as expected. Ensure it's closed eventually. Bug: 206042872 Test: atest FrameworksNetTests Change-Id: Icde895978ab9281006ffd56335d1247462d9da28
* Remove workarounds to use core platform APIRemi NGUYEN VAN2021-07-021-2/+2
| | | | | | | | | | | | | | | | | | | 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
* Remove dependency on libnetd_clientRemi NGUYEN VAN2021-06-011-5/+7
| | | | | | | | | | | | | | | | NetworkUtils can just use the NDK to achieve the same. Also make sure network handles can have the local nameservers flag, for the JNI API, and create/parse them accordingly in Network. Original change (project moved): I2e7b78263f7ca0cab9458854858a7423f6bd2854 Bug: 171540887 Test: atest CtsNetTestCases (in particular MultinetworkApiTest, DnsResolverTest, NetworkTest) Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f Change-Id: I7a523aac93094beef6ff40d50678c12fe8840940
* Remove Network, NetworkRequest metrics from jobschedulerAaron Huang2021-04-071-8/+0
| | | | | | | | | | | | | | | | | | | | These metrics are deprecated so remove them from jobscheduler. Also remove dumpDebug method from Network, NetworkRequest and NetworkCapabilities because there's no caller anymore. This change also for connectivity mainline module. These three classes are inculded in framework-connectivity so external module cannot have dependencies on its hidden API. With this change, the dependencies can be removed. (cherry-picked from ag/13959431) Bug: 178777253 Test: FrameworksNetTests JobStoreTest adb shell dumpsys jobscheduler --proto CtsIncidentHostTestCases:JobSchedulerIncidentTest Merged-In: Ie0c540303ba06b8fba029d2b98ae753afb08c963 Change-Id: Ie0c540303ba06b8fba029d2b98ae753afb08c963
* Add InetAddressCompatRemi NGUYEN VAN2021-03-181-2/+2
| | | | | | | | | | | | 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. Test: atest FrameworksNetTests CtsNetTestCases Bug: 183097033 Change-Id: I797009aeff1d39ae2dc06ef69d2e235689b43c89
* Replace interal okhttp APIspaulhu2021-03-151-3/+3
| | | | | | | | | | | Connectivity is becoming a mainline module in S but mainline modules are not allowed to use non-formal APIs. Thus, replace internal okhttp APIs to stable libcore APIs which are created for using HttpURLConnectionFactory. Bug: 182238821 Test: atest FrameworksNetTests Change-Id: I56ba1b9e6e94f9c6519c3f1c8f0c5993fccbe185
* Add @Nullable to Object#equals()Roman Kalukiewicz2021-02-051-1/+2
| | | | | | | | | | | | This is a partial cherry-pick of change: I5eedb571c9d78862115dfdc5dae1cf2a35343580 for connectivity classes. Bug: 170883422 Test: m Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580 Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c
* Move module sources to packages/ConnectivityRemi NGUYEN VAN2021-02-011-0/+535
Files that are planned to be part of the connectivity module are grouped in packages/Connectivity, so they can be built separately and moved in one operation with their history into packages/modules/Connectivity. This places the files in the existing framework-connectivity-sources filegroup instead of the current framework-core-sources filegroup. Both are used the same way in framework-non-updatable-sources. Bug: 171540887 Test: m Change-Id: I62d9d91574ace6f5c4624035d190260c3126b91e