Revert "Return the registry in registerNetworkAgent."

This reverts commit 70ede3260c.

Reason for revert: Likely culprit for b/402365566 - 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: If72cc264c5e505348309c6c11dbbfd11adeaf31b
This commit is contained in:
Chaitanya Cheemala (xWF) 2025-03-11 06:05:49 -07:00 • committed by Gerrit Code Review
commit 846fb39e8a

View file

@ -228,7 +228,6 @@ import android.net.NattSocketKeepalive;
import android.net.Network;
import android.net.NetworkAgent;
import android.net.NetworkAgentConfig;
import android.net.NetworkAndAgentRegistryParcelable;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.NetworkInfo.DetailedState;
@ -9317,7 +9316,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
* @param providerId the ID of the provider owning this NetworkAgent.
* @return the network created for this agent.
*/
public NetworkAndAgentRegistryParcelable registerNetworkAgent(INetworkAgent na,
public Network registerNetworkAgent(INetworkAgent na,
NetworkInfo networkInfo,
LinkProperties linkProperties,
NetworkCapabilities networkCapabilities,
@ -9360,8 +9359,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
private NetworkAndAgentRegistryParcelable registerNetworkAgentInternal(
INetworkAgent na, NetworkInfo networkInfo,
private Network registerNetworkAgentInternal(INetworkAgent na, NetworkInfo networkInfo,
LinkProperties linkProperties, NetworkCapabilities networkCapabilities,
NetworkScore currentScore, NetworkAgentConfig networkAgentConfig,
@Nullable LocalNetworkConfig localNetworkConfig, int providerId,
@ -9393,11 +9391,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// NetworkAgentInfo registration will finish when the NetworkMonitor is created.
// If the network disconnects or sends any other event before that, messages are deferred by
// NetworkAgent until nai.connect(), which will be called when finalizing the
// registration. TODO : have NetworkAgentInfo defer them instead.
final NetworkAndAgentRegistryParcelable result = new NetworkAndAgentRegistryParcelable();
result.network = nai.network;
result.registry = nai.getRegistry();
return result;
// registration.
return nai.network;
}
private void handleRegisterNetworkAgent(NetworkAgentInfo nai, INetworkMonitor networkMonitor) {