Lines Matching refs:newNetwork

4807     private void makeDefault(NetworkAgentInfo newNetwork) {
4808 if (DBG) log("Switching to new default network: " + newNetwork);
4809 setupDataActivityTracking(newNetwork);
4811 mNetd.setDefaultNetId(newNetwork.network.netId);
4815 notifyLockdownVpn(newNetwork);
4816 handleApplyDefaultProxy(newNetwork.linkProperties.getHttpProxy());
4817 updateTcpBufferSizes(newNetwork);
4818 setDefaultDnsSystemProperties(newNetwork.linkProperties.getDnsServers());
4849 // satisfied by newNetwork, and reassigns to newNetwork
4850 // any such requests for which newNetwork is the best.
4856 // - Tears down newNetwork if it just became validated
4863 // NOTE: This function only adds NetworkRequests that "newNetwork" could satisfy,
4869 // @param newNetwork is the network to be matched against NetworkRequests.
4873 private void rematchNetworkAndRequests(NetworkAgentInfo newNetwork,
4875 if (!newNetwork.everConnected) return;
4876 boolean keep = newNetwork.isVPN();
4880 final boolean wasBackgroundNetwork = newNetwork.isBackgroundNetwork();
4881 final int score = newNetwork.getCurrentScore();
4883 if (VDBG) log("rematching " + newNetwork.name());
4889 NetworkCapabilities nc = newNetwork.networkCapabilities;
4899 final boolean satisfies = newNetwork.satisfies(nri.request);
4900 if (newNetwork == currentNetwork && satisfies) {
4902 log("Network " + newNetwork.name() + " was already satisfying" +
4920 if (VDBG) log("rematch for " + newNetwork.name());
4929 newNetwork.unlingerRequest(nri.request);
4930 mNetworkForRequestId.put(nri.request.requestId, newNetwork);
4931 if (!newNetwork.addRequest(nri.request)) {
4932 Slog.wtf(TAG, "BUG: " + newNetwork.name() + " already has " + nri.request);
4946 mLingerMonitor.noteLingerDefaultNetwork(currentNetwork, newNetwork);
4950 } else if (newNetwork.isSatisfyingRequest(nri.request.requestId)) {
4951 // If "newNetwork" is listed as satisfying "nri" but no longer satisfies "nri",
4954 // match "newNetwork" before this loop will encounter a "currentNetwork" with higher
4955 // score than "newNetwork" and where "currentNetwork" no longer satisfies "nri".
4957 // longer satisfies "nri" when "currentNetwork" does not equal "newNetwork".
4959 log("Network " + newNetwork.name() + " stopped satisfying" +
4962 newNetwork.removeRequest(nri.request.requestId);
4963 if (currentNetwork == newNetwork) {
4968 newNetwork.name() +
4978 callCallbackForRequest(nri, newNetwork, ConnectivityManager.CALLBACK_LOST, 0);
4983 makeDefault(newNetwork);
4985 logDefaultNetworkEvent(newNetwork, oldDefaultNetwork);
4999 if (!newNetwork.networkCapabilities.equalRequestableCapabilities(nc)) {
5002 nc, newNetwork.networkCapabilities));
5004 if (newNetwork.getCurrentScore() != score) {
5007 score, newNetwork.getCurrentScore()));
5011 if (wasBackgroundNetwork != newNetwork.isBackgroundNetwork()) {
5016 updateCapabilities(score, newNetwork, newNetwork.networkCapabilities);
5018 processListenRequests(newNetwork, false);
5023 for (NetworkRequestInfo nri : addedRequests) notifyNetworkCallback(newNetwork, nri);
5026 // available callback for newNetwork.
5030 // Possibly unlinger newNetwork. Unlingering a network does not send any callbacks so it
5032 updateLingerState(newNetwork, now);
5043 mDefaultInetConditionPublished = newNetwork.lastValidated ? 100 : 0;
5044 mLegacyTypeTracker.add(newNetwork.networkInfo.getType(), newNetwork);
5045 notifyLockdownVpn(newNetwork);
5054 final int type = newNetwork.networkInfo.getType();
5056 final String baseIface = newNetwork.linkProperties.getInterfaceName();
5058 for (LinkProperties stacked : newNetwork.linkProperties.getStackedLinks()) {
5080 for (int i = 0; i < newNetwork.numNetworkRequests(); i++) {
5081 NetworkRequest nr = newNetwork.requestAt(i);
5084 mLegacyTypeTracker.add(nr.legacyType, newNetwork);
5091 // newNetwork to the tracker explicitly (it's a no-op if it has already been added).
5092 if (newNetwork.isVPN()) {
5093 mLegacyTypeTracker.add(TYPE_VPN, newNetwork);