Commit graph

111,519 commits

Message SHA1
Revert "Fix onActiveDataSubscriptionIdChanged is not received in multi SIM mode"
This reverts commit aecb2b65ba.

Reason for revert: Likely culprit for b/430219293 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 430219293
Change-Id: I9b786abf784de8c34b9f517236305330b79b227e

Chaitanya Cheemala (xWF)   authored and   Android (Google) Code Review   commited 2025-07-08 03:54:19 -07:00
1bcbb88955
Fix onActiveDataSubscriptionIdChanged is not received in multi SIM mode
Flag: EXEMPT mainline
Bug: 428673855
Test: manually
Change-Id: I0d7c2538ec33402dba64949c3fb34519605d843e

Jimi Chen   commited 2025-07-08 02:14:21 +00:00
aecb2b65ba
Merge "Add persisted logic to EthernetConfiguration" into main
Chuwei He   authored and   Android (Google) Code Review   commited 2025-06-26 21:15:19 -07:00
784cc003f6
Merge changes If5f9b5e8,I2ae559df into main
* changes:
  Remove delayed messages from handler queue correctly
  Exclude more files from mDNS standalone library

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-26 17:47:59 -07:00
830b2bc40e
Merge "Optionally remove legacy bluetooth tethering address cache on T+" into main
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2025-06-26 03:33:56 -07:00
5eaf3aab02
Merge "Minor cleanups in PrivateAddressCoordinatorTest." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-26 00:57:24 -07:00
93db0837d3
Remove delayed messages from handler queue correctly
This change replaces removeMessages() with removeEqualMessages().
The latter uses the equals() method to correctly compare the
content of interface name strings, ensuring previously delayed
messages are properly removed.

Bug: 427426427
Test: Manual testing with some modifications.
Test: atest ConnectivityCoverageTests NsdManagerTest
Flag: EXEMPT bug fix
Change-Id: If5f9b5e8425fc9bb235431edd78c3f3a28a037d8

Paul Hu   commited 2025-06-26 07:30:40 +00:00
4d22c15b0a
Exclude more files from mDNS standalone library
MdnsPacketRepeater and MdnsReplySender are not used in the
current mDNS standalone library. Exclude these files from the
library, as they are unnecessary.

Bug: 427426427
Test: m
Flag: EXEMPT bug fix
Change-Id: I2ae559df5257773d854772adced5c39bde67172b

Paul Hu   commited 2025-06-26 07:30:40 +00:00
e897f2fdbf
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
Optionally remove legacy bluetooth tethering address cache on T+
After T, Bluetooth tethering could use a random address. But if we keep
putting the legacy Bluetooth address in the cache, the coordinator will
always assign the legacy address first until it runs into a conflict.

This change in itself does not do anything. Once we have a
trunk-stable namespace for mainline beta, we will add a flag for
this change, and check the flag in PrivateAddressCoordinator.

Bug: 287177081
Test: new unit tests
Flag: EXEMPT no behaviour changes
Change-Id: I56810b5b0e1098a5f89cbb1ad665d2b8652e860c

Yuyang Huang   authored and   Lorenzo Colitti   commited 2025-06-26 15:14:47 +09:00
acd7366b65
Minor cleanups in PrivateAddressCoordinatorTest.
Flag: EXEMPT refactor
Test: covered by existing tests.
Change-Id: If237516472a817201286621d00b9134247c85bdd

Lorenzo Colitti   commited 2025-06-26 13:26:41 +09:00
76b2419b0b
Merge "Fix crash in LocationPermissionChecker when app is not installed." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-25 17:30:37 -07:00
319accbfc1
Fix crash in LocationPermissionChecker when app is not installed.
AppOpsManager#noteOp can throw SecurityException in some cases (for
example, if the app is not installed). Don't crash the system when
this happens.

Test: None
Fix: 416189588
Flag: TEST_ONLY
Change-Id: Idf017ccf6b033ec80f4c4f3397cf4e417af7ad11

Lorenzo Colitti   commited 2025-06-25 17:25:53 -07:00
e988ae3208
Merge "Format MdnsReplySenderTest" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-25 08:34:13 -07:00
7e90162275
Merge "[owners] Remove sunytt@google.com from thread/OWNERS" into main
Owner Cleanup Bot   authored and   Android (Google) Code Review   commited 2025-06-25 07:23:47 -07:00
65f44cade8
Format MdnsReplySenderTest
Use the ktlint.py script to correct Kotlin code formatting errors.

Test: m
Flag: EXEMPT corret format
Change-Id: I1c184ce89e4e511340b8a32cb5dd3253191a8bbd

Paul Hu   commited 2025-06-25 10:18:15 +00:00
e823669fb7
[Thread] move Thread Border Router integration tests to presubmit.
The tests have been very stable, so they are ready to be part of the
presubmit stage now.

Bug: 427623603
Test: None
Flag: TEST_ONLY

https://android-build.corp.google.com/test_hub/search/?filter=lowFailureRate&invfilter=unhealthyInvocations&invfilter=staleInvocations&query=branch%3Agit_main+module%3AThreadBorderRouterIntegrationTests

Change-Id: I22be820a8def044e5b653e141c973896fc7454c4

Handa Wang   commited 2025-06-24 23:53:32 -07:00
4db6a42d74
Merge "NsdManager dumpsys explicitly marks offload client" into main
Yuyang Huang   authored and   Android (Google) Code Review   commited 2025-06-24 22:47:49 -07:00
63d1babeeb
Merge "Skip tests if FLAG_AVOID_BAD_WIFI_FROM_CARRIER_CONFIG is not enabled" into main
Jimi Chen   authored and   Android (Google) Code Review   commited 2025-06-24 22:30:31 -07:00
b09d959d06
Skip tests if FLAG_AVOID_BAD_WIFI_FROM_CARRIER_CONFIG is not enabled
Flag: android.net.platform.flags.avoid_bad_wifi_from_carrier_config
Bug: 424707713
Test: TH
Change-Id: I3253e95c92ff9001c73304e23ea829aa7f30f92f

Jimi Chen   commited 2025-06-25 00:59:15 +00:00
f8264fbf26
[owners] Remove sunytt@google.com from thread/OWNERS
This suggested change is automatically generated based on group
memberships and affiliations.

Please approve this change and vote the highest CR. This will keep the
OWNERS file tidy. We ask that you do not ignore this change and either
approve it if the OWNER is no longer active or deny it if the OWNER is
continuing to review CLs (including under a different affiliation).
This CL can always be reverted if the understanding changes.

If this change is in error, vote the lowest CR value (i.e. reject the
CL) and the bot will abandon it.

See the owner's recent review activity for context:
https://googleplex-android-review.googlesource.com/q/sunytt@google.com

To report an issue, file a bug in the Infra>Codereview component.

Change-Id: I69b62d1cb7cf7d41533fdecee69959c992b84269

Owner Cleanup Bot   commited 2025-06-24 10:45:28 -07:00
e22048bfe7
Fix typo
Still not sure whether the log message is 100% correct. Technically, it
means no callback was received between now and the last successful poll
operation that incremented the track record position.

Test: TH
Flag: EXEMPT trivial
Change-Id: I57e9600321cb4a79d035d64d488af09b17a50706

Patrick Rohr   commited 2025-06-24 08:33:51 -07:00
a36b89c5b0
NsdManager dumpsys explicitly marks offload client
Improve the NsdManager dumpsys output to explicitly mark which client is
using the offload engine. This clarifies debugging and monitoring of
offload-related operations.

Example output:

Active clients:
  mUid 1000, mResolvedService null, mIsLegacy false, mUseJavaBackend true, mClientRequests:
    2: Advertiser: serviceFullName=Google Inc. Gambit #17D9._meshcop._udp, net=null {2, startTime 79747, foundServices 0, lostServices 0, fromCache false, sentQueries 0}
  mUid 1073, mResolvedService null, mIsLegacy false, mUseJavaBackend true, isOffloadEngine, mClientRequests:
  mUid 10059, mResolvedService null, mIsLegacy false, mUseJavaBackend true, mClientRequests:
    4: Advertiser: serviceFullName=gambit-e0efff2d1e84b8272cc285a46d235baf._googlecast._tcp, net=null {6, startTime 123664, foundServices 0, lostServices 0, fromCache false, sentQueries 0}
  mUid 1000, mResolvedService null, mIsLegacy false, mUseJavaBackend true, isOffloadEngine, mClientRequests:
  mUid 10060, mResolvedService null, mIsLegacy false, mUseJavaBackend true, mClientRequests:
    2: Advertiser: serviceFullName=GoogleTV2444._androidtvremote2._tcp, net=null {3, startTime 99098, foundServices 0, lostServices 0, fromCache false, sentQueries 0}

Test: TH
Flag: EXEMPT log only change
Change-Id: Ie1fefd6c353f4f5261f6ca00a21d37c8d2f2cd64

Yuyang Huang   commited 2025-06-24 22:25:14 +09:00
0b56ef5211
Merge "Skip tests if device does not suppor telephony subscription feature" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-24 02:53:53 -07:00
205b13a557
Skip tests if device does not suppor telephony subscription feature
Flag: EXEMPT mainline
Test: atest CtsNetTestCases:android.net.ConnectivitySettingsManagerTest#testShouldShowAvoidBadWifiToggleWithCarrierConfig \
 -- --test-arg com.android.testutils.ConnectivityTestTargetPreparer:ignore-mobile-data-check:true \
 --abi arm64-v8a
Change-Id: Ifeb04dc02075f4a40422b3caaef3e8eab57f1096

Jimi Chen   commited 2025-06-24 08:22:08 +00:00
2e4185e08c
Merge "Fix incorrect Global Settings key for reset in test cases." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-23 23:00:04 -07:00
2e3de546ce
Fix incorrect Global Settings key for reset in test cases.
The test cases were incorrectly attempting to reset "network_carrier_aware_avoid_bad_wifi"
instead of "network_carrier_aware_avoid_bad_wifi/1" for specific subIds.
This commit corrects the key.

Flag: EXEMPT mainline
Bug: 425170385
Test: atest CtsNetTestCases:android.net.ConnectivitySettingsManagerTest --iterations 100
Change-Id: Iee9273faa77a68af2a75fe3c37ee6f3b2435cbf1

Jimi Chen   commited 2025-06-24 04:07:25 +00:00
bc9218530f
Merge "Wait for Soft AP completion before connecting" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-06-23 20:28:03 -07:00
8cc1379c11
Merge "Register network_carrier_aware_avoid_bad_wifi setting change callback" into main
Jimi Chen   authored and   Android (Google) Code Review   commited 2025-06-23 19:59:08 -07:00
1895b07c81
Wait for Soft AP completion before connecting
The startWifiTethering method is modified to wait for the Soft AP
to be fully started and ready before it returns. Previously, this
method would return as soon as the tethering interface was
active. This could cause race conditions, leading to client
devices attempting to connect to the hotspot before it was fully
operational. The Soft AP is now guaranteed to have successfully
broadcast its information and be ready for connections.

Bug: 417369055
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: Ie0420753256bf26c5d44e8c856a87b3c9340a961

Paul Hu   commited 2025-06-23 14:46:58 +00:00
395c079244
Register network_carrier_aware_avoid_bad_wifi setting change callback
This commit registers the "network_carrier_aware_avoid_bad_wifi" URI
with the ContentResolver to allow for monitoring changes to this
specific Global.Settings entry.

Flag: EXEMPT mainline
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.MultinetworkPolicyTrackerTest
Change-Id: I0e9161c5390b71e5c3ecac89613aa042f40ab695

Jimi Chen   commited 2025-06-23 14:01:56 +00:00
1095a3486f
Merge "Migrate CSAgentWrapper to TestableCallback." into main
Jean Chalard   authored and   Android (Google) Code Review   commited 2025-06-22 18:43:23 -07:00
3cbf1e3b94
Merge "DHCPv6 addr reg: remove the mAddrRegEnable member." into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-20 15:19:35 -07:00
1fccee32d9
Merge "Check service meta-data for satellite opt-in" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-20 02:25:16 -07:00
bc19379378
Check service meta-data for satellite opt-in
Previously, the approach for apps to declare themselves
satellite-optimized was problematic. Relying solely on the
<application> tag for opt-in could significantly increase app
size. This was particularly an issue on older devices, where
the duplication of <meta-data> directly under the
<application> tag into each ProviderInfo could drastically
swell its size. A prime example of this negative impact was
crashes on Android 5.0 (API 21) and older devices, where
PackageManager.queryContentProviders would exceed the 1MB
Binder transaction limit due to the bloated ProviderInfo size.

The `isSatelliteDataOptimizedApp` method is updated to iterate
through a package's services if the application-level meta-data
is not found.

Flag: EXEMPT controlled by kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideSatelliteDataOptInTest
Bug: 424290966

Change-Id: I36b6a0093bc74de470443f6553b26b09d070ed9d

Junyu Lai   commited 2025-06-20 16:35:28 +08:00
441ce68713
Migrate CSAgentWrapper to TestableCallback.
This makes it much more powerful as well as consistent with
other use cases of this paradigm.

Test: TH
Flag: EXEMPT test-only
Change-Id: I4f5b86bfdd16d8bfe21b79235444817a13bc3c49

Chalard Jean   authored and   Jean Chalard   commited 2025-06-20 01:08:25 -07:00
6fe5d13b3a
Merge changes from topic "avoid-bad-wifi-api-update" into main
* changes:
  Enable per-subId 'avoid bad Wi-Fi' setting storage
  Use ConnectivitySettingsManager API for avoid bad Wi-Fi updates

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-20 00:42:48 -07:00
553054fcee
Merge "Don't blame a non-existent test for not restoring default networking" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-20 00:37:37 -07:00
b37483f3ca
Don't blame a non-existent test for not restoring default networking
RestoreDefaultNetwork is a virtual test, causing a lot of confusion among
testers who can't reproduce or run this test.
Instead, blame the test that actually failed to restore the default network.

Before :
```
[1/2] android.net.cts.MultinetworkApiTest#testFoo: PASSED (253ms)
[2/2] android.net.cts.MultinetworkApiTest#RestoreDefaultNetwork: FAILED (54ms)

STACKTRACE:
java.lang.IllegalStateException: testFoo does not restore the default network. Default network has caps null ; expected a network with transports = WIFI
        at com.android.testutils.DefaultNetworkRestoreMonitor$listener$1.testFinished(DefaultNetworkRestoreMonitor.kt:64)
```

After :
```
[1/2] android.net.cts.MultinetworkApiTest#testFoo: PASSED (353ms)
[2/2] android.net.cts.MultinetworkApiTest#testFoo: FAILED (54ms)

STACKTRACE:
java.lang.IllegalStateException: testFoo does not restore the default network. Default network has caps null ; expected a network with transports = WIFI
        at com.android.testutils.DefaultNetworkRestoreMonitor$listener$1.testFinished(DefaultNetworkRestoreMonitor.kt:64)
```

Test: this
Flag: EXEMPT test-only
Bug: 413188127
Change-Id: Ia17bc9ddeedbd9303e5788ef79fb190e6e9dca1e

Chalard Jean   commited 2025-06-20 15:12:31 +09:00
00275e3f44
Merge "Add a tool to generate hidden module API lists" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-19 20:59:09 -07:00
e5bdc7fa3c
Merge "Use handler thread to retrieve carrier config directly" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-06-19 06:06:08 -07:00
4ee72294c0
Enable per-subId 'avoid bad Wi-Fi' setting storage
Breaks out the `network_carrier_aware_avoid_bad_wifi` setting from a single
string key into individual `Global.Settings` entries per subscription ID.

Flag: EXEMPT mainline
Bug: 424330991
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.ConnectivitySettingsManagerTest
Change-Id: Ida673c1b8b915719b8e64ea85a66c2b98862e5f5

Jimi Chen   commited 2025-06-19 11:30:06 +00:00
1bfe086299
Use ConnectivitySettingsManager API for avoid bad Wi-Fi updates
This change replaces the internal cache with the `ConnectivitySettingsManager` API
to manage "avoid bad Wi-Fi" settings. It reduces code duplication and improves
readability.

Flag: EXEMPT mainline
Bug: 422063047
Test: atest ConnectivityCoverageTests
Change-Id: I82d9e1afb7c318d584e708da6ad5c10f298f057b

Jimi Chen   commited 2025-06-19 11:30:02 +00:00
dd73a350f9
Merge "Update test to wait for LOST callback when disconnecting WiFi" into main
Motomu Utsumi   authored and   Android (Google) Code Review   commited 2025-06-19 01:39:20 -07:00
0d7bd2d772
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
Merge changes If072a5bc,I1c48ebba,I389fe6c5,I6699b147,Ia16ba2b5 into main
* changes:
  DHCPv6 addr reg: get the DHCPv6 message type.
  DHCPv6 addr reg: add a function helper to create ADDR_REG_REPLY message.
  DHCPv6 addr reg: add ADDR_REG_REPLY packet class.
  DHCPv6 addr reg: add a function helper to create ADDR_REG_INFORM message.
  DHCPv6 addr reg: build an IA Address option inside Dhcp6AddrRegInform.

Xiao Ma   authored and   Android (Google) Code Review   commited 2025-06-18 21:24:01 -07:00
cbe860cc22
DHCPv6 addr reg: remove the mAddrRegEnable member.
For the current implementation we don't use the addr reg option yet, so
remove it.

Flag: EXEMPT guarded by an legacy experiment flag
Bug: 293393743
Test: TH
Change-Id: I91a6a81010f11ad2e7db48ed10e777bc42d002d5

Xiao Ma   commited 2025-06-19 11:16:49 +09:00
a915249504
DHCPv6 addr reg: get the DHCPv6 message type.
Flag: EXEMPT guarded by an legacy experiment flag
Bug: 293393743
Test: TH
Change-Id: If072a5bce0c8516af3fa4f7f9b63137de86b7500

Xiao Ma   commited 2025-06-19 11:15:29 +09:00
307112f889
DHCPv6 addr reg: add a function helper to create ADDR_REG_REPLY message.
Flag: EXEMPT guarded by an legacy experiment flag
Bug: 293393743
Test: TH
Change-Id: I1c48ebba71bd49d0164442929d3c5eb9fa96ac90

Xiao Ma   commited 2025-06-19 11:15:29 +09:00
cfa1f11bad
DHCPv6 addr reg: add ADDR_REG_REPLY packet class.
Flag: EXEMPT guarded by an legacy experiment flag
Bug: 293393743
Test: TH
Change-Id: I389fe6c54da3d4443d85b6fa87f915aa6809d21e

Xiao Ma   commited 2025-06-19 11:15:24 +09:00
64baf9aba5