Commit graph android_packages_modules_Co.../tests/unit/java/android
Message SHA1
Add methods to get metered override and persistence config in string
This patch adds methods to get metered override and persistence config
in human readable string in EthernetConfiguration.
This allows more informative logging.

Bug: 397536853
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline
Change-Id: Ia5a2f4b9f624bfc1c96b197533426925dacfa554

Chuwei He   commited 2025-07-02 19:41:42 -07:00
afc612e02e
Add metered overrride config to EthernetConfiguration
This patch metered override config to EthernetConfiguration.
This config indicates the static configuration of metered override.

Bug: 397536853
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline

Change-Id: I37303bbb5a6803254e149bb374703e6a2e66c062

Chuwei He   commited 2025-07-02 18:12:33 -07:00
1939c90a98
Add persisted logic to EthernetConfiguration
This patch added persisted logic to EthernetConfiguration, which allows
ethernet configuration to be set to be persistent across boot or not.

Bug: 397536853
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline
Change-Id: I6e96dec0f802cf1a58e61bffb6c1dac34a0a91a5

Chuwei He   commited 2025-06-25 23:25:37 -07:00
7e60f9a82f
Merge "Change EthernetPortInfo to EthernetPortState" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-18 21:26:04 -07:00
7882140d7d
Change EthernetPortInfo to EthernetPortState
This patch changes the name of class EthernetPortInfo to
EthernetPortState.

Bug: 397536853
Test: build
Flag: EXEMPT mainline
Change-Id: I7f42170cdde33ca31dea3d622678565ea5dc1026

Chuwei He   commited 2025-06-17 13:48:42 +09:00
d790973d3e
Add golden sample test for storing transport types kill switch support
This test uses a golden sample to verify that the file reading
results are as expected when the storing transport types feature
is either enabled or disabled. This is to ensure compatibility
when the feature is remotely disabled.

The golden sample is taken from a test device after manually
performing a file download.

Flag: EXEMPT test only
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.NetworkStatsCollectionTest \
      --update-device
Test: Manually:
      1. adb shell device_config put tethering store_transport_types 1
      2. Download files
      3. adb shell dumpsys netstats --poll
      4. adb pull /data/misc/apexdata/com.android.tethering/netstats .
      5. Check-in the active netstats_uid* file.

Bug: 419123367
Change-Id: I266d07703f3ad47239d9c6721cdcd417ae4f179f

Junyu Lai   commited 2025-06-12 13:31:38 +08:00
76a774c21a
Add kill switch for storing transport types
In case there is a bug after rolling out transport
types support in the NetworkIdentity. Add a kill switch
to stop writing transport types to mitigate the
impact if any.

Flag: EXEMPT the change is the kill switch
Test: atest ConnectivityCoverageTests --test-filter \
  'NetworkIdentity*' --update-device
Test: atest ConnectivityCoverageTests --test-filter \
  'NetworkStats*' --update-device
Test: atest ConnectivityBenchmarkTests
Test: atest FrameworksNetIntegrationTests:com.android.server.net.integrationtests.NetworkStatsIntegrationTest
Test: Manual:
  1. Download files
  2. adb shell device_config put tethering store_transport_types -1
  3. reboot and check Data Usage Settings page.

Bug: 419123367
Change-Id: I52791f6fe5207021748641cf0719055533b5d511

Junyu Lai   commited 2025-06-10 17:57:11 +08:00
1c5f5b5270
Add NetworkTemplate get/set transport type methods
This is needed for counter-part modules to query data usage
with specified transport type.
This is kept hidden and will be exposed in follow-up
CLs.

Flag: EXEMPT controlled in the counter-part CL
Test: atest ConnectivityCoverageTests --test-filter \
'NetworkTemplate*' --update-device
Bug: 419123367
Bug: 420531377

Change-Id: I503b4d7307d008a64a14aa713d9714428e399809

Junyu Lai   commited 2025-06-09 14:09:46 +08:00
dc7bfba12e
Support matches transport types in NetworkTemplate
Flag: EXEMPT implemented in the counter-part CL
Test: atest CtsNetTestCases --test-filter \
      'NetworkStats*' --update-device
Test: atest ConnectivityCoverageTests --test-filter \
      'NetworkStats*' --update-device
Test: atest ConnectivityCoverageTests --test-filter \
      'NetworkTemplate*' --update-device
Bug: 419123367
Change-Id: I0c8bf2e24502befd810081f519ff915491b0a905

Junyu Lai   commited 2025-05-27 20:35:40 +08:00
3fd36e5f93
Add NetworkCapabilities transport types into NetworkIdentity.
This change updates NetworkIdentity to have NetworkCapabilities
transport types for improved network identification, and updates
NetworkIdentitySet for backward compatibility with older data.

Flag: EXEMPT implemented in the counter-part CL
Test: atest ConnectivityCoverageTests --test-filter \
      'NetworkIdentity*' --update-device
Test: atest ConnectivityCoverageTests --test-filter \
      'NetworkStats*' --update-device
Bug: 419123367
Change-Id: I26cc770d90b4687d832dd029d9a11db03404db39

Junyu Lai   commited 2025-05-24 00:30:41 +08:00
bebd4090ae
Fix kotlin lint errors in NetworkTemplateTests
Flag: EXEMPT Test only refactor
Test: atest ConnectivityCoverageTests --test-filter \
  'NetworkTemplate*' --update-device
Bug: 419123367
Change-Id: I7f87c4a9f4f3e40c0274bf6539ccff4e42967cc8

Junyu Lai   commited 2025-05-23 15:34:53 +08:00
ab696ccc1b
Merge "Add EthernetPortInfo class" into main
Chuwei He   authored and   Android (Google) Code Review   commited 2025-05-16 01:39:54 -07:00
59f8d2b8ed
Merge "Add a performance test for filteredClone." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-15 22:42:27 -07:00
c1844e5f8e
Add EthernetPortInfo class
This patch adds EthernetPortInfo class which represents information of
an EthernetPort object.
This class is mainlt used in network callbacks.

Bug: 397536853
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline

Change-Id: I8ab9fa934a710080163d951bb6619050ca38a2ee

Chuwei He   commited 2025-05-16 13:14:48 +09:00
76330fa8a2
Add a performance test for filteredClone.
atest ConnectivityCoverageTests:android.net.connectivity.android.net.NetworkStatsTest#testFilteredPerformance -- --auto-collect DEVICE_TRACE

Flag: TEST_ONLY
Change-Id: Id47edc05bb39ce334da819129d4ee13b0796cbb5

Richard Uhler   authored and   Lorenzo Colitti   commited 2025-05-15 21:06:04 -07:00
bcd9653ed3
Remove deprecated SC_V2 constant
Test: TH
Flag: EXEMPT test-only
Change-Id: I3444fad305f49294ed8c3a850b631f385678c117

Chalard Jean   commited 2025-05-15 09:03:59 +09:00
9373e3442e
Merge "Add unit test for filteredClone." into main
Richard Uhler   authored and   Android (Google) Code Review   commited 2025-05-13 13:02:06 -07:00
918c8e490f
Add unit test for filteredClone.
BUG: 416650909
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.NetworkStatsTest
Flag: TEST_ONLY
Change-Id: I03d38e6960d82b2b2b98454fba68359800188fff

Richard Uhler   commited 2025-05-09 10:11:11 -07:00
26bbed3c5b
Extend QosFilter address matching function
Extend QosFilter address match function for IP address range based on
prefix length.

Bug: 406146808
Bug: 399960748
Flag: com.android.net.flags.qos_filter_ip_range_matching
Test: atest CtsNetTestCases
Test: atest ConnectivityCoverageTests
Change-Id: I78d995fda111d258da9a912c7afa5e472e43437f

Sewook Seo   commited 2025-05-08 22:37:32 -07:00
6305252415
Add EthernetConfiguration class
This patch adds EthernetConfiguration class which represents a
static configuration and network capabilities of a configured ethernet
network interface.
EthernetConfiguration is used ONLY internally to store and track
ethernet configurations, and serves different functionality as
EthernetNetworkUpdateRequest.

Bug: 397536853
Test: atest ConnectivityCoverageTests
Flag: EXEMPT mainline
Change-Id: Ib175347096db25b9f2180a2e526746f1f3cf6ceb

Chuwei He   commited 2025-04-24 13:26:06 +09:00
e0e89ef66f
packages/modules/Connectivity: remove usages of deprecated Mockito matchers
Test: m checkbuild
Flag: TEST_ONLY
Bug: 310268946
Change-Id: Icef421511b6fed6dc7912a9b703773ba5700c62a

Adrian Roos   commited 2025-03-10 02:16:21 +01:00
6cc971daab
Add CTS test for ConnectivityManager#tether exception after V
Current test was mistakenly added to the unit test version of
ConnectivityManagerTest instead of the CTS test. Move this to the CTS
test instead.

Bug: 392986269
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: Id64d21929fb6b6c42f46a821a3cd28bbcaf77cda

Quang Anh Luong   commited 2025-02-07 12:42:12 +09:00
6c478ee215
Disallow legacy tether() API starting in B
As part of the major tethering refactor to associate every IpServer with
a TetheringRequest, tether()/untether() APIs should be completely
removed in B and all tethering should go through startTethering() (with
the exception of Wifi LOHS and Wifi P2P, which will move to
startTethering() in a future CL).

Bug: 216524590
Test: atest CtsTetheringTests TetheringTests

Change-Id: If7981f1ee7d80ff0a1cc0069ba7a4ebf79144160

Quang Anh Luong   commited 2025-01-15 08:59:42 +09:00
30d8a25db3
Add API for FLAG_SKIP_PROBING
The flag, used in the newly exposed AdvertisingRequest, allows
skipping the probing step when the service name is known to be unique
already.

This allows implementing RFC 6762 section 8.1 that specifies probing
SHOULD be skipped if it is known via other means that the record set
is unique.

Bug: 384841047
Test: atest CtsNetTestCases:NsdManagerTest
Change-Id: I19d67ff2863af631bd9c2f518b004f1688ac5f87

Remi NGUYEN VAN   commited 2024-12-24 16:00:53 +09:00
7a3423b65b
Unit test for TrafficStats Rate Limit Cache
Test: atest FrameworksNetTests:android.net.connectivity.android.net.TrafficStatsTest
Bug: 343260158

Change-Id: Id1ff21636cf29dd1266664fac6331f71bef9667e

Junyu Lai   commited 2024-12-06 08:13:08 +00:00
e73e04ae35
Drop the redundant type and caller uid checks for TrafficStats
This commit removes the redundant type and caller uid
checks in TrafficStats to address the review feedback at
aosp/3313055.

Test: TH
Bug: 343260158
Change-Id: I0ed6e850835136c9a324efd7271dd80a34160aa6

Junyu Lai   commited 2024-11-06 13:17:23 +08:00
739d200d35
Fix system caller cannot query stats for other uids
Follow-up from aosp/3249945. If the system caller queries stats
for other UIDs, the caller would get UNSUPPORTED.
This follows the official documentation, where the API would
not return stats for all other UIDs.

However, partners or other legacy callers might already depend
on this undocumented behavior. Changing this behavior might
damage existing apps.

Thus, this change reverts the behavior change introduced at
aosp/3249945 and allows a system caller to query stats for
other UIDs.

Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.TrafficStatsTest
Bug: 372851500
Change-Id: Ia7ea051f7b0b6349ffcb890c300362bbfbdee3dc

Junyu Lai   commited 2024-10-30 23:02:55 +08:00
e51bae6bdc
Address review comments at aosp/3249945
This change includes:
  1. Rename binder interfaces.
  2. Use a dedicated class to pass the result of
     get{Total|Iface|Uid}Stats, as it is 25% faster than passing
     a NetworkStats object through the binder interface.
  3. Remove the binder interface only used by the test.
  4. Remove NetworkStatsBinderTest on R and S, since the binder
     interface is removed, the mainlined service does not run on
     those versions and the chance of breaking these tests on
     R and S is low.
  5. Remove useless TODO comments.

Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest \
      CtsNetTestCases:android.net.cts.NetworkStatsBinderTest \
      FrameworksNetIntegrationTests:com.android.server.net.integrationtests.NetworkStatsIntegrationTest
Bug: 372851500
Bug: 343260158

Change-Id: Ibd79a17218f54f0117d8ef5d7b9ec6073356f923

Junyu Lai   commited 2024-10-28 10:59:35 +08:00
9fb574d0c3
Merge "No-op refactoring for TrafficStats APIs" into main
Yun-Chen Cheng   authored and   Gerrit Code Review   commited 2024-09-11 01:56:42 +00:00
05fb57ea97
No-op refactoring for TrafficStats APIs
Prepare for implementation of client side
TrafficStats rate limit cache.

1. Write Typeless versions of getIfaceStats,
getUidStats, getTotalStats in INetworkStatsService.aidl
that returns NetworkStats instead of Long.
This is needed because in follow-up changes,
the NetworkStats instead of indiviual numbers will
be stored as a cache entry

2. Move some utils from NetworkStatsService
to TrafficStats. This is needed because in the follow-up
changes, these utils would be both accessed by TrafficStats
and NetworkStatsService.

Test: CtsNetTestCases:android.net.cts.TrafficStatsTest
Test: CtsNetTestCases:android.net.cts.NetworkStatsBinderTest
Test: FrameworksNetIntegrationTests:com.android.server.net.\
		integrationtests.NetworkStatsIntegrationTest
Test: FrameworksNetTests:android.net.connectivity.com.android.\
		server.net.NetworkStatsServiceTest
Test: FrameworksNetTests:android.net.connectivity.\
		android.net.TrafficStatsTest
Test: ConnectivityCoverageTests:android.net.connectivity.\
	android.net.TrafficStatsTest
Bug: 343260158
Change-Id: Iace251e1495fd3b81e072526e92ca97cbc7246eb

Yun-Chen Cheng   commited 2024-09-10 14:36:25 +00:00
69b83606ca
Add unit test to verify retrieving and storing the network events.
Bug: 329010113
Test: atest FrameworksNetTests:android.net.connectivity.android.net.IpMemoryStoreTest
Change-Id: Ie141ae4a8ac583002a0b7b89658331ca4a5a5ded

Xiao Ma   commited 2024-09-03 15:56:59 +00:00
04f4b03fc8
Only send callbacks when overridden
Most users of NetworkCallback do not override all methods, so callbacks
from ConnectivityService end up being unused by the app.

To save resources, check which callback methods are overridden in
ConnectivityManager, and inform ConnectivityService so it can skip
preparing and sending the corresponding binder calls when the callback
is not used by the app.

This is flagged off by default.

Test: flag enabled: atest CtsNetTestCases ConnectivityCoverageTests
Bug: 327038794
Bug: 279392981

Change-Id: Iaf490f416fb6e1437d40497fba1a40a899a9f523

Remi NGUYEN VAN   commited 2024-06-26 12:39:47 +09:00
2fd3823cbc
[mdns] add hidden API for public key
This commit adds support of registering a public key for a host/service.
This is required to enable Advertising Proxy feature for Thread devices.

For example:
```
NsdServiceInfo info = new NsdServiceInfo();

info.setServiceName("My Service");
info.setServiceType("_test._tcp");
info.setHostname("MyHost");
info.setHostAddresses(List.of(address1, address2));
info.setPublicKey(/* KEY RDATA */);

nsdManager.registerService(info, PROTOCOL_DNS_SD, listener);
```

Bug: 317946010

Change-Id: I367ebff8119d5c1dff0410c85e6fb86dca6c66b8

Handa Wang   commited 2024-04-24 07:02:42 +00:00
364aa570e2
Add firewall chains for HAPPY_BOX and user/admin PENALTY_BOX
Follow up CLs will update CS to generate blocked reason from bpf map
instead of asking NPMS.

However, one issue is NPMS set PENALTY_BOX for
BLOCKED_METERED_REASON_USER_RESTRICTED and
BLOCKED_METERED_REASON_ADMIN_DISABLED without telling the reason.
So, CS can not know the reason of PENALTY_BOX.

This CL add new firewall chain and match to distinguish reasons.
NPMS must call setUidFirewallRule with
FIREWALL_CHAIN_METERED_DENY_USER or FIREWALL_CHAIN_METERED_DENY_ADMIN
based on the reason so that CS can know the reason of restriction.

Bug: 332628891
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ia4ad4bdb345abc22c782630e828edfad2452db36

Motomu Utsumi   commited 2024-04-23 15:04:28 +09:00
11d3345daa
Merge "[mDNS] pretty print txt values in log" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-04-02 08:15:34 +00:00
777b9ba0ca
[mDNS] pretty print txt values in log
Without this commit, the Thread service logs look like:

```
03-27 14:50:07.033   739  1924 I NsdPublisher: Registering service. Listener ID: 1, serviceInfo: name: Android Thread Border Router #2CF8, type: _meshcop._udp, subtypes: , hostAddresses: , hostname: null, port: 49152, network: null, expirationTime: null, txtRecord: id=֞�"ҽD���.�j���nn=OpenThreadrv=1sb=������tv=1.3.0
03-27 14:50:07.033   739  1924 I NsdPublisher: vn=Android
                                                         xa=Q�;�P,�
                                                                   xp=ޭ��������

```

With this commit, the Thread service logs look like:

```
03-27 13:37:31.672   741  1925 I NsdPublisher: Registering service. Listener ID: 1, serviceInfo: name: Android Thread Border Router #7CE8, type: _meshcop._udp, subtypes: , hostAddresses: , hostname: null, port: 49152, network: null, expirationTime: null, txtRecord: {id=0x70A5AE087668D7522919F40D1684D182, mn=Thread Border Router, nn=OpenThread, rv=1, sb=0x00000021, tv=1.3.0, vn=Android, xa=0x06EC93E283A47CE8, xp=0xDEAD00BEEF00CAFE}
```

Bug: 329366417
Change-Id: I6b15e93ad117f4ebb5762df85e359a705bd65b7d

Kangping Dong   commited 2024-04-02 14:47:57 +08:00
aca202e4d9
Fix isUidNetworkingBlocked for system uids
Update isUidNetworkingBlocked to return false for system uids regardless
of firewall chain status since this is an actual behavior

Bug: 328732146
Test: TH
Change-Id: Ic4760b927f51a1229e9af09c79b5261f85fe89d1

Motomu Utsumi   commited 2024-03-26 19:16:54 +09:00
cb448f5c78
Call getDataSaverEnabled from isUidNetworkingBlocked
This reduces unnecessary bpf map read

Bug: 328732146
Test: TH
Change-Id: I7652bee99c1d733bae38508d7d6092c90678dc42

Motomu Utsumi   commited 2024-03-19 04:20:54 +00:00
e1d536ba8a
Rename BpfNetMapsReader to NetworkStackBpfNetMaps
BpfNetMapsReader is loaded to bootclasspath. So this class should not
contain unnecessary codes.
To make this clear, this CL renames to NetowrkStackBpfNetMaps and add
comments

Bug: 328732146
Test: TH
Change-Id: I557627c9fae087eb6119c2ae31d46526fa9e5d7e

Motomu Utsumi   commited 2024-03-19 04:12:29 +00:00
fc504042f6
Merge "follow up comments in custom TTL CLS (aosp/2870274 and aosp/2606573)" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-11 11:18:27 +00:00
96f6a077e6
Merge "Move platform VPN related test to FrameworksVpnTests" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-03-06 00:41:19 +00:00
e190bf783d
follow up comments in custom TTL CLS (aosp/2870274 and aosp/2606573)
Summary of major changes in this CL:
1. update javadoc in AdvertisingRequest to start with one line
2. update ttl API document to ve clearer that values smaller than 1
   second is discarded
3. Remove redundant constructors of MdnsServiceInfo
4. add tests for MdnsRecordRepository to verify that addService works
   with non-null TTL

Other comments needs more consideration and relatively larger change, so
tracked in separated child issue of b/327619631

Bug: 327619631
Change-Id: I040b8451337d88d96da7120455c228cef204f768

Kangping Dong   commited 2024-03-05 20:04:48 +08:00
c6622e02b7
Move platform VPN related test to FrameworksVpnTests
These VPN related tests are considered as non-connectivity-module
tests as the corresponding sources are inside the platform
code instead of module. From architecture point of view, these
test would be better to place together with their sources in the
same git so that the tests do not need to restrictions(e.g. SDK
check) to fit into the module tests.

Test: atest FrameworksNetTests FrameworksVpnTests
Change-Id: I10e00c2b52262f23aa8ca38e545196bf93612e51

Chiachang Wang   commited 2024-03-01 07:03:14 +00:00
4529ba8255
[mdns] add service-side impl for NSD service TTL support
This is the service-side implementation of the custom service TTL
support added in aosp/2606573.

Bug: 284903641
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I35246dae37b9fd1710b99cdda10068928e418457

Kangping Dong   commited 2024-02-28 21:42:37 +08:00
cd35018bc6
[mdns] add API for setting/getting TTL value
To support Thread Border Router use case, an Android device needs to act
as a mDNS service discovery (RFC 8766) & advertising proxy (
https://datatracker.ietf.org/doc/draft-ietf-dnssd-advertising-proxy).
This means it needs to advertise and discover DNS-SD services of custom
TTL value on behalf of other devices.

This commit fulfills this requirement by adding TTL getter/setter to
NsdServiceInfo. When registering a service, the specified TTL will be
used for corresponding resource records.

Bug: 284903641
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I23837834847dc3a0fb452c5929a1b36e3fc1fb3f

Kangping Dong   commited 2024-02-28 15:53:51 +08:00
2ffe82dab5
add TRANSPORT_SATELLITE to NetworkCapabilities
This commit also updates to use V14 dnsresolver APIs which was V13.

Bug: 320514105
Test: m & atest FrameworksNetTests
Change-Id: I6e92f4d99e0eba3b5d1d5e45bf11e5e945ea43f1

Nagendra Prasad Nagarle Basavaraju   commited 2024-02-07 16:07:39 +00:00
1fa6f09019
Merge "NetworkUtilsTest.testSetSockOptBytes" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-01-30 01:43:05 +00:00
24563fa502
[mdns] add API support for custom hostname
This commit adds support of regsitering a service with a custom
hostname. This is required to enable Advertising Proxy feature for Thread
devices.

For example:
```
NsdServiceInfo info = new NsdServiceInfo();

info.setServiceName("My Service");
info.setServiceType("_test._tcp");
info.setHostname("MyHost");
info.setHostAddresses(List.of(address1, address2));

nsdManager.registerService(info, PROTOCOL_DNS_SD, listener);
```

This CL also adds two new error codes for service/host registration
conflict: `FAILURE_SERVICE_NAME_CONFLICT` and
`FAILURE_HOST_NAME_CONFLICT`.

Bug: 284904661
Test: atest CtsNetTestCases FrameworksNetTests

Change-Id: I2fb974c38d851ba99144a18c7047084bbd61b938

Handa Wang   commited 2024-01-29 06:46:43 +00:00
1c2be6b391
NetworkUtilsTest.testSetSockOptBytes
Use sec but not usec in the test. setsockopt TimeVal may lose precision
on usec when kernel rounds up the requested value based on the HZ setting:
val = tv.tv_sec * HZ + DIV_ROUND_UP((unsigned long)tv.tv_usec, USEC_PER_SEC / HZ);

Bug: 321577714

Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkUtilsTest
Change-Id: I13a12319370ec2bebe0935f2acdef88bca4d963d

Yang Sun   commited 2024-01-29 13:30:53 +08:00
0cd8f7f44d
[mdns] add API for discovery with subtype
This commit adds support of discovering services with explicit subtype.

With this change, a service can be discovered with subtype with:
```
nsdManager.discoverServices(
        new DiscoveryRequest.Builder("_http._tcp", PROTOCOL_DNS_SD)
	        .setSubtype("_printer").build(),
	executor, listener);
```

Bug: 265095929
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: Iba76283a003cf2d52a8c26e1de872c3e8e433350

Kangping Dong   commited 2024-01-25 20:15:21 +08:00
97d6aeb3a2