- May 15, 2023
-
-
Paul Hu authored
The ServiceTypeClient should be removed after socket destroyed because it's no longer used by any request. The requests will be matched to the newly created ServiceTypeClient. Bug: 278635632 Test: atest FrameworksNetTests CtsNetTestCases (cherry picked from https://android-review.googlesource.com/q/commit:f2a51ac5f8cc6b1cfaaa0f8fd5c28af522806ca0) Merged-In: Ia917b14d3666f3bfe8e874606a34800a4ce65c5a Change-Id: Ia917b14d3666f3bfe8e874606a34800a4ce65c5a
-
- May 12, 2023
-
-
Bill Yi authored
am skip reason: subject contains skip directive Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/23128424 Change-Id: I661135c29170286603ef52f10ab8a5d244e3d82c Signed-off-by:
Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-
Maciej Żenczykowski authored
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Remi NGUYEN VAN authored
Historical behavior of onServiceFound is to include a dot at the end of the service type. To avoid inconsistencies between behavior of new and older backend, which would be hard to predict/handle for apps, ensure that the same format is used. This means a dot must be added when using the new backend. Implement this by creating the callback service types based on MdnsServiceInfo obtained from MdnsDiscoveryManager, rather than the service type that was provided by the calling app. This avoids inconsistencies as the calling app may or may not include dots originally, and it may use subtypes ("_sub._type._tcp.local" or even "_type._tcp.local,_sub"), which would result in callbacks giving invalid service types, or inconsistent with S/T behavior. Fixes: 281776253 Test: atest (cherry picked from https://android-review.googlesource.com/q/commit:2f82fcdd6ca82928ae24533cd8616561a4737df1) Merged-In: I677ee885d1ee8e6a09773f21e4dd53e96faee748 Change-Id: I677ee885d1ee8e6a09773f21e4dd53e96faee748
-
- May 11, 2023
-
-
Treehugger Robot authored
* changes: [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: 2ccf315f Import translations. DO NOT MERGE ANYWHERE
-
Xinyi Zhou authored
-
chiachangwang authored
Creating an AutomaticOnOffKeepalive object is an internal design in the AutomaticOnOffKeepaliveTracker which should not require callers' permission. Reading DeviceConfig will check if the calling uid and calling package name are the same. Clear calling identity to align the calling uid and package. All these accesses require performing this action so move it into the Dependencies. Bug: 279381469 Test: atest FrameworksNetTests CtsHostsideNetworkTests (cherry picked from https://android-review.googlesource.com/q/commit:afda1a5579eabb8d8a02aead932e4d436cc934df) Merged-In: Icb4721ce8ca9c8fc7e9118b4e46300147be4e08e Change-Id: Icb4721ce8ca9c8fc7e9118b4e46300147be4e08e
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Paul Hu authored
Use a single SharedLog in NsdService, and making subcomponents for DiscoveryManager/Advertiser/SocketProvider. Because each logger has 500 maxRecords, so 2000 records in total, which take too much memory. Also address leftover comments in previous logging changes. Before: 2023-04-17T15:05:27.409895 - [Client10082-1] Register a DiscoveryListener 3 for service type:_nmt274981618._tcp.local 2023-04-17T15:05:26.408015 - [Client10082-1] New client. useJavaBackend=true Advertiser: 2023-04-17T15:05:27.213023 - [testtap0] Probing finished for service 2 2023-04-17T15:05:26.409607 - Adding service name: ^Nsd.Test|Non-#AsCiI\Characters&\ufffe テスト 測試, type: _nmt274981618._tcp, hostAddresses: , port: 12345, network: null, txtRecord: with ID 2 DiscoveryManager: 2023-04-17T15:05:28.227786 - [_nmt274981618._tcp.local-102] onServiceNameDiscovered: ^Nsd.Test|Non-#AsCiI\Characters&\ufffe テスト 測試 2023-04-17T15:05:27.409104 - createServiceTypeClient for serviceType:_nmt274981618._tcp.local network:102 2023-04-17T15:05:27.398075 - Registering listener for serviceType: _nmt274981618._tcp.local SocketProvider: 2023-04-17T15:05:28.292106 - Remove socket on net:102 2023-04-17T15:05:26.441517 - Create socket on net:NetworkAsKey{ network=102 }, ifName:testtap0 2023-04-17T15:05:26.409005 - Start monitoring sockets. After: Logs: 2023-04-17T20:51:42.931769 - [MdnsDiscoveryManager._nmt682015268._tcp.local-101] onServiceNameDiscovered: Name: ^Nsd.Test|Non-#AsCiI\Characters&\ufffe テスト 測試, type: _nmt682015268._tcp.local, subtypes: , ip: [100.70.162.138], ipv6: [fe80::9c0e:d0ff:fe7d:e5aa, 2a00:79e1:abc:6f04:9c0e:d0ff:fe7d:e5aa, 2a00:79e1:abc:6f04:eb56:8e39:5e1f:1102], port: 12345, interfaceIndex: 47, network: 101, textStrings: [], textEntries: [] 2023-04-17T20:51:42.032465 - [NsdService.Client10082-1] Register a DiscoveryListener 3 for service type:_nmt682015268._tcp.local 2023-04-17T20:51:42.026645 - [MdnsDiscoveryManager] createServiceTypeClient for type:_nmt682015268._tcp.local, net:101 2023-04-17T20:51:41.091555 - [MdnsAdvertiser] Adding service name: ^Nsd.Test|Non-#AsCiI\Characters&\ufffe テスト 測試, type: _nmt682015268._tcp, hostAddresses: , port: 12345, network: null, txtRecord: with ID 2 2023-04-17T20:51:41.091037 - [MdnsSocketProvider] Start monitoring sockets. 2023-04-17T20:51:41.089951 - [NsdService.Client10082-1] New client. useJavaBackend=true Bug: 275004614 Test: atest FrameworksNetTests android.net.cts.NsdManagerTest (cherry picked from https://android-review.googlesource.com/q/commit:14667deefa98aa91743c25eb2ba8447a866e7602) Merged-In: I1c9b7697cc95748f7fe4e6beecea217d39c56fb1 Change-Id: I1c9b7697cc95748f7fe4e6beecea217d39c56fb1
-
Paul Hu authored
-
TreeHugger Robot authored
-
TreeHugger Robot authored
-
Lorenzo Colitti authored
Currently, the MTU tests work on networks that have not yet been connected. This is not very realistic because most MTU changes (like most LinkProperties changes in general) happen after the network has connected. Change these tests to use connected networks instead. To avoid losing coverage for setting the MTU before the network is connected, add a test just for that. Bug: 143158421 Test: test-only change (cherry picked from https://android-review.googlesource.com/q/commit:b95ca556dbb96e5e839ee1cc3be1dea37b23ac7d) Merged-In: I7f808249722924a0b1253e402c5580bb104afd8e Change-Id: I7f808249722924a0b1253e402c5580bb104afd8e
-
Mark Fasheh authored
To do this we register a UidFrozenStateChangedCallback with ActivityManager. The callback then queues up work on the Handler thread to consume the original callback args and kill appropriate sockets. Test: atest ConnectivityServiceTests Bug: 277100090 (cherry picked from https://android-review.googlesource.com/q/commit:7c999d8d4cc4cd092d2de52ae98037ca4861e71f) Merged-In: I93f174811aef726145a18ea90443ddfc1456478e Change-Id: I93f174811aef726145a18ea90443ddfc1456478e
-
Xinyi Zhou authored
This should not be included in the production code. Test: -m Bug: 272150669 Ignore-AOSP-First: nearby_not_in_aosp_yet Change-Id: I489ea71b777ec9224c5723a7c097bc7811846e2f
-
- May 10, 2023
-
-
Bill Yi authored
Blank merge reason: commit message contains skip directive Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/23128209 Change-Id: I7d4c1ffb66e6574a7c7ee080b7eb6090f7a0dc1e
-
Motomu Utsumi authored
-
Motomu Utsumi authored
* changes: Fix isFeatureEnabled namespace and overload usage Add a dependency object in TetheringConfiguration Use DeviceConfigUtils for ConnectivityResources Move ConnectivityResources to service-connectivity
-
Treehugger Robot authored
-
Bill Yi authored
Auto-generated-cl: translation import Change-Id: I6c8e239ccda49bb5888685552857007ba7ff9576
-
Bill Yi authored
Auto-generated-cl: translation import Change-Id: I92779288eb0b85971c64127abe0917e84b67feea
-
Bill Yi authored
Auto-generated-cl: translation import Change-Id: Ic83b9ece97693d43abd2d6930b52007631beb9b0
-
Remi NGUYEN VAN authored
The tests do not need to run on devices where the module is not updated or updatable. Tests that are not in presubmit were missed when annotating keepalive tests in a previous change. Test: atest Fixes: 280131407 (cherry picked from https://android-review.googlesource.com/q/commit:058431df27604e064b58bccf74362367733fdcdc) Merged-In: I11ef44987b5a9cbcdf5b892807f65c4f9d04812f Change-Id: I11ef44987b5a9cbcdf5b892807f65c4f9d04812f
-
Motomu Utsumi authored
Netd is not updatable since it's not mainlined. To make socket destroy code updatable, the code was re-implemented in java and moved to Connectivity. Bug: 270298713 Test: atest FrameworksNetTests (cherry picked from https://android-review.googlesource.com/q/commit:93a2218e41384d106f1c14c239e1bf4795af43d5) Merged-In: I5439c0c76c42a9f738a1b25a1f62e701755cbd05 Change-Id: I5439c0c76c42a9f738a1b25a1f62e701755cbd05
-
Motomu Utsumi authored
From service-connectivity, NAMESPACE_TETHERING must be used, as NAMESPACE_CONNECTIVITY is used for the NetworkStack module. Also the isFeatureEnabled with module name must be used, otherwise the "android" package version is queried instead of the tethering module version. BpfNetMaps is using flag value 1 to workaround this issue. flags in NsdService, AutomaticOnOffKeepaliveTracker, and ConnectivityFlags were not pushed currently. So, this change has no effect to devices. Bug: 279108992 Test: TH (cherry picked from https://android-review.googlesource.com/q/commit:278db58bf536551158e8082d3e7572650a908b05) Merged-In: I2b4b6a13c048c20beef52b1f43b9e21aca0c637a Change-Id: I2b4b6a13c048c20beef52b1f43b9e21aca0c637a
-
Remi NGUYEN VAN authored
Address a TODO in TetheringConfiguration to use a dependency object instead of static mocking on DeviceConfig. This avoids TetheringConfiguration dependencies on internal implementation of DeviceConfigUtils, unblocking changes in DeviceConfigUtils. Bug: 279108992 Test: atest TetheringTests (cherry picked from https://android-review.googlesource.com/q/commit:6d38c018523688004b3d43e6794bec5eba8aee03) Merged-In: I252eaadff85fa47b894e989b4f2527b00c5dca56 Change-Id: I252eaadff85fa47b894e989b4f2527b00c5dca56
-
Remi NGUYEN VAN authored
De-duplicate the code by using DeviceConfigUtils.getConnectivityResourcesPackageName. Bug: 279108992 Test: atest (cherry picked from https://android-review.googlesource.com/q/commit:219cc13b272e964931cca366b849bc7e85f9bb1f) Merged-In: I54733016a9b902d5c209010161363c41bc8f1cce Change-Id: I54733016a9b902d5c209010161363c41bc8f1cce
-
Remi NGUYEN VAN authored
The ConnectivityResources class is only usable with QUERY_ALL_PACKAGES permission, so it is not generally usable in framework-connectivity. It is also backed by the ServiceConnectivityResources APK, which is intended as resources for service-connectivity. Move the class to service-connectivity and update callers. CTS needs a way to determine the supported keepalive count as it used the resources from KeepaliveUtils as @hide API, so provide a ConnectivityManager @hide API for testing. Bug: 279108992 Test: atest (cherry picked from https://android-review.googlesource.com/q/commit:bee2ee14f34ff028236b393523d1174a375d2a08) Merged-In: I3c9a77c580b5ab87c922c32778bce15dc33b4d1d Change-Id: I3c9a77c580b5ab87c922c32778bce15dc33b4d1d
-
Paul Hu authored
If the network is null in MdnsServiceTypeClient, it should use MdnsSocketClient for single socket only. So it's expected to process any response from only the socket (network). Move the stopDiscovery outside the listener check loop. Because the stop should only be called once. Add a test to verify the response processing with a non-null network MdnsServiceTypeClient Bug: 265787401 Test: atest FrameworksNetTests (cherry picked from https://android-review.googlesource.com/q/commit:bdf82a2aa0d7447de75fdcca60734936b926e25e) Merged-In: I76965302037f050e0ac3b2cfdbaa5a855e2283c7 Change-Id: I76965302037f050e0ac3b2cfdbaa5a855e2283c7
-
- May 09, 2023
-
-
Maciej Żenczykowski authored
This is not a substantially new test, as VTS has already required either reno or cubic, and reno is ancient and obsolete (and was only ever included because it's builtin to the kernel), so in practice everything should have already always been using cubic. Bug: 281477097 Test: TreeHugger, atest ProcNetTest Signed-off-by:
Maciej Żenczykowski <maze@google.com> (cherry picked from https://android-review.googlesource.com/q/commit:6de6b3f10667022a82fa8a12859a16fe89c11dcc) Merged-In: I04622ae37265361f648bbcf46c0a10e22be3b24f Change-Id: I04622ae37265361f648bbcf46c0a10e22be3b24f
-
- May 08, 2023
-
-
Maciej Żenczykowski authored
It is just a constant source of bugs, with no real tests, let's stop pretending this is a supported configuration. The only tested configuration is out-of-process tethering updatable apex. Test: TreeHugger Bug: 279942846 (cherry picked from https://android-review.googlesource.com/q/commit:7a03c187f596049db96acdae3f00dc6ff5e9e672) Merged-In: I4b659a3cd32b89a65549b56006b926a5ac755f7b Change-Id: I4b659a3cd32b89a65549b56006b926a5ac755f7b
-
Mark authored
To prevent WiFi-to-WiFi interruption while entering APM: - If WiFi is retained while entering APM, hotspot will also remain enabled. - If WiFi is off before APM or disabled while entering APM, hotspot will be disabled. To make sure hotspot always be disabled while entering APM, disable wifi before enable hotspot. Bug: 278150162 Test: 1. turn on wifi while airplan mode on, then turn off airplan mode 2. atest ConnectivityManagerTest#testFactoryReset (cherry picked from https://android-review.googlesource.com/q/commit:8f49a826ad4a0ff1ae57c394eeb89e086d09b4aa) Merged-In: Ic48ba63deab02683280543516228104be928a6a2 Change-Id: Ic48ba63deab02683280543516228104be928a6a2
-
Yuyang Huang authored
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/23023746 Bug: 265865456 Change-Id: I2bb115cb4712e6aaf0a082785ec272061dc68cf0 Merged-In: I077d8abdb91071db62b9618d9918e3a12682aaf4
-
Yuyang Huang authored
As per RFC 1034/1035, the max size of the label is 63 bytes. It should also be guaranteed when the serviceName is renamed due to the conflict. Bug: 265865456 Test: atest FrameworksNetTests (cherry picked from https://android-review.googlesource.com/q/commit:de802c8dc4f59735730fc24b0ca05a73f92e4bb5) Merged-In: I077d8abdb91071db62b9618d9918e3a12682aaf4 Change-Id: I077d8abdb91071db62b9618d9918e3a12682aaf4
-
Sudheer Shanka authored
-
Sudheer Shanka authored
Bug: 279829773 Test: TH Ignore-AOSP-First: temporary change Change-Id: I1f6795042f8a822359e089d7b9da4de0f8934a09
-
Paul Hu authored
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/23074355 Bug: 265787401 Change-Id: I5d7ca5b7278850fbb0538f54faf6cbe7acd53c9e Merged-In: I92ba54809c2b291fd1f176fbda80a347f5944288
-