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
Change-Id: I2b4b6a13c048c20beef52b1f43b9e21aca0c637a
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
Change-Id: I252eaadff85fa47b894e989b4f2527b00c5dca56
De-duplicate the code by using
DeviceConfigUtils.getConnectivityResourcesPackageName.
Bug: 279108992
Test: atest
Change-Id: I54733016a9b902d5c209010161363c41bc8f1cce
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
Change-Id: I3c9a77c580b5ab87c922c32778bce15dc33b4d1d
ICMP test does not support larger size probing currently. This
is a preliminary commit to support length parameter to config ICMP
packets size for the subsequent commit.
Bug: 277376698
Test: adb shell dumpsys connectivity --diag
Change-Id: Idf90ad716327f889630b943f8fb3452fc5bf5cfc
Cellular networks are now supported for marking wakeup packets. As a
result onWakeupEvent now also reports data relevant to the cell
transport.
These unit tests should add coverage for these new behaviors.
Test: atest FrameworksNetTests
Bug: 276498460
Change-Id: I0b8a03fff6255e067b736f3dbfb53de56420f90b
DHCP packet listener closes the listening socket and stops reading
packet upon receiving a zero-length DHCP packet, which will break
the following DHCP handshake. Add an integration test to verify the
current behavior. A follow-up fix will verify if DHCP server will
accept the zero-length DHCP packet and continue reading packet on
that socket.
Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I5990e37cdfad4e8e4337b0bb1a74632286884baf
Refactor the InetSocketAddress in MulticastPacketReader to use port zero
because this value is only a placeholder that will be overwritten
when recvfrom() is called.
Test: atest CtsNetTestCases FrameworksNetTests
Bug: 279691736
Change-Id: Idb9d8a96e1f10eb2ede972125430c84af6b539d9
Add getTransportTypesInternal as a hidden api for internal callers. This
will be used for any metrics that need to store the transport types of a
network.
Bug: 273451360
Test: atest FrameworksNetTests
Change-Id: I527638e5408e7971a450135345e7e51b6125d665
Currently, the mDns discovery services will clear if no listener
registers to that MdnsServiceTypeClient. If an app does discover,
stop discover, resolve, at this point the listener was
unregistered, so the MdnsServiceTypeClient was deleted, and the
service is gone from cache. So this will actually restart
discovery without returning previous results from cache. Thus,
add MdnsServiceCache to store all services and reduce the
duplicated queries.
Bug: 265787401
Test: atest FrameworksNetTests
Change-Id: If3d4eb4e3dc5455f6f97cb782aa1b99b2a00f6e0
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
Change-Id: Ic48ba63deab02683280543516228104be928a6a2
Starting with Android U, the config_networkWakeupPacketMark and
config_networkWakeupPacketMask values will be used to mark packets that
woke up the AP on the cellular transport also.
Test: Manual, by inspecting the output of `iptables -L -t -n -v mangle`
Bug: 276498460
Change-Id: I4c7d2801532604d436bfda96c4c52a791995a9ed
Android T beta3/4 haven't been tested in ages,
and were really only tested for the transition to final T
nearly a year ago.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I520e60026179c078859572231b86184796182142
(Clat was mainlined in Android T)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic30b89c809adc95606795bdd9309169559070c89
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
Change-Id: I7f808249722924a0b1253e402c5580bb104afd8e
Phenotype is updating the flags while this test is running
and this DoS'es the device to such an extent that the test
process doesn't get the CPU for more that 300ms. That lets
the lingering timeout run its course and fails the test.
This won't necessarily fix all flakes (after all, if
Phenotype hogs the CPU for 2 seconds the same issue will
continue to happen), but it should help.
Bug: 277555492
Test: FrameworksNetTests
Change-Id: I78ab1573974427b10dd557c011fbbf64942fd09f
Test may be flaky because the target network did not apply the
private DNS setting change because test assumes setting applied
successfuly by receiveing any success from link properties
change. The test failed because the target network did not apply
the change. Test should wait for setting to be applied to all
networks since the private DNS setting change will be applied
one by one for each Network
Fix: 279051721
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: I649c2d573a245f15b7749c3b0ac824d2f846873c
This is a no-op change to move the getTestableNetworks() to
CtsNetUtils for the follow up change which will also need the
same method to reduce code duplication.
This change also updates the nullability of the private dns
server so that it can also verify non-strict mode.
Test: atest CtsNetTestCases
Change-Id: I67c94cd5aefeb9cf1ecd4126178c2410f3f08b1b
Wifi remembers the wifi enabled state under airplane mode in the
Settings.Secure.WIFI_APM_STATE setting for the airplane mode
enhancement. Wifi will not be disconnected if user enables
the wifi under airplane mode. This behavior breaks the
assumption in testSetAirplaneMode. The test expects to always
receive the WiFi network disconnect after turning airplane
mode on.
The wifi enhancement was done with hidden method which should not
be referred in the cts. The intention of testSetAirplaneMode was
to verify the permission required for setting ariplane mode.
This change should be no harm for original intention.
Bug: 278150162
Test: atest CtsNetTestCases
Change-Id: I3458679378f0c12c26051f3dac7fcf155c1f469c