Add genrule for VCN metrics atoms and add wrapper utility class for logging using the generated java code, which currently has func for logging safe mode and VCN network validation states.
Bug: 288600040
Flag: EXEMPT METRICS
Test: atest CtsVcnTestCases, FrameworksVcnTests
Change-Id: Ia0f42c3435752399eb3ed480bfe62ffac31ccc1e
Likely not needed for kernel verifier happiness,
since even 1 'static' constant prevents .rodata from being
entirely empty/automatic and thus BTF-less.
Trivial follow up to go/ag/35341088
Bug: 441356399
Bug: 441436401
Test: TreeHugger
Flag: EXEMPT mainline/bug fix
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I396d1a4f2d47225707348f7c7dc3548cbba125a0
Maciej Żenczykowskicommited 2025-08-27 23:01:24 -07:00
This change enables the TETHERING_AND_P2P_GO_LOCAL_AGENT feature
on devices running Android 25Q4 or newer, in addition to being
controlled by the existing feature flag.
A new SdkUtil.isAtLeast25Q4() method is introduced to check for
the specific SDK version.
Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Test: atest ConnectivityCoverageTests --update-device \
--test-filter '.*Tethering.*'
Test: TH
Bug: 420590461
Fix: 428098654
Fix: 420592689
Change-Id: I7ef79a201116de84f2c4973c4c360fd3d1ef0c4c
Appear to be failing on pixel 7 U (which is 5.10)
Flag: EXEMPT mainline
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I12d70659a994fd2a9f57597fd4aaa1aea6bbe1c7
Maciej Żenczykowskicommited 2025-08-27 13:06:28 -07:00
This reverts commit 9fecf5dee1.
Reason for revert: <Removing alint hook from individual repos as we get ready to roll it out with a global flag>
Bug: 441250579
Change-Id: I12c4c31caa9e8881f4703a1022b607c6744a0c36
Doğancan Emekauthored and Android (Google) Code Reviewcommited 2025-08-27 03:31:04 -07:00
ConnectivityServiceTest can not start QuicConnectionCloser and was
getting the following error.
The interaction between ConnectivityService and QuicConnectionCloser is
already covered by CSDestroySocketTest.
```
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: [SkDestroyListener] ERROR Failed to create rtnetlink socket: socket failed: EACCES (Permission denied)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: android.system.ErrnoException: socket failed: EACCES (Permission denied)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.Linux.socket(Native Method)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.ForwardingOs.socket(ForwardingOs.java:821)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:402)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at libcore.io.ForwardingOs.socket(ForwardingOs.java:821)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.system.Os.socket(Os.java:834)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.net.module.util.ip.NetlinkMonitor.createFd(NetlinkMonitor.java:127)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.net.module.util.FdEventsReader.createAndRegisterFd(FdEventsReader.java:217)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.net.module.util.FdEventsReader.start(FdEventsReader.java:111)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.net.connectivity.com.android.server.connectivity.QuicConnectionCloser$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Handler.handleCallback(Handler.java:959)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Handler.dispatchMessage(Handler.java:100)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Looper.loopOnce(Looper.java:232)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.Looper.loop(Looper.java:317)
08-26 18:53:53.469 6243 11101 E QuicConnectionCloser: at android.os.HandlerThread.run(HandlerThread.java:85)
```
Bug: 311792075
Test: atest ConnectivityServiceTest
Flag: EXEMPT test only change
Change-Id: I8ae1033b2ea655ebc26300aac19ec4d8cbdc047d
`base.evaluate()` can be interrupted by other rules in the chain, such
as DevSdkIgnoreRule, if an assumption fails. This prevents
SetFeatureFlagsRule from executing its flag value restoration logic,
leading to an inconsistent state. This change ensures the restoration
logic runs regardless of exceptions.
Flag: EXEMPT mainline
Bug: 440618747
Test: TH
Change-Id: Iba4483b45f11aeed8ae565f8080b2bebd299046c
With this change, the OffloadEngine can receive updates when
offload service information changes from DiscoveryManager. This
allows the OffloadEngine to maintain offload services and to
adjust its behavior accordingly.
Bug: 410734687
Test: atest ConnectivityCoverageTests
Flag: com.android.tethering.mainline.beta.nsd_selective_mdns_response_offload
Change-Id: I6c6ba4e76b4a2a94cbfef37bec9d6f87357bec5f
The old assumption check ran the test on devices with unrestricted
interfaces which were configured in the overlay. Apparently, this is
a common configuration on automotive devices.
There are likely other tests that are broken which need to be moved to
the new assumption check.
Test: TH
Flag: EXEMPT mainline
Change-Id: I504534920ea2c083a05bf217bec17a084a829184
This change specifies that FrameworksNetTests requires a minimum SDK version of 31.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib47c879bc9c15196a7b0dbf5380d73eb94027356
Maciej Żenczykowskicommited 2025-08-26 12:26:45 -07:00
This change sets the minimum SDK version for the FrameworksNetSmokeTests to 31.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib49bca2cf8e04593f2ab5758e7aaf709058029b2
Maciej Żenczykowskicommited 2025-08-26 12:25:02 -07:00
As of M-2025-11 mainline is only being pushed to S+
Test: TreeHugger
Flag: EXEMPT test only
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id0cf9d2cce27fb90ce076fcdd0f6ee0a95ea9741
Maciej Żenczykowskicommited 2025-08-26 09:56:45 -07:00
Mainline M-2025-11 drops support for android R,
thus making the new minimum Android 12 / S (api 31)
Once we get this to pass tests, we can merge it,
then we need to bump min sdk to 31, then we can
probably get rid of the dlsym stuff and just link it directly.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com
Change-Id: I9d68ea9f4aa180b3ec24d252bcd49593e19cf475
Maciej Żenczykowskicommited 2025-08-26 09:56:44 -07:00
This is not safe to do in system server because it affects all
system server callers of NetworkStatsManager, including ones
that frequently call into NetworkStatsService, such as
NetworkPolicyManagerService.
Also, setPollOnOpen is unnecessary because data usage is only collected when processing the `onLost` callback, which is triggered after ConnectivityService forces a poll.
Fix: 427909947
Flag: EXEMPT BUGFIX
Test: covered by existing tests
Change-Id: I2fb25f4529d46dfc14b00b0aa69c5145317ca9dd
Lorenzo Colitticommited 2025-08-26 03:05:26 -07:00
This CL also sorts bpf targets in Android.bp
Test: m
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I4a662870333f3da02d4d6cfcb3fca8c0af452d34
This seemed to have been an oversight in the original change. There is
no need to call getInterfaceTrackingReason here; it can just use the
tracking reason that is passed to the function (and passed to
addInterface above).
Test: TH
Flag: EXEMPT mainline
Change-Id: I33322c5bfeaaf8f11f3251aff1b1ccac845a993b
bpf_helpers.h has the same definitions
Test: m tcpAccECN.o
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Ie5b47bdcbc2aa8d4563cf3ec0806f8dfc6861801
This CL also sets the min kver to 5.10.
skb_tcp_flags field in bpf_sock_ops was introduced on 5.10 kernel
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I71696e0bf3b36296c5f2e7fd5b692406d96ddf97
CRITICAL section was removed by ag/33605170
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: I6de89edd7547ede1ecdd18b5ee80fb9bc1977915
$ sed -i 's/\r$//g' bpf/progs/tcpAccECN.c
$ sed -i 's/\r$//g' bpf/progs/tcpAccECN.h
Test: TH
Bug: 440448408
Flag: EXEMPT tcpAccECN is not used
Change-Id: Iffde87607e95920dc839e6901e0ba40912f83a49