android_packages_modules_Co.../tests/unit/java/com/android/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Remi NGUYEN VAN 1a8ee102d3 Fix service resolve on tethering downstreams
Tethering downstreams do not have NetworkAgents, and although they have
a netid of 99, Networks with netId 99 are not usable by apps for most
connectivity APIs.

Recent refactoring in NsdService adds the Network of a found service
into its NsdServiceInfo, and uses that network to resolve the service.
In that case the Network has netId 99 and resolving the service fails.

Avoid that problem by:
 - Keeping the Network field null when a service is found on a tethering
   downstream; this avoids giving apps a confusing and unusable Network
   with netId 99
 - Using the interface index found during discovery to resolve the
   service, if the app uses the NsdServiceInfo that was obtained from
   discovery to resolve. If not, all interfaces will be used to resolve,
   as per legacy APIs.

Bug: 233979892
Test: atest NsdServiceTest
      Also manual test with 2 devices connected via hotspot
Change-Id: Idd176153b67ccbd1d4f1b1fd66dafaa2f3a9e27a
2022-05-31 13:06:22 +09:00
..
connectivity Block incoming packets in VPN Lockdown mode. 2022-05-16 10:40:59 +00:00
ethernet Merge changes I8e806b3b,I5e8e4673,Id2a078da 2022-05-24 03:34:25 +00:00
net Limit data usage request per uid 2022-05-12 08:53:21 +08:00
BpfNetMapsTest.java Merge "Remove ConnectivityManager swapActiveStatsMap API" 2022-03-08 06:31:23 +00:00
ConnectivityServiceTest.java Changing automotive ethernet allowed UIDs check 2022-05-18 22:18:14 -07:00
IpSecServiceParameterizedTest.java Throw IAE when Network's LinkProperties is null 2022-05-20 17:03:07 -07:00
IpSecServiceRefcountedResourceTest.java Change to use Dependencies in IpSecService Tests 2021-11-27 00:27:33 +08:00
IpSecServiceTest.java Add makeDependencies method in IpSecService related tests 2021-12-10 12:11:20 +00:00
LegacyTypeTrackerTest.kt Build ethernet framework source into framework-connectivity-tiramisu 2022-03-14 14:06:35 +00:00
NetIdManagerTest.kt Re-skip connectivity unit tests before S 2021-07-05 05:01:54 +00:00
NetworkManagementServiceTest.java Split updateMeteredNetwork{Allow, Deny}List into add and remove 2022-03-09 11:17:27 +08:00
NsdServiceTest.java Fix service resolve on tethering downstreams 2022-05-31 13:06:22 +09:00