Home
last modified time | relevance | path

Searched refs:nai (Results 1 – 14 of 14) sorted by relevance

/frameworks/base/services/core/java/com/android/server/
DConnectivityService.java697 private void maybeLogBroadcast(NetworkAgentInfo nai, DetailedState state, int type, in maybeLogBroadcast() argument
701 " broadcast for type " + type + " " + nai.name() + in maybeLogBroadcast()
707 public void add(int type, NetworkAgentInfo nai) { in add() argument
711 if (VDBG) log("Adding agent " + nai + " for legacy network type " + type); in add()
714 if (list.contains(nai)) { in add()
718 list.add(nai); in add()
722 final boolean isDefaultNetwork = mService.isDefaultNetwork(nai); in add()
724 maybeLogBroadcast(nai, DetailedState.CONNECTED, type, isDefaultNetwork); in add()
725 mService.sendLegacyNetworkBroadcast(nai, DetailedState.CONNECTED, type); in add()
730 public void remove(int type, NetworkAgentInfo nai, boolean wasDefault) { in remove() argument
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DKeepaliveTracker.java157 @NonNull NetworkAgentInfo nai, in KeepaliveInfo() argument
167 mNai = nai; in KeepaliveInfo()
439 private int findFirstFreeSlot(NetworkAgentInfo nai) { in findFirstFreeSlot() argument
440 HashMap networkKeepalives = mKeepalives.get(nai); in findFirstFreeSlot()
443 mKeepalives.put(nai, networkKeepalives); in findFirstFreeSlot()
459 NetworkAgentInfo nai = ki.getNai(); in handleStartKeepalive() local
460 int slot = findFirstFreeSlot(nai); in handleStartKeepalive()
461 mKeepalives.get(nai).put(slot, ki); in handleStartKeepalive()
465 public void handleStopAllKeepalives(NetworkAgentInfo nai, int reason) { in handleStopAllKeepalives() argument
466 final HashMap<Integer, KeepaliveInfo> networkKeepalives = mKeepalives.get(nai); in handleStopAllKeepalives()
[all …]
DLingerMonitor.java109 private static boolean hasTransport(NetworkAgentInfo nai, int transport) { in hasTransport() argument
110 return nai.networkCapabilities.hasTransport(transport); in hasTransport()
122 private boolean everNotified(NetworkAgentInfo nai) { in everNotified() argument
123 return mEverNotified.get(nai.network.netId, false); in everNotified()
165 private void maybeStopNotifying(NetworkAgentInfo nai) { in maybeStopNotifying() argument
166 int fromNetId = getNotificationSource(nai); in maybeStopNotifying()
275 public void noteDisconnect(NetworkAgentInfo nai) { in noteDisconnect() argument
276 mNotifications.delete(nai.network.netId); in noteDisconnect()
277 mEverNotified.delete(nai.network.netId); in noteDisconnect()
278 maybeStopNotifying(nai); in noteDisconnect()
DNat464Xlat.java89 public Nat464Xlat(NetworkAgentInfo nai, INetd netd, IDnsResolver dnsResolver, in Nat464Xlat() argument
94 mNetwork = nai; in Nat464Xlat()
106 protected static boolean requiresClat(NetworkAgentInfo nai) { in requiresClat() argument
108 final boolean supported = ArrayUtils.contains(NETWORK_TYPES, nai.networkInfo.getType()); in requiresClat()
109 final boolean connected = ArrayUtils.contains(NETWORK_STATES, nai.networkInfo.getState()); in requiresClat()
113 LinkProperties lp = nai.linkProperties; in requiresClat()
118 final boolean skip464xlat = (nai.netMisc() != null) && nai.netMisc().skip464xlat; in requiresClat()
131 protected static boolean shouldStartClat(NetworkAgentInfo nai) { in shouldStartClat() argument
132 LinkProperties lp = nai.linkProperties; in shouldStartClat()
133 return requiresClat(nai) && lp != null && lp.getNat64Prefix() != null; in shouldStartClat()
DNetworkNotificationManager.java92 private static int getFirstTransportType(NetworkAgentInfo nai) { in getFirstTransportType() argument
94 if (nai.networkCapabilities.hasTransport(i)) return i; in getFirstTransportType()
141 public void showNotification(int id, NotificationType notifyType, NetworkAgentInfo nai, in showNotification() argument
147 if (nai != null) { in showNotification()
148 transportType = getFirstTransportType(nai); in showNotification()
149 final String extraInfo = nai.networkInfo.getExtraInfo(); in showNotification()
150 name = TextUtils.isEmpty(extraInfo) ? nai.networkCapabilities.getSSID() : extraInfo; in showNotification()
152 if (!nai.networkCapabilities.hasCapability(NET_CAPABILITY_INTERNET)) return; in showNotification()
183 WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID())); in showNotification()
188 WifiInfo.removeDoubleQuotes(nai.networkCapabilities.getSSID())); in showNotification()
[all …]
DDefaultNetworkMetrics.java162 private static void fillLinkInfo(DefaultNetworkEvent ev, NetworkAgentInfo nai) { in fillLinkInfo() argument
163 LinkProperties lp = nai.linkProperties; in fillLinkInfo()
164 ev.netId = nai.network().netId; in fillLinkInfo()
165 ev.transports |= BitUtils.packBits(nai.networkCapabilities.getTransportTypes()); in fillLinkInfo()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/
DConnectivityServiceMock.java163 NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo); in handleMessage() local
164 if (nai != null) nai.asyncChannel.disconnect(); in handleMessage()
188 NetworkAgentInfo nai = null; in handleAsyncChannelHalfConnect() local
190 (nai != null ? nai.getCurrentScore() : 0), 0, nri.request); in handleAsyncChannelHalfConnect()
204 NetworkAgentInfo nai = mNetworkAgentInfos.remove(msg.replyTo); in handleAsyncChannelHalfConnect() local
219 NetworkAgentInfo nai = mNetworkAgentInfos.get(msg.replyTo); in handleAsyncChannelDisconnected() local
220 if (nai != null) { in handleAsyncChannelDisconnected()
222 log(nai.name() + " got DISCONNECTED, was satisfying " + nai.numNetworkRequests()); in handleAsyncChannelDisconnected()
571 private void sendUpdatedScoreToFactories(NetworkAgentInfo nai) { in sendUpdatedScoreToFactories() argument
572 for (int i = 0; i < nai.numNetworkRequests(); i++) { in sendUpdatedScoreToFactories()
[all …]
/frameworks/base/tests/net/java/com/android/server/connectivity/
DIpConnectivityMetricsTest.java586 NetworkAgentInfo nai = mock(NetworkAgentInfo.class); in makeNai() local
587 when(nai.network()).thenReturn(new Network(netId)); in makeNai()
588 when(nai.getCurrentScore()).thenReturn(score); in makeNai()
589 nai.linkProperties = new LinkProperties(); in makeNai()
590 nai.networkCapabilities = new NetworkCapabilities(); in makeNai()
591 nai.lastValidated = true; in makeNai()
593 nai.networkCapabilities.addTransportType(t); in makeNai()
596 nai.linkProperties.addLinkAddress(new LinkAddress("192.0.2.12/24")); in makeNai()
597 nai.linkProperties.addRoute(new RouteInfo(new IpPrefix("0.0.0.0/0"))); in makeNai()
600 nai.linkProperties.addLinkAddress(new LinkAddress("2001:db8:dead:beef:f00::a0/64")); in makeNai()
[all …]
DNat464XlatTest.java103 private void assertRequiresClat(boolean expected, NetworkAgentInfo nai) {
105 + "nat64Prefix=%s addresses=%s", expected, nai.networkInfo.getType(),
106 nai.networkInfo.getDetailedState(),
107 mMisc.skip464xlat, nai.linkProperties.getNat64Prefix(),
108 nai.linkProperties.getLinkAddresses());
109 assertEquals(msg, expected, Nat464Xlat.requiresClat(nai));
112 private void assertShouldStartClat(boolean expected, NetworkAgentInfo nai) {
114 + "nat64Prefix=%s addresses=%s", expected, nai.networkInfo.getType(),
115 nai.networkInfo.getDetailedState(),
116 mMisc.skip464xlat, nai.linkProperties.getNat64Prefix(),
[all …]
DLingerMonitorTest.java352 NetworkAgentInfo nai(int netId, int transport, int networkType, String networkTypeName) { in nai() method in LingerMonitorTest
357 NetworkAgentInfo nai = new NetworkAgentInfo(null, null, new Network(netId), info, null, in nai() local
360 nai.everValidated = true; in nai()
361 return nai; in nai()
365 return nai(netId, NetworkCapabilities.TRANSPORT_WIFI, in wifiNai()
370 return nai(netId, NetworkCapabilities.TRANSPORT_CELLULAR, in cellNai()
/frameworks/base/wifi/java/android/net/wifi/hotspot2/
DOsuProvider.java94 String serviceDescription, Uri serverUri, String nai, List<Integer> methodList, in OsuProvider() argument
100 mNetworkAccessIdentifier = nai; in OsuProvider()
267 String nai = in.readString();
275 serverUri, nai, methodList, icon);
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/anqp/
DOsuProviderInfo.java84 List<IconInfo> iconInfoList, String nai, List<I18Name> serviceDescriptions) { in OsuProviderInfo() argument
93 mNetworkAccessIdentifier = nai; in OsuProviderInfo()
142 String nai = ByteBufferReader.readStringWithByteLength(payload, StandardCharsets.UTF_8); in parse() local
150 return new OsuProviderInfo(friendlyNameList, serverUri, methodList, iconInfoList, nai, in parse()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DOsuNetworkConnection.java167 public boolean connect(WifiSsid ssid, String nai, String friendlyName) { in connect() argument
192 if (TextUtils.isEmpty(nai)) { in connect()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DPasspointManagerTest.java1160 String nai = "access.test.com"; in getMatchingOsuProvidersWithMatch() local
1172 serverUri, nai, methodList, null)); in getMatchingOsuProvidersWithMatch()
1176 friendlyNames, serverUri, methodList, null, nai, serviceDescriptions)); in getMatchingOsuProvidersWithMatch()
1181 friendlyNames, serverUri, methodList, null, nai, serviceDescriptions)); in getMatchingOsuProvidersWithMatch()
1184 serverUri, nai, methodList, in getMatchingOsuProvidersWithMatch()