Android 16 introduces restrictions on the DeviceConfig flags that
can be modified by the shell user by removing the WRITE_DEVICE_CONFIG
permission from this user and replacing it with the
WRITE_ALLOWLISTED_DEVICE_CONFIG permission; with this permission,
only those flags that have been allowlisted can be modified. This
commit adds the ALLOWLISTED permission to any test that explicitly
adopts the shell permission identity with the WRITE_DEVICE_CONFIG
permission; the WRITE_DEVICE_CONFIG permission is not removed to
ensure tests do not break when run on previous platform releases
without the ALLOWLISTED permission.
Bug: 364083026
Flag: TEST_ONLY
Test: Manually ran all modified tests
Change-Id: I01124581b122b34d45b22a8bd5cb89867ad086a6
Michael Groovercommited 2024-11-25 15:44:42 -06:00
secondary_user_on_secondary_display is for background users that have
access to UI on assigned displays (a.k.a. visible background users) on devices that have config_multiuserVisibleBackgroundUsers enabled. The main use case is Automotive's multi-display configuration where passengers (modeled as visible background users) can interact with the display in front of them concurrently with the driver (modeled as the the current user) interacting with the driver's display.
The fix is to pass in the user id to appops commands so that appops permissions can be properly granted or denied to a visible background user (non current user).
Bug: 374210153
Flag: EXEMPT test fix
Test: Tested on Automotive reference hardware with Multi Display
Test: atest android.net.cts.IpSecManagerTunnelTest
Test: atest --user-type secondary_user_on_secondary_display android.net.cts.IpSecManagerTunnelTest
Test: atest android.net.cts.Ikev2VpnTest
Test: atest --user-type secondary_user_on_secondary_display android.net.cts.Ikev2VpnTest
Test: atest android.net.cts.NetworkStatsManagerTest
Test: atest --user-type secondary_user_on_secondary_display android.net.cts.NetworkStatsManagerTest
(cherry picked from https://android-review.googlesource.com/q/commit:116a3a7bd0d1e80adf3258850180f60dc90a3a94)
Merged-In: I02ae287a926e0bce69ed11fa7e0ef78b288b6b76
Change-Id: I02ae287a926e0bce69ed11fa7e0ef78b288b6b76
secondary_user_on_secondary_display is for background users that have
access to UI on assigned displays (a.k.a. visible background users) on devices that have config_multiuserVisibleBackgroundUsers enabled. The main use case is Automotive's multi-display configuration where passengers (modeled as visible background users) can interact with the display in front of them concurrently with the driver (modeled as the the current user) interacting with the driver's display.
The fix is to pass in the user id to appops commands so that appops permissions can be properly granted or denied to a visible background user (non current user).
Bug: 374210153
Flag: EXEMPT test fix
Test: Tested on Automotive reference hardware with Multi Display
Test: atest android.net.cts.IpSecManagerTunnelTest
Test: atest --user-type secondary_user_on_secondary_display android.net.cts.IpSecManagerTunnelTest
Test: atest android.net.cts.Ikev2VpnTest
Test: atest --user-type secondary_user_on_secondary_display android.net.cts.Ikev2VpnTest
Test: atest android.net.cts.NetworkStatsManagerTest
Test: atest --user-type secondary_user_on_secondary_display android.net.cts.NetworkStatsManagerTest
Change-Id: I02ae287a926e0bce69ed11fa7e0ef78b288b6b76
SoftApConfiguration.Builder.setWifiSsid(WifiSsid) is only available in
T. Make sure to add an SDK level check to use setSsid if the SDK is
pre-T.
Bug: 380352930
Test: atest TetheringManagerTest
Change-Id: I07a6d9d89ff8c26b2fcd6589b88d8385b223e9bf
Quang Anh Luongcommited 2024-11-25 14:38:13 +09:00
Instead of running printflags directly, which on devices that do not
have the binary hangs indefinitely, run "sh -c printflags".
printflags is in the default base_system.mk but some OEMs may strip it
out. sh is much less likely to be removed.
Bug: 379183423
Test: atest
Change-Id: I66af42b2cfbf5cb427c740ef710d8eb3d1d7f1ef
Enhanced testOpenConnection() to include a fallback mechanism that
verifies the current IPv6 address via a DNS query if the initial HTTP
query check fails. This improves test reliability, particularly in
userdebug environments.
Bug: 325894686
Test: TH
Change-Id: I21a496eefd2b2c3d581755c363fedb6c5f9ca4a6
When the test fails, retry it 10 times, and an extra time on the
original source port. Report results in the connectivity diagnostics
file header so they can be parsed across tests.
This should help investigate issues possibly linked to UDP packets not
being routed properly depending on the port.
Test: atest
Bug: 375477810
Bug: 253698734
Bug: 324389407
Bug: 338090529
Change-Id: I8400b40257aa25a373c5a3ec96868d6877e0afb1
Create a helper class in Java to provide easy access to timerfd
JNI methods.
Bug: 366373064
Test: atest NetworkStaticLibTests
Change-Id: Iea09cd29e2a6ed837ece30c512393be2e27e8c2e
Following a conversation with the Experiments team (b/374692404), it
appears we will not be able to use device config flags to trigger the
download of CT log lists.
This CL is the first of a series that will allow us to move away from
flags and instead rely on a daily job execution. For scheduling we rely
on the Android AlarmManager.
I previously attempted to schedule the daily job using the Android
JobScheduler. However, those attempts were unsuccessful beacause the
Tethering apex is not on the system_server classpath, so the system
would crash when attempting to load the class to execute the job.
Flag: com.android.net.ct.flags.certificate_transparency_job
Bug: 374692404
Test: NetworkSecurityUnitTests
Change-Id: I6ce44dcea464cab20d2df73b065e35c0f76dcbab
It should not be valid to queue messages before
registering a NetworkAgent, but the current design
makes it possible in practice. Log a metric so
that we have a handle on whether or not anybody
is doing this in the field.
Bug: 296355968
Test: manual
Change-Id: I83ea92e39a860cebe58d1d82cb024313e244b9aa
Introduced FrameworkConnectivityStatsLog within the
framework-connectivity module. This enables logging of metrics, such as
terrible error events, from components residing in the bootclasspath.
Test: manual
Change-Id: I478d957b06721b35135a45dbbcda72a2c3e9f9ce
* changes:
Clean up TetheringRequest#toString()
Send TetheringRequest to restart Tethering from IpServer
Add hostside CTS tests for SoftApConfig redaction
Include SoftAP config in TetheringEventCallback
Quang Luongauthored and Gerrit Code Reviewcommited 2024-11-19 12:26:34 +00:00
Clean up TetheringRequest#toString() by printing the TetheringType and
ConnectivityScope in a human-readable form and only printing the values
of fields that have been set.
Bug: 216524590
Test: atest TetheringManagerTest
Change-Id: Ie2c35190a09605e3018b9d2d1f1d00cdc7bbb977
Quang Anh Luongcommited 2024-11-19 21:24:47 +09:00
IpServer currently starts/stops tethering by specifying the tethering
type, but this will be a problem when we start to allow multiple
requests per type. To fix this, specify the TetheringRequest instead.
Note this CL has no functional changes.
Bug: 216524590
Test: atest TetheringTest TetheringManagerTest
Change-Id: I6bd9ceebcaa637a540435d5e91a35382f167a809
Quang Anh Luongcommited 2024-11-19 19:32:22 +09:00
Add hostside CTS tests to test for SoftApConfiguration being redacted
from TetheringInterface for apps that don't own that config.
Bug: 216524590
Test: atest CtsHostsideNetworkTests
Change-Id: I823c8e94cc6fe10c6118e7a694da368e585bbd69
Quang Anh Luongcommited 2024-11-19 19:32:19 +09:00
Android 16 introduces restrictions on the DeviceConfig flags that
can be modified by the shell user by removing the WRITE_DEVICE_CONFIG
permission from this user and replacing it with the
WRITE_ALLOWLISTED_DEVICE_CONFIG permission; with this permission,
only those flags that have been allowlisted can be modified. This
commit adds the ALLOWLISTED permission to any test that explicitly
adopts the shell permission identity with the WRITE_DEVICE_CONFIG
permission; the WRITE_DEVICE_CONFIG permission is not removed to
ensure tests do not break when run on previous platform releases
without the ALLOWLISTED permission.
Bug: 364083026
Flag: TEST_ONLY
Test: Manually ran all modified tests
Change-Id: Iad68063550f99f3dc78ac2f0483dad98a8a93f2e
Michael Groovercommited 2024-11-18 23:28:24 -06:00
Previously, setEthernetEnabled(false) untracks all interfaces and
ignores future RTM_NEWLINK callbacks, which means that the ethernet
module loses all knowledge of existing interfaces.
This change now properly toggles IFF_UP on all interfaces including
those in server mode when setEthernetEnabled API is called, and returns
on error on callback when trying to enable an interface when ethernet is
disabled.
Test: atest EthernetManagerTest
Bug: 316268558
Bug: 225315248
Change-Id: Ic7785e7e0c87c1437627661401e66201dd60802a