Reapply "Unify registration and NM assignment in NAI"
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit 30fcf820f9.
Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: I57f25f5e6481106255df0ab69558e351eb938f68
This commit is contained in:
parent
8a97692638
commit
b3a53d0d39
2 changed files with 4 additions and 11 deletions
|
|
@ -9421,8 +9421,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||
nai.getDeclaredCapabilitiesSanitized(mCarrierPrivilegeAuthenticator)));
|
||||
processLinkPropertiesFromAgent(nai, nai.linkProperties);
|
||||
|
||||
nai.onNetworkMonitorCreated(networkMonitor);
|
||||
|
||||
mNetworkAgentInfos.add(nai);
|
||||
synchronized (mNetworkForNetId) {
|
||||
mNetworkForNetId.put(nai.network.getNetId(), nai);
|
||||
|
|
@ -9437,7 +9435,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||
if (nai.isLocalNetwork()) {
|
||||
handleUpdateLocalNetworkConfig(nai, null /* oldConfig */, nai.localNetworkConfig);
|
||||
}
|
||||
nai.notifyRegistered();
|
||||
nai.notifyRegistered(networkMonitor);
|
||||
NetworkInfo networkInfo = nai.networkInfo;
|
||||
updateNetworkInfo(nai, networkInfo);
|
||||
updateVpnUids(nai, null, nai.networkCapabilities);
|
||||
|
|
|
|||
|
|
@ -700,7 +700,9 @@ public class NetworkAgentInfo implements NetworkRanker.Scoreable {
|
|||
* Must be called from the ConnectivityService handler thread. A NetworkAgent can only be
|
||||
* registered once.
|
||||
*/
|
||||
public void notifyRegistered() {
|
||||
public void notifyRegistered(final INetworkMonitor nm) {
|
||||
HandlerUtils.ensureRunningOnHandlerThread(mHandler);
|
||||
mNetworkMonitor = new NetworkMonitorManager(nm);
|
||||
try {
|
||||
networkAgent.asBinder().linkToDeath(mDeathMonitor, 0);
|
||||
networkAgent.onRegistered();
|
||||
|
|
@ -1037,13 +1039,6 @@ public class NetworkAgentInfo implements NetworkRanker.Scoreable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inform NetworkAgentInfo that a new NetworkMonitor was created.
|
||||
*/
|
||||
public void onNetworkMonitorCreated(INetworkMonitor networkMonitor) {
|
||||
mNetworkMonitor = new NetworkMonitorManager(networkMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the NetworkCapabilities on this NetworkAgentInfo. Also attempts to notify NetworkMonitor
|
||||
* of the new capabilities, if NetworkMonitor has been created.
|
||||
|
|
|
|||
Loading…
Reference in a new issue