Commit graph

95,223 commits

Message SHA1
Baseline NewApi issues
NewApi is a lint check that you don't call framework methods that were
introduced in versions later than your min_sdk_version. We want to
make this an error, so we're baselineing all existing issues.

This cl was generated automatically, by taking all the NewApi issues
from the reference baselines, and all the non-NewApi issues from the
existing checked in baselines.

Bug: 268261262
Test: Presubmits
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4ecdedda379e4e9040eb87b01dc3d8efb89be810)
Merged-In: I0393f24f101876abc458ca139eefdb279dcb2b03
Change-Id: I0393f24f101876abc458ca139eefdb279dcb2b03

Cole Faust   authored and   Android Build Cherrypicker Worker   commited 2024-01-25 02:41:58 +00:00
be30b3e96e
NetworkStatsService - add void nativeRegisterIface(iface)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8dd893d09fd5b01676b08fb87f0e01b5d2ab9efd

Maciej Żenczykowski   commited 2024-01-24 22:07:47 +00:00
bfb3a3c5b4
change NULL to nullptr
(for consistency with the rest of the file)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I78be4ca1c22e266a658288ee714a6f952b2ad529

Maciej Żenczykowski   commited 2024-01-24 22:07:32 +00:00
b6d091ccf2
use a singleton for ifaceStatsMap(IFACE_STATS_MAP_PATH)
Test: TreeHugger, atest libnetworkstats_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id9783d3ce502ba68533b14a1080b9ed1792b1082

Maciej Żenczykowski   commited 2024-01-24 22:07:10 +00:00
60eba16aed
use a singleton for ifaceIndexNameMap(IFACE_INDEX_NAME_MAP_PATH)
Test: TreeHugger, atest libnetworkstats_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibff5f9c2989b071a0af804ea1ba80a6d11ac53c2

Maciej Żenczykowski   commited 2024-01-24 22:06:50 +00:00
022b286f2b
new BpfMap<> - remove spurious generic type arguments
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic32ccd7c2c415c462c4e1fdc9002cf7858ed587c

Maciej Żenczykowski   commited 2024-01-24 12:15:44 -08:00
3863c094f3
Merge "Revert "[Thread] add Android.bp for Thread flags"" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-01-24 11:46:00 +00:00
61a823471f
Merge "Add test for SkDestroyListener::dump()" into main
Ken Chen   authored and   Gerrit Code Review   commited 2024-01-24 11:37:48 +00:00
c930f3e8e5
Revert "[Thread] add Android.bp for Thread flags"
This reverts commit a59a6e304b.

Reason for revert: this should not be added in the mainline module but in platform

Merged-In: I88c993680976d2e10d672bfdbf45119f2db13868
Change-Id: I680f23b5f8099b1ea4a316b768a56f1be5c78862

Kangping Dong   commited 2024-01-24 11:20:22 +00:00
2d238dd7f9
Merge "[Thread] create socket dev/socket/ot-daemon/thread-wpan.sock" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-01-24 10:08:28 +00:00
3457225fa3
Merge "Add aconfig flags for Connectivity FlaggedAPI annotations" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-01-24 09:12:38 +00:00
8c951c32df
Merge "Revert "Add experiment flag for tethering refactor"" into main
Mark Chien   authored and   Gerrit Code Review   commited 2024-01-24 07:41:19 +00:00
e48d106863
Add test for SkDestroyListener::dump()
A simple unit test for the SkDestroyListener::dump().
(The follow-up of aosp/2916465)

Bug: 306919485
Bug: 319348954
Test: atest FrameworksNetTests:android.net.connectivity.com.android.serv
er.net.SkDestroyListenerTest

Change-Id: Ica70b2b344ffb2df8047cd936e8edc583e636ceb

Ken Chen   commited 2024-01-24 13:26:50 +08:00
8b33caa55e
Merge "BpfMap - add R/W constructor alias" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-01-24 04:53:54 +00:00
8552cd82b9
Merge "BpfMap.java - remove spurious import" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-01-24 04:49:35 +00:00
d769babaab
Merge "Do not check active socket from other callbacks" into main
Paul Hu   authored and   Gerrit Code Review   commited 2024-01-24 03:15:16 +00:00
95d380fefd
Merge "[Thread] add error code ERROR_UNKNOWN for forward compatibility" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-01-24 02:20:42 +00:00
649571ddf7
BpfMap - add R/W constructor alias
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7cef2b19f55e6e056b46bb1b28f85c7f7376f6f4

Maciej Żenczykowski   commited 2024-01-23 16:16:44 -08:00
06155c8040
BpfMap.java - remove spurious import
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id4ceeb0dc0cb8ffbd4a4bfb75359f311a00a08a7

Maciej Żenczykowski   commited 2024-01-23 16:16:32 -08:00
e64e4eacce
Do not check active socket from other callbacks
Not all SocketTypeClients are cleaned up when their corresponding
sockets are closed. This occurs because the active socket check
for each callback examines the socket from all callbacks, even
those scheduled for removal in later notifications. To fix this,
check the active socket from the current callback only.

Fix: 317461509
Test: atest FrameworksNetTests NsdManagerTest
      Manually test with multiple discovery requests and
      Wifi on/off.
Change-Id: I2f81bb8e75f2c038d5e9dc025b208dcc6b441112

Paul Hu   commited 2024-01-23 10:31:08 +00:00
01d2f643be
Fix the dependency of CtsNetTestCasesMaxTargetSdk
Bug: 318958910
Change-Id: I71499f2a5244030c5c83c2102585c4c0c3da5db4

Tongbo Liu   commited 2024-01-23 09:24:49 +00:00
47524106d0
Add aconfig flags for Connectivity FlaggedAPI annotations
Bug: 321624552
Test: TH
Change-Id: Idbec5e8af0f3764b5bf432e3dd5e6ba7f35aa81f

Motomu Utsumi   commited 2024-01-23 17:20:03 +09:00
3a586fc095
OWNERS: remove ex-employees
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I590cb9754465a43f2d6f442afa82f5c9093af7ae

Maciej Żenczykowski   commited 2024-01-22 22:24:54 +00:00
eb7b292221
Revert "Add experiment flag for tethering refactor"
This reverts commit cf11be9eb2.

Reason for revert: avoid some IpServer(s) running the new sync state machine while others use the async state machine.

Bug: 319212113
Change-Id: Ib086a7ccd102f38e579c79f94aceae9971f1853a

Mark Chien   authored and   Mark   commited 2024-01-22 11:34:14 +00:00
6e368d1bdd
Merge "Add Multicast routing status to dump" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-01-22 10:46:43 +00:00
3b7259195b
Merge "Add SkDestroyListener log in dumpsys netstats" into main
Ken Chen   authored and   Gerrit Code Review   commited 2024-01-22 10:25:50 +00:00
65b4c3f0f1
Merge "Parse destination and source mac address of ARP packet." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2024-01-22 06:22:46 +00:00
94192b136b
Add SkDestroyListener log in dumpsys netstats
When sockets are destroyed, the SkDestroyListener receives a
NETLINK_INET_DIAG message informing it to delete the socket cookie from
the BPF CookieTagMap. However, under unknown conditions, all 10,000
spaces on the map were still observed to be filled. SkDestroyListener
and its parent classes, NetlinkMonitor, and FdEventsReader will log
errors. But due to the time required to fill the 10,000 fields is long,
traces in the device log are likely to have been overwritten and cannot
be observed.
This commit enables dumpsys netstats to print the last 20 traces of the
SkDestroyListener. If the issue is caused by the SkDestroyListener,
this will help in obtaining further clues when the issue is reported
again.

Bug: 306919485
Bug: 319348954
Test: atest FrameworksNetTests:android.net.connectivity.com.android.serv
      er.net.NetworkStatsServiceTest#testDumpSkDestroyListenerLogs
Test: manually add mLog.e(...) in
      SkDestroyListener#processNetlinkMessage and check dumpsys netstats
Change-Id: I5bbfe07e05cf959f809f28a7633ee5f99e29f641

Ken Chen   commited 2024-01-22 13:48:34 +08:00
375d780c8e
Add Multicast routing status to dump
Bug: 281217735

Test: adb shell dumpsys connectivity
Change-Id: I0816f8cd1b9bcbcbac3f78f98c499874976cef6d

Yang Sun   commited 2024-01-22 13:37:25 +08:00
ca537d5e25
Merge "Apply multicast routing configs" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-01-22 00:57:42 +00:00
cc23753288
Merge "Support multicast routing" into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-01-22 00:55:10 +00:00
bcc245d5bf
[Thread] create socket dev/socket/ot-daemon/thread-wpan.sock
Creates the /dev/socket/ot-daemon/thread-wpan.sock socket from the
service init file. This is required for communication between ot-ctl
and ot-daemon service

Bug: 320451788
Test: verified that ot-daemon can create socket
/dev/socket/ot-daemon/thread-wpan.sock

Change-Id: Ib2111d67d2ce6726158f02a2cb2310c7ba9bf270

Kangping Dong   commited 2024-01-22 01:20:36 +08:00
9e69c46395
Merge "Make ThreadNetworkController.setTestNetworkAsUpstream require NETWORK_SETTINGS permission" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-01-21 05:58:22 +00:00
ba2480bb2e
Merge "Replace HashSet with ArraySet in RaParams" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2024-01-20 19:06:38 +00:00
86b8bf03d2
Apply multicast routing configs
Applies multicast routing configs when they are updated in
LocalNetworkConfig, or when local network/upstream network
status changes.

Bug: 281217735

Test: atest CSLocalAgentTests
Change-Id: Ib1c43c645a367d0f91e5cf0a0d9f8e5883be2c40

Yang Sun   commited 2024-01-20 21:32:20 +08:00
29037f6046
Support multicast routing
Added support to apply multicast routing config between network
interfaces in MulticastRoutingCoordinatorService.

Bug: 281217735

Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.connectivity.MulticastRoutingCoordinatorServiceTest

Change-Id: If608b79d4e62a20d2e01755a83a901f6e274d9a2

Yang Sun   commited 2024-01-20 21:32:11 +08:00
baa50fa478
Merge "Refactoring hostside network restrictions tests" into main
Suprabh Shukla   authored and   Gerrit Code Review   commited 2024-01-19 21:50:20 +00:00
52113d6a9f
Merge "ProcNetTest.java - reverse arguments to assertEquals()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-01-19 20:31:31 +00:00
92f357c090
Make ThreadNetworkController.setTestNetworkAsUpstream require NETWORK_SETTINGS permission
This CL contains following enhancements:

- Enforce NETWORK_SETTINGS permission for ThreadNetworkController.setTestNetworkAsUpstream.
- Move the setTestNetworkAsUpstream in
  ThreadNetworkControllerService to make the order of methods more
logical.
- Update the test case name in BorderRoutingTest.

Bug: 295843010
Bug: 320842152

Change-Id: I82edac6c819dd637f4c98f31368a1b520338ce24

Handa Wang   commited 2024-01-19 08:15:58 +00:00
253b3fb6da
Merge "connectivity_native_test: fix skip message typo" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2024-01-19 05:02:40 +00:00
516eae02df
Merge "Remove the UID range check for TCP sockets" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-01-19 02:53:29 +00:00
26aab9b0d9
Remove the UID range check for TCP sockets
The original patch (aosp/2891011) incorrectly counted TCP
sockets with keepalive enabled for VPNs. This issue was
caused by the UID range verification. On bypassable VPNs,
the socket mark is always correct. It's possible for an
app that is not in the UID ranges to establish a socket
on the VPN. But that socket should be counted for the
purposes of keepalive. The old code would correctly count
it and the new code will incorrectly not count it. Also,
the UID range verification does not help on non-bypassable
VPNs since the socket mark is always the mark of default
network, not the socket mark of the VPN.

Instead of reverting the entire patch, this commit
removes the UID range mechanism. The code refactoring from
the original commit (which used structured classes to read
socket information) has been kept as it is a valuable
improvement.

Bug: 320842519
Test: atest FrameworksNetTests
Change-Id: I00731796144c982b9fd4d9771f3d0db1f1529a89

Chiachang Wang   commited 2024-01-19 02:50:35 +00:00
ac2e8f354d
Merge "Check stats dir instead of making one" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2024-01-19 02:31:50 +00:00
91694abf58
Refactoring hostside network restrictions tests
The definition of background can be fluid and ambiguous. Refactored all
code to be explicit about process states when making assertions.

No functional change is expected to tests.

Test: atest CtsHostsideNetworkTests

Bug: 304347838

Change-Id: Ibc614d74f46d436cad4586c1d309bbb3648b8eb1
Merged-In: Ibc614d74f46d436cad4586c1d309bbb3648b8eb1

Suprabh Shukla   commited 2024-01-19 01:01:24 +00:00
52732642fa
Merge "Address review feedback" into main
Chiachang Wang   authored and   Gerrit Code Review   commited 2024-01-19 00:48:08 +00:00
8ceb02c541
ProcNetTest.java - reverse arguments to assertEquals()
currently we have:
  org.junit.ComparisonFailure: expected:<[]bic> but was:<[cu]bic>
	at org.junit.Assert.assertEquals(Assert.java:117)
but this is the reverse of the intended error:
  org.junit.ComparisonFailure: expected:<[cu]bic> but was:<bic>
	at org.junit.Assert.assertEquals(Assert.java:117)

method signature:
  public static void assertEquals(Object expected, Object actual)

Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I322ea162f2818aaa1beba5c1b9febcf97d29eea1

Maciej Żenczykowski   commited 2024-01-18 23:43:00 +00:00
d67fd53edf
Merge "Push test-data to device" into main
Mohannad Farrag   authored and   Gerrit Code Review   commited 2024-01-18 19:51:33 +00:00
106d76fb8a
connectivity_native_test: fix skip message typo
(and adjust indents to be saner)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2e52131fa51782dc89ddbfda4c9239a142376c56

Maciej Żenczykowski   commited 2024-01-18 18:53:32 +00:00
254b52c0eb
Merge "Support checking kernel bitness via JNI" into main
Yan Yan   authored and   Gerrit Code Review   commited 2024-01-18 18:13:38 +00:00
77ee99872d
Push test-data to device
* Push the test-data to the device in the expected destination, this is needed to get rid
of the divergance in TestFilesInstaller.
* Stop jarjaring tests Jni classes.

Test: TH
Bug: 304217500
Change-Id: I07fa7ed09f90bf286805479edc5238b6268d59f0

Mohannad Farrag   commited 2024-01-18 16:47:49 +00:00
38885e3d57