aosp/3502915 use this method from ConnectivityService to get socket
cookie that is required for closing QUIC connection.
Bug: 311792075
Test: m, boot
Change-Id: I17d8a4dd24cfb84e9b008b8eb87eedec67b29020
Motomu Utsumiauthored and Maciej Żenczykowskicommited 2025-03-03 17:23:04 -08:00
This reverts commit 47b6619fa8.
Reason for revert: DroidMonitor: Potential culprit for http://b/399299587 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: Id7717258b960ac18a27575fdc2b0852b42ef4e7b
Liana Kazanova (xWF)authored and Gerrit Code Reviewcommited 2025-02-26 12:20:26 -08:00
The bring up delay of SRP server is higher than before. In the integration test case we need to explicitly wait for the SRP server to show up in Network Data. Otherwise the test may be flaky.
Bug: 399263029
Change-Id: Id6346bcbfd55a34103ba8de0dcee75d3cacde446
ConnectivityServiceTest is a unit test and must never read
actual flag values from the device, because:
- If it did, its results would not be reproducible.
- At least on S and T, reading flags from device fails because
the test lacks the READ_DEVICE_CONFIG permission.
Instead, throw a clear exception if ConnectivityService checks a
feature flag that is not explicitly set in the test.
Test: test-only change
Change-Id: Ic3855ffa944f170f5fda9c3456776f5e1f2ef388
Lorenzo Colitticommited 2025-02-26 13:25:07 +09:00
Allow adding output from any shell command to the test diagnostics file,
instead of just dumpsys.
This introduces a new ShellUtil that can also help run more complex
commands, with pipes and redirects or as root for example.
Bug: 317602748
Test: atest with tests using this util
Change-Id: I0a0b5c7be5afd9e592dd820bfdbcee39ade418f8
* changes:
Get rid of volatile mIsAborted
Get rid of volatile mIsRunning
Add some more client network tests
Add test for when BluetoothSocket#connect throws
Add a test for when createInsecureL2capChannel throws
Add a test that brings up an L2cap server network
Move creating L2capIpClient to Dependencies
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-02-25 14:17:58 -08:00
These optimizations are already launched to all public Pixel
devices and were in in 25Q2 beta releases as well. Enable them
by default on all supported releases. The appcompat risk is very
low (these changes are difficult even for an app to detect if
it's looking for them), the user benefits are substantial, and
there is a kill switch if any unforeseen issues do occur.
Bug: 327038794
Test: both codepaths are covered by existing tests
Change-Id: I42c7ceb71ef02d078bf4563744cb11afd412f267
Lorenzo Colitticommited 2025-02-26 04:24:58 +09:00
When BluetoothSocket.InputStream#read() returns -1, the Bluetooth stack
closes the socket. Instead of dropping these packets, throw an exception
to tear down the link.
Test: TH
Change-Id: I7b78d01bc62383d9f93fa70cc4237e3604c98913
This has always been race-y as a socket exception could coincide with a
call to #close(). Since it is safe to run the full code paths for both
"regular" exceptions and exceptions triggered by the socket closing,
mIsAborted is not actually needed. This CL gets rid of it in favor of
simplicity.
Test: TH
Change-Id: Ic597ee917daffd6315c349dc435e5533b686bc2d
The check for mIsRunning inside catch(IOException) was always race-y as
BluetoothServerSocket could have thrown an unrelated exception at the
same time tearDown() is called -- the only side effect being
inconsistent logging. However, it is safe to call
postDestroyAndUnregisterReservedOffer() as that function first checks
whether the offer still exists.
Therefore, this CL just gets rid of mIsRunning in favor of always
calling postDestroyAndUnregisterReservedOffer().
Test: TH
Change-Id: I6a2b48aa54dfa1ad55030bdcef847a1a9efa0787
Upcoming CL adds feature to close quic connection which requires to
close UDP socket.
Bug: 311792075
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I63b7eb9c31cca9d00297a7a67c0cb18d0aa97a59
Unfortunately, the test does not have the permission to create an actual
IpClient. As a workaround, this change moves createL2capIpClient to the
depencencies object, so the test can mock the functionality.
Test: TH
Change-Id: I2b9128936f861bb822d80546efd72c14481bc2ed
* changes:
Delete unused createTapInterface method
Delete unused createTapInterface method
Replace createTapInterface() with new Builder API
Replace createTapInterface() call with new Builder API
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-02-24 15:26:06 -08:00