Home | History | Annotate | Download | only in server

Lines Matching refs:nai

573         private void maybeLogBroadcast(NetworkAgentInfo nai, DetailedState state, int type,
577 " broadcast for type " + type + " " + nai.name() +
583 public void add(int type, NetworkAgentInfo nai) {
587 if (VDBG) log("Adding agent " + nai + " for legacy network type " + type);
590 if (list.contains(nai)) {
594 list.add(nai);
598 final boolean isDefaultNetwork = isDefaultNetwork(nai);
600 maybeLogBroadcast(nai, DetailedState.CONNECTED, type, isDefaultNetwork);
601 sendLegacyNetworkBroadcast(nai, DetailedState.CONNECTED, type);
606 public void remove(int type, NetworkAgentInfo nai, boolean wasDefault) {
611 final boolean wasFirstNetwork = list.get(0).equals(nai);
614 if (!list.remove(nai)) {
622 maybeLogBroadcast(nai, state, type, wasDefault);
623 sendLegacyNetworkBroadcast(nai, state, type);
636 public void remove(NetworkAgentInfo nai, boolean wasDefault) {
637 if (VDBG) log("Removing agent " + nai + " wasDefault=" + wasDefault);
639 remove(type, nai, wasDefault);
645 public void update(NetworkAgentInfo nai) {
646 final boolean isDefault = isDefaultNetwork(nai);
647 final DetailedState state = nai.networkInfo.getDetailedState();
650 final boolean contains = (list != null && list.contains(nai));
651 final boolean isFirst = contains && (nai == list.get(0));
653 maybeLogBroadcast(nai, state, type, isDefault);
654 sendLegacyNetworkBroadcast(nai, state, type);
659 private String naiToString(NetworkAgentInfo nai) {
660 String name = (nai != null) ? nai.name() : "null";
661 String state = (nai.networkInfo != null) ?
662 nai.networkInfo.getState() + "/" + nai.networkInfo.getDetailedState() :
680 for (NetworkAgentInfo nai : mTypeLists[type]) {
681 pw.println(type + " " + naiToString(nai));
941 final NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
943 if (nai != null) {
944 state = nai.getNetworkState();
984 NetworkAgentInfo nai = getDefaultNetwork();
994 nai = getNetworkAgentInfoForNetwork(networks[0]);
996 nai = null;
1000 if (nai != null) {
1001 return nai.getNetworkState();
1144 NetworkAgentInfo nai;
1147 nai = mNetworkForNetId.get(vpnNetId);
1149 if (nai != null) return nai.network;
1151 nai = getDefaultNetwork();
1152 if (nai != null
1153 && isNetworkWithLinkPropertiesBlocked(nai.linkProperties, uid, ignoreBlocked)) {
1154 nai = null;
1156 return nai != null ? nai.network : null;
1196 final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
1197 if (nai != null) {
1198 final NetworkState state = nai.getNetworkState();
1263 NetworkAgentInfo nai = getDefaultNetwork();
1264 NetworkCapabilities nc = getNetworkCapabilitiesInternal(nai);
1266 result.put(nai.network, nc);
1276 nai = getNetworkAgentInfoForNetwork(network);
1277 nc = getNetworkCapabilitiesInternal(nai);
1317 NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
1318 if (nai != null) {
1319 synchronized (nai) {
1320 return new LinkProperties(nai.linkProperties);
1330 NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
1331 if (nai != null) {
1332 synchronized (nai) {
1333 return new LinkProperties(nai.linkProperties);
1339 private NetworkCapabilities getNetworkCapabilitiesInternal(NetworkAgentInfo nai) {
1340 if (nai != null) {
1341 synchronized (nai) {
1342 if (nai.networkCapabilities != null) {
1343 return new NetworkCapabilities(nai.networkCapabilities);
1363 final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
1364 if (nai != null) {
1365 result.add(nai.getNetworkState());
1435 NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
1436 if (nai == null) {
1446 synchronized (nai) {
1447 netState = nai.networkInfo.getDetailedState();
1464 synchronized (nai) {
1465 lp = nai.linkProperties;
1466 netId = nai.network.netId;
1847 private void updateTcpBufferSizes(NetworkAgentInfo nai) {
1848 if (isDefaultNetwork(nai) == false) {
1852 String tcpBufferSizes = nai.linkProperties.getTcpBufferSizes();
1938 for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
1941 nai.network,
1942 new LinkProperties(nai.linkProperties), // Must be a copy.
1988 for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
1989 pw.println(nai.toString());
1993 nai.numForegroundNetworkRequests(),
1994 nai.numNetworkRequests() - nai.numRequestNetworkRequests(),
1995 nai.numBackgroundNetworkRequests(),
1996 nai.numNetworkRequests()));
1998 for (int i = 0; i < nai.numNetworkRequests(); i++) {
1999 pw.println(nai.requestAt(i).toString());
2004 nai.dumpLingerTimers(pw);
2104 private boolean isLiveNetworkAgent(NetworkAgentInfo nai, int what) {
2105 if (nai.network == null) return false;
2106 final NetworkAgentInfo officialNai = getNetworkAgentInfoForNetwork(nai.network);
2107 if (officialNai != null && officialNai.equals(nai)) return true;
2111 " - " + nai);
2131 NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo);
2132 if (nai != null) nai.asyncChannel.disconnect();
2144 NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo);
2145 if (nai == null) {
2159 Slog.wtf(TAG, "BUG: " + nai + " has CS-managed capability.");
2161 updateCapabilities(nai.getCurrentScore(), nai, networkCapabilities);
2166 log("Update of LinkProperties for " + nai.name() +
2167 "; created=" + nai.created +
2168 "; everConnected=" + nai.everConnected);
2170 LinkProperties oldLp = nai.linkProperties;
2171 synchronized (nai) {
2172 nai.linkProperties = (LinkProperties)msg.obj;
2174 if (nai.everConnected) updateLinkProperties(nai, oldLp);
2179 updateNetworkInfo(nai, info);
2184 if (score != null) updateNetworkScore(nai, score.intValue());
2189 mNetd.addVpnUidRanges(nai.network.netId, (UidRange[])msg.obj);
2198 mNetd.removeVpnUidRanges(nai.network.netId, (UidRange[])msg.obj);
2206 if (nai.everConnected && !nai.networkMisc.explicitlySelected) {
2209 nai.networkMisc.explicitlySelected = true;
2210 nai.networkMisc.acceptUnvalidated = (boolean) msg.obj;
2214 mKeepaliveTracker.handleEventPacketKeepalive(nai, msg);
2225 final NetworkAgentInfo nai;
2227 nai = mNetworkForNetId.get(msg.arg2);
2229 if (nai != null) {
2232 final boolean wasValidated = nai.lastValidated;
2233 if (DBG) log(nai.name() + " validation " + (valid ? "passed" : "failed") +
2235 if (valid != nai.lastValidated) {
2236 final int oldScore = nai.getCurrentScore();
2237 nai.lastValidated = valid;
2238 nai.everValidated |= valid;
2239 updateCapabilities(oldScore, nai, nai.networkCapabilities);
2241 if (oldScore != nai.getCurrentScore()) sendUpdatedScoreToFactories(nai);
2243 updateInetCondition(nai);
2247 nai.asyncChannel.sendMessage(
2251 if (wasValidated && !nai.lastValidated) {
2252 handleNetworkUnvalidated(nai);
2260 final NetworkAgentInfo nai;
2262 nai = mNetworkForNetId.get(netId);
2265 if (nai != null && (visible != nai.lastCaptivePortalDetected)) {
2266 final int oldScore = nai.getCurrentScore();
2267 nai.lastCaptivePortalDetected = visible;
2268 nai.everCaptivePortalDetected |= visible;
2269 updateCapabilities(oldScore, nai, nai.networkCapabilities);
2274 if (nai == null) {
2278 if (!nai.networkMisc.provisioningNotificationDisabled) {
2279 mNotifier.showNotification(netId, NotificationType.SIGN_IN, nai, null,
2280 (PendingIntent) msg.obj, nai.networkMisc.explicitlySelected);
2294 NetworkAgentInfo nai = (NetworkAgentInfo) msg.obj;
2295 if (nai != null && isLiveNetworkAgent(nai, msg.what)) {
2296 handleLingerComplete(nai);
2314 private void updateLingerState(NetworkAgentInfo nai, long now) {
2319 nai.updateLingerTimer();
2320 if (nai.isLingering() && nai.numForegroundNetworkRequests() > 0) {
2321 if (DBG) log("Unlingering " + nai.name());
2322 nai.unlinger();
2323 logNetworkEvent(nai, NetworkEvent.NETWORK_UNLINGER);
2324 } else if (unneeded(nai, UnneededFor.LINGER) && nai.getLingerExpiry() > 0) {
2325 int lingerTime = (int) (nai.getLingerExpiry() - now);
2326 if (DBG) log("Lingering " + nai.name() + " for " + lingerTime + "ms");
2327 nai.linger();
2328 logNetworkEvent(nai, NetworkEvent.NETWORK_LINGER);
2329 notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_LOSING, lingerTime);
2341 NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
2343 (nai != null ? nai.getCurrentScore() : 0), 0, nri.request);
2357 NetworkAgentInfo nai = mNetworkAgentInfos.remove(msg.replyTo);
2358 if (nai != null) {
2359 final boolean wasDefault = isDefaultNetwork(nai);
2361 mNetworkForNetId.remove(nai.network.netId);
2362 mNetIdInUse.delete(nai.network.netId);
2365 mLegacyTypeTracker.remove(nai, wasDefault);
2372 NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo);
2373 if (nai != null) {
2375 log(nai.name() + " got DISCONNECTED, was satisfying " + nai.numNetworkRequests());
2382 if (nai.networkInfo.isConnected()) {
2383 nai.networkInfo.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED,
2386 final boolean wasDefault = isDefaultNetwork(nai);
2393 logDefaultNetworkEvent(null, nai);
2400 notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_LOST);
2401 mKeepaliveTracker.handleStopAllKeepalives(nai,
2403 nai.networkMonitor.sendMessage(NetworkMonitor.CMD_NETWORK_DISCONNECTED);
2405 updateClat(null, nai.linkProperties, nai);
2409 mNetworkForNetId.remove(nai.network.netId);
2412 for (int i = 0; i < nai.numNetworkRequests(); i++) {
2413 NetworkRequest request = nai.requestAt(i);
2415 if (currentNetwork != null && currentNetwork.network.netId == nai.network.netId) {
2420 nai.clearLingerState();
2421 if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
2422 removeDataActivityTracking(nai);
2423 notifyLockdownVpn(nai);
2424 requestNetworkTransitionWakelock(nai.name());
2426 mLegacyTypeTracker.remove(nai, wasDefault);
2428 mLingerMonitor.noteDisconnect(nai);
2429 if (nai.created) {
2439 mNetd.removeNetwork(nai.network.netId);
2445 mNetIdInUse.delete(nai.network.netId);
2513 private boolean unneeded(NetworkAgentInfo nai, UnneededFor reason) {
2517 numRequests = nai.numRequestNetworkRequests();
2520 numRequests = nai.numForegroundNetworkRequests();
2527 if (!nai.everConnected || nai.isVPN() || nai.isLingering() || numRequests > 0) {
2538 if (nri.request.isRequest() && nai.satisfies(nri.request) &&
2539 (nai.isSatisfyingRequest(nri.request.requestId) ||
2548 nai.getCurrentScoreAsValidated())) {
2575 final NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
2584 if (nai == null) return;
2585 callCallbackForRequest(nri, nai, callbackType, 0);
2621 NetworkAgentInfo nai = mNetworkForRequestId.get(nri.request.requestId);
2622 if (nai != null) {
2623 boolean wasBackgroundNetwork = nai.isBackgroundNetwork();
2624 nai.removeRequest(nri.request.requestId);
2626 log(" Removing from current network " + nai.name() +
2627 ", leaving " + nai.numNetworkRequests() + " requests.");
2631 updateLingerState(nai, SystemClock.elapsedRealtime());
2632 if (unneeded(nai, UnneededFor.TEARDOWN)) {
2633 if (DBG) log("no live requests for " + nai.name() + "; disconnecting");
2634 teardownUnneededNetwork(nai);
2639 if (!wasBackgroundNetwork && nai.isBackgroundNetwork()) {
2641 updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
2652 if (otherNai.isSatisfyingRequest(nri.request.requestId) && otherNai != nai) {
2655 (nai != null ? nai.name() : "null"));
2664 if (nri.request.legacyType != TYPE_NONE && nai != null) {
2668 // same legacy type - if so, don't remove the nai
2669 for (int i = 0; i < nai.numNetworkRequests(); i++) {
2670 NetworkRequest otherRequest = nai.requestAt(i);
2680 mLegacyTypeTracker.remove(nri.request.legacyType, nai, false);
2691 for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
2692 nai.removeRequest(nri.request.requestId);
2694 nai.satisfiesImmutableCapabilitiesOf(nri.request)) {
2695 updateSignalStrengthThresholds(nai, "RELEASE", nri.request);
2719 NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
2720 if (nai == null) {
2725 if (nai.everValidated) {
2730 if (!nai.networkMisc.explicitlySelected) {
2734 if (accept != nai.networkMisc.acceptUnvalidated) {
2735 int oldScore = nai.getCurrentScore();
2736 nai.networkMisc.acceptUnvalidated = accept;
2737 rematchAllNetworksAndRequests(nai, oldScore);
2738 sendUpdatedScoreToFactories(nai);
2742 nai.asyncChannel.sendMessage(
2748 nai.asyncChannel.sendMessage(NetworkAgent.CMD_PREVENT_AUTOMATIC_RECONNECT);
2750 teardownUnneededNetwork(nai);
2756 NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
2757 if (nai == null || nai.lastValidated) {
2761 if (!nai.avoidUnvalidated) {
2762 int oldScore = nai.getCurrentScore();
2763 nai.avoidUnvalidated = true;
2764 rematchAllNetworksAndRequests(nai, oldScore);
2765 sendUpdatedScoreToFactories(nai);
2769 private void scheduleUnvalidatedPrompt(NetworkAgentInfo nai) {
2770 if (VDBG) log("scheduleUnvalidatedPrompt " + nai.network);
2772 mHandler.obtainMessage(EVENT_PROMPT_UNVALIDATED, nai.network),
2782 for (NetworkAgentInfo nai: mNetworkAgentInfos.values()) {
2783 if (nai.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
2784 sendUpdatedScoreToFactories(nai);
2817 for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
2818 if (nai.avoidUnvalidated) {
2819 pw.println(nai.name());
2826 private void showValidationNotification(NetworkAgentInfo nai, NotificationType type) {
2841 intent.setData(Uri.fromParts("netId", Integer.toString(nai.network.netId), null));
2848 mNotifier.showNotification(nai.network.netId, type, nai, null, pendingIntent, true);
2853 NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
2858 if (nai == null || nai.everValidated || nai.everCaptivePortalDetected ||
2859 !nai.networkMisc.explicitlySelected || nai.networkMisc.acceptUnvalidated) {
2862 showValidationNotification(nai, NotificationType.NO_INTERNET);
2865 private void handleNetworkUnvalidated(NetworkAgentInfo nai) {
2866 NetworkCapabilities nc = nai.networkCapabilities;
2867 if (DBG) log("handleNetworkUnvalidated " + nai.name() + " cap=" + nc);
2871 showValidationNotification(nai, NotificationType.LOST_INTERNET);
2973 NetworkAgentInfo nai = getNetworkAgentInfoForNetwork((Network) msg.obj);
2976 mKeepaliveTracker.handleStopKeepalive(nai, slot, reason);
2980 for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
2981 nai.networkMonitor.systemReady = true;
3148 NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
3149 if (nai == null) return;
3150 reportNetworkConnectivity(nai.network, percentage > 50);
3158 NetworkAgentInfo nai;
3160 nai
3162 nai = getNetworkAgentInfoForNetwork(network);
3164 if (nai == null || nai.networkInfo.getState() == NetworkInfo.State.DISCONNECTING ||
3165 nai.networkInfo.getState() == NetworkInfo.State.DISCONNECTED) {
3169 if (hasConnectivity == nai.lastValidated) return;
3172 log("reportNetworkConnectivity(" + nai.network.netId + ", " + hasConnectivity +
3175 synchronized (nai) {
3178 if (!nai.everConnected) return;
3180 if (isNetworkWithLinkPropertiesBlocked(nai.linkProperties, uid, false)) return;
3182 nai.networkMonitor.sendMessage(NetworkMonitor.CMD_FORCE_REEVALUATION, uid);
3206 final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
3207 if (nai == null) return null;
3208 synchronized (nai) {
3209 final ProxyInfo proxyInfo = nai.linkProperties.getHttpProxy();
3365 private void updateProxy(LinkProperties newLp, LinkProperties oldLp, NetworkAgentInfo nai) {
4088 private ArrayList<Integer> getSignalStrengthThresholds(NetworkAgentInfo nai) {
4090 synchronized (nai) {
4093 nai.satisfiesImmutableCapabilitiesOf(nri.request)) {
4102 NetworkAgentInfo nai, String reason, NetworkRequest request) {
4103 ArrayList<Integer> thresholdsArray = getSignalStrengthThresholds(nai);
4115 detail, Arrays.toString(thresholdsArray.toArray()), nai.name()));
4118 nai.asyncChannel.sendMessage(
4179 NetworkAgentInfo nai = null;
4184 nai = mNetworkForNetId.get(network.netId);
4186 if (nai != null) {
4187 nai.asyncChannel.sendMessage(android.net.NetworkAgent.CMD_REQUEST_BANDWIDTH_UPDATE);
4404 private boolean isDefaultNetwork(NetworkAgentInfo nai) {
4405 return nai == getDefaultNetwork();
4419 final NetworkAgentInfo nai = new NetworkAgentInfo(messenger, new AsyncChannel(),
4424 nai.networkMonitor.systemReady = mSystemReady;
4426 addValidationLogs(nai.networkMonitor.getValidationLogs(), nai.network,
4428 if (DBG) log("registerNetworkAgent " + nai);
4429 mHandler.sendMessage(mHandler.obtainMessage(EVENT_REGISTER_NETWORK_AGENT, nai));
4430 return nai.network.netId;
4481 private void updateClat(LinkProperties newLp, LinkProperties oldLp, NetworkAgentInfo nai) {
4482 final boolean wasRunningClat = nai.clatd != null && nai.clatd.isStarted();
4483 final boolean shouldRunClat = Nat464Xlat.requiresClat(nai);
4486 nai.clatd = new Nat464Xlat(mContext, mNetd, mTrackerHandler, nai);
4487 nai.clatd.start();
4489 nai.clatd.stop();
4620 * @param nai the network having its capabilities updated.
4624 int oldScore, NetworkAgentInfo nai, NetworkCapabilities networkCapabilities) {
4625 if (nai.everConnected && !nai.networkCapabilities.equalImmutableCapabilities(
4627 Slog.wtf(TAG, "BUG: " + nai + " changed immutable capabilities: "
4628 + nai.networkCapabilities + " -> " + networkCapabilities);
4633 if (nai.lastValidated) {
4638 if (nai.lastCaptivePortalDetected) {
4643 if (nai.isBackgroundNetwork()) {
4649 if (Objects.equals(nai.networkCapabilities, networkCapabilities)) return;
4651 final String oldPermission = getNetworkPermission(nai.networkCapabilities);
4653 if (!Objects.equals(oldPermission, newPermission) && nai.created && !nai.isVPN()) {
4655 mNetd.setNetworkPermission(nai.network.netId, newPermission);
4661 final NetworkCapabilities prevNc = nai.networkCapabilities;
4662 synchronized (nai) {
4663 nai.networkCapabilities = networkCapabilities;
4665 if (nai.getCurrentScore() == oldScore &&
4671 processListenRequests(nai, true);
4675 rematchAllNetworksAndRequests(nai, oldScore);
4676 notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_CAP_CHANGED);
4680 private void sendUpdatedScoreToFactories(NetworkAgentInfo nai) {
4681 for (int i = 0; i < nai.numNetworkRequests(); i++) {
4682 NetworkRequest nr = nai.requestAt(i);
4685 sendUpdatedScoreToFactories(nr, nai.getCurrentScore());
4773 private void teardownUnneededNetwork(NetworkAgentInfo nai) {
4774 if (nai.numRequestNetworkRequests() != 0) {
4775 for (int i = 0; i < nai.numNetworkRequests(); i++) {
4776 NetworkRequest nr = nai.requestAt(i);
4783 nai.asyncChannel.disconnect();
4821 private void processListenRequests(NetworkAgentInfo nai, boolean capabilitiesChanged) {
4826 if (nai.isSatisfyingRequest(nr.requestId) && !nai.satisfies(nr)) {
4827 nai.removeRequest(nri.request.requestId);
4828 callCallbackForRequest(nri, nai, ConnectivityManager.CALLBACK_LOST, 0);
4833 notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_CAP_CHANGED);
4839 if (nai.satisfies(nr) && !nai.isSatisfyingRequest(nr.requestId)) {
4840 nai.addRequest(nr);
4841 notifyNetworkCallback(nai, nri);
5027 for (NetworkAgentInfo nai : affectedNetworks) {
5028 updateLingerState(nai, now);
5097 for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
5098 if (unneeded(nai, UnneededFor.TEARDOWN)) {
5099 if (nai.getLingerExpiry() > 0) {
5107 updateLingerState(nai, now);
5109 if (DBG) log("Reaping " + nai.name());
5110 teardownUnneededNetwork(nai);
5148 for (NetworkAgentInfo nai : nais) {
5149 rematchNetworkAndRequests(nai,
5153 (nai != nais[nais.length-1]) ? ReapUnvalidatedNetworks.DONT_REAP
5160 private void updateInetCondition(NetworkAgentInfo nai) {
5162 if (!nai.everValidated) return;
5165 if (!isDefaultNetwork(nai)) return;
5167 int newInetCondition = nai.lastValidated ? 100 : 0;
5172 sendInetConditionBroadcast(nai.networkInfo);
5175 private void notifyLockdownVpn(NetworkAgentInfo nai) {
5177 if (nai != null && nai.isVPN()) {
5178 mLockdownTracker.onVpnStateChanged(nai.networkInfo);
5297 private void updateNetworkScore(NetworkAgentInfo nai, int score) {
5298 if (VDBG) log("updateNetworkScore for " + nai.name() + " to " + score);
5300 loge("updateNetworkScore for " + nai.name() + " got a negative score (" + score +
5305 final int oldScore = nai.getCurrentScore();
5306 nai.setCurrentScore(score);
5308 rematchAllNetworksAndRequests(nai, oldScore);
5310 sendUpdatedScoreToFactories(nai);
5314 protected void notifyNetworkCallback(NetworkAgentInfo nai, NetworkRequestInfo nri) {
5317 callCallbackForRequest(nri, nai, notifyType, 0);
5319 sendPendingIntentForRequest(nri, nai, notifyType);
5323 private void sendLegacyNetworkBroadcast(NetworkAgentInfo nai, DetailedState state, int type) {
5330 NetworkInfo info = new NetworkInfo(nai.networkInfo);
5342 nai.networkInfo.setFailover(false);
5351 if (nai.isSatisfyingRequest(mDefaultRequest.requestId)) {
5518 NetworkAgentInfo nai, NetworkRequest defaultRequest) {
5519 return new NetworkMonitor(context, handler, nai, defaultRequest);
5553 private void logNetworkEvent(NetworkAgentInfo nai, int evtype) {
5554 mMetricsLog.log(new NetworkEvent(nai.network.netId, evtype));