Enable QUIC connection close by default in ConnectivityService

This feature will be controlled by the caller.
Cronet calls the register/unregisterQuicConnectionClosePayload APIs only
when the Chromium experiment flag is enabled
(http://crrev.com/c/6421621/).

This CL also updates testRegisterQuicConnectionClosePayload
to be skipped on U or older releases since FIREWALL_CHAIN_BACKGROUND is
supported on V or higher releases.

Flag: EXEMPT guarded by chromium flag
Bug: 311792075
Test: TH
Change-Id: Ib008e63c585cfe8775b25783cd55b0873bb5e2f0
This commit is contained in:
Motomu Utsumi 2025-04-25 14:56:11 +09:00
commit 2ea5939672

View file

@ -2157,7 +2157,10 @@ public class ConnectivityService extends IConnectivityManager.Stub {
mL2capNetworkProvider = mDeps.makeL2capNetworkProvider(mContext);
mCloseQuicConnection = mDeps.isFeatureEnabled(context, CLOSE_QUIC_CONNECTION);
// QUIC connection close is triggered by freezer (U+) or background firewall chain (V+).
// TODO: Allow other firewall chains to close QUIC connection and enable this flag on T+
mCloseQuicConnection = mDeps.isAtLeastU()
&& mDeps.isFeatureNotChickenedOut(context, CLOSE_QUIC_CONNECTION);
if (mCloseQuicConnection) {
mQuicConnectionCloser = mDeps.makeQuicConnectionCloser(mNetworkForNetId, mHandler);
} else {