/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/ |
D | UpstreamNetworkMonitor.java | 322 return typeStatePair.ns; in selectPreferredUpstreamType() 413 final UpstreamNetworkState ns = new UpstreamNetworkState(newLp, prev.networkCapabilities, in updateLinkProperties() local 415 mNetworkMap.put(network, ns); in updateLinkProperties() 416 return ns; in updateLinkProperties() 420 final UpstreamNetworkState ns = updateLinkProperties(network, newLp); in handleLinkProp() local 421 if (ns != null) { in handleLinkProp() 422 notifyTarget(EVENT_ON_LINKPROPERTIES, ns); in handleLinkProp() 455 final UpstreamNetworkState ns = mNetworkMap.get(network); in maybeHandleNetworkSwitch() 456 if (ns == null) { in maybeHandleNetworkSwitch() 467 notifyTarget(EVENT_DEFAULT_SWITCHED, ns); in maybeHandleNetworkSwitch() [all …]
|
D | TetheringInterfaceUtils.java | 42 public static @Nullable InterfaceSet getTetheringInterfaces(UpstreamNetworkState ns) { in getTetheringInterfaces() argument 43 if (ns == null) { in getTetheringInterfaces() 47 final LinkProperties lp = ns.linkProperties; in getTetheringInterfaces() 49 final String if6 = getIPv6Interface(ns); in getTetheringInterfaces() 58 public static @Nullable String getIPv6Interface(UpstreamNetworkState ns) { in getIPv6Interface() argument 74 (ns != null) && (ns.network != null) in getIPv6Interface() 75 && (ns.linkProperties != null) && (ns.networkCapabilities != null) in getIPv6Interface() 77 && ns.linkProperties.hasIpv6DnsServer() in getIPv6Interface() 79 && ns.linkProperties.hasGlobalIpv6Address() in getIPv6Interface() 81 && ns.networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR); in getIPv6Interface() [all …]
|
D | IPv6TetheringCoordinator.java | 122 public void updateUpstreamNetworkState(UpstreamNetworkState ns) { in updateUpstreamNetworkState() argument 124 Log.d(TAG, "updateUpstreamNetworkState: " + toDebugString(ns)); in updateUpstreamNetworkState() 126 if (TetheringInterfaceUtils.getIPv6Interface(ns) == null) { in updateUpstreamNetworkState() 133 && !ns.network.equals(mUpstreamNetworkState.network)) { in updateUpstreamNetworkState() 137 setUpstreamNetworkState(ns); in updateUpstreamNetworkState() 147 private void setUpstreamNetworkState(UpstreamNetworkState ns) { in setUpstreamNetworkState() argument 148 if (ns == null) { in setUpstreamNetworkState() 153 new LinkProperties(ns.linkProperties), in setUpstreamNetworkState() 154 new NetworkCapabilities(ns.networkCapabilities), in setUpstreamNetworkState() 155 new Network(ns.network)); in setUpstreamNetworkState() [all …]
|
D | Tethering.java | 1484 private boolean pertainsToCurrentUpstream(UpstreamNetworkState ns) { in pertainsToCurrentUpstream() argument 1485 if (ns != null && ns.linkProperties != null && mCurrentUpstreamIfaceSet != null) { in pertainsToCurrentUpstream() 1486 for (String ifname : ns.linkProperties.getAllInterfaceNames()) { in pertainsToCurrentUpstream() 1660 final UpstreamNetworkState ns = (config.chooseUpstreamAutomatically) in chooseUpstreamType() local 1665 if (ns == null) { in chooseUpstreamType() 1672 } else if (!isCellular(ns)) { in chooseUpstreamType() 1676 setUpstreamNetwork(ns); in chooseUpstreamType() 1677 final Network newUpstream = (ns != null) ? ns.network : null; in chooseUpstreamType() 1681 reportUpstreamChanged(ns); in chooseUpstreamType() 1685 protected void setUpstreamNetwork(UpstreamNetworkState ns) { in setUpstreamNetwork() argument [all …]
|
D | PrivateAddressCoordinator.java | 105 public void updateUpstreamPrefix(final UpstreamNetworkState ns) { in updateUpstreamPrefix() argument 108 if (ns.networkCapabilities != null && ns.networkCapabilities.hasTransport(TRANSPORT_VPN)) { in updateUpstreamPrefix() 109 removeUpstreamPrefix(ns.network); in updateUpstreamPrefix() 114 ns.linkProperties.getAllLinkAddresses()); in updateUpstreamPrefix() 116 removeUpstreamPrefix(ns.network); in updateUpstreamPrefix() 120 mUpstreamPrefixMap.put(ns.network, ipv4Prefixes); in updateUpstreamPrefix()
|
/packages/modules/DnsResolver/ |
D | res_send.cpp | 147 uint8_t* ans, int anssiz, int* terrno, size_t ns, time_t* at, int* rcode, 150 uint8_t* ans, int anssiz, int* terrno, size_t* ns, int* v_circuit, 288 for (int ns = 0; ns < nscount; ns++) { in res_set_usable_server() local 289 if (usable_servers[ns]) ++usableIndex; in res_set_usable_server() 290 if (usableIndex != selectedServer) usable_servers[ns] = false; in res_set_usable_server() 298 int ns = 0; in res_ourserver_p() local 309 return ns; in res_ourserver_p() 310 ++ns; in res_ourserver_p() 324 return ns; in res_ourserver_p() 325 ++ns; in res_ourserver_p() [all …]
|
D | res_stats.cpp | 149 for (int ns = 0; ns < nscount; ns++) { in android_net_res_stats_get_usable_servers() local 150 bool usable = res_stats_usable_server(params, &stats[ns]); in android_net_res_stats_get_usable_servers() 154 usable_servers[ns] = usable; in android_net_res_stats_get_usable_servers() 159 for (int ns = 0; ns < nscount; ns++) { in android_net_res_stats_get_usable_servers() local 160 usable_servers[ns] = true; in android_net_res_stats_get_usable_servers()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | FullScoreTest.kt | 65 val ns = FullScore(50, 0L /* policy */, KEEP_CONNECTED_NONE) in <lambda>() constant 66 assertEquals(10, ns.legacyInt) // -40 penalty for not being validated in <lambda>() 67 assertEquals(50, ns.legacyIntAsValidated) in <lambda>() 75 val validatedNs = ns.withPolicies(validated = true) in <lambda>() 79 val chosenNs = ns.withPolicies(onceChosen = true) in <lambda>() 112 val ns = FullScore(50, 0L /* policy */, KEEP_CONNECTED_NONE) in <lambda>() constant 113 assertFalse(ns.hasPolicy(POLICY_IS_VALIDATED)) in <lambda>() 114 assertFalse(ns.hasPolicy(POLICY_IS_VPN)) in <lambda>() 115 assertFalse(ns.hasPolicy(POLICY_EVER_USER_SELECTED)) in <lambda>() 116 assertFalse(ns.hasPolicy(POLICY_ACCEPT_UNVALIDATED)) in <lambda>() [all …]
|
/packages/modules/Wifi/service/java/com/android/server/wifi/aware/ |
D | WifiAwareDataPathStateManager.java | 1327 void updateToSupportNewRequest(NetworkRequest ns) { in updateToSupportNewRequest() argument 1328 if (VDBG) Log.v(TAG, "updateToSupportNewRequest: ns=" + ns); in updateToSupportNewRequest() 1329 if (equivalentRequests.add(ns) && state == STATE_CONFIRMED) { in updateToSupportNewRequest() 1339 void removeSupportForRequest(NetworkRequest ns) { in removeSupportForRequest() argument 1340 if (VDBG) Log.v(TAG, "removeSupportForRequest: ns=" + ns); in removeSupportForRequest() 1341 equivalentRequests.remove(ns); in removeSupportForRequest() 1379 WifiAwareNetworkSpecifier ns, WifiAwareStateManager mgr, in processNetworkSpecifier() argument 1385 byte[] peerMac = ns.peerMac; in processNetworkSpecifier() 1388 Log.v(TAG, "processNetworkSpecifier: networkSpecifier=" + ns); in processNetworkSpecifier() 1392 if (ns.type < 0 in processNetworkSpecifier() [all …]
|
/packages/modules/Wifi/framework/java/android/net/wifi/ |
D | WifiNetworkAgentSpecifier.java | 122 public boolean satisfiesNetworkSpecifier(@NonNull WifiNetworkSpecifier ns) { in satisfiesNetworkSpecifier() argument 126 checkNotNull(ns); in satisfiesNetworkSpecifier() 127 checkNotNull(ns.ssidPatternMatcher); in satisfiesNetworkSpecifier() 128 checkNotNull(ns.bssidPatternMatcher); in satisfiesNetworkSpecifier() 129 checkNotNull(ns.wifiConfiguration.allowedKeyManagement); in satisfiesNetworkSpecifier() 136 return ns.getBand() == mBand; in satisfiesNetworkSpecifier() 138 if (ns.getBand() != ScanResult.UNSPECIFIED && ns.getBand() != mBand) { in satisfiesNetworkSpecifier() 144 if (!ns.ssidPatternMatcher.match(ssidWithoutQuotes)) { in satisfiesNetworkSpecifier() 148 final MacAddress matchBaseAddress = ns.bssidPatternMatcher.first; in satisfiesNetworkSpecifier() 149 final MacAddress matchMask = ns.bssidPatternMatcher.second; in satisfiesNetworkSpecifier() [all …]
|
/packages/modules/Wifi/framework/java/android/net/wifi/aware/ |
D | WifiAwareAgentNetworkSpecifier.java | 53 public WifiAwareAgentNetworkSpecifier(WifiAwareNetworkSpecifier ns) { in WifiAwareAgentNetworkSpecifier() argument 55 mNetworkSpecifiers.add(convert(ns)); in WifiAwareAgentNetworkSpecifier() 60 for (WifiAwareNetworkSpecifier ns : nss) { in WifiAwareAgentNetworkSpecifier() 61 mNetworkSpecifiers.add(convert(ns)); in WifiAwareAgentNetworkSpecifier() 139 public boolean satisfiesAwareNetworkSpecifier(WifiAwareNetworkSpecifier ns) { in satisfiesAwareNetworkSpecifier() argument 140 if (VDBG) Log.v(TAG, "satisfiesAwareNetworkSpecifier: ns=" + ns); in satisfiesAwareNetworkSpecifier() 141 ByteArrayWrapper nsBytes = convert(ns); in satisfiesAwareNetworkSpecifier() 159 private ByteArrayWrapper convert(WifiAwareNetworkSpecifier ns) { in convert() argument 165 ns.writeToParcel(parcel, 0); in convert()
|
/packages/apps/LegacyCamera/jni/feature_stab/db_vlvm/ |
D | db_utilities_poly.cpp | 100 double lz,ms,ns,mn,m,n,lz_through2; in db_SolveQuartic() local 144 ns=lz_through2*lz_through2-c0; in db_SolveQuartic() 147 if((ms>=0.0)&&(ns>=0.0)) in db_SolveQuartic() 150 n=sqrt(ns)*db_sign(mn); in db_SolveQuartic() 172 double lz,ms,ns,mn,m,n,lz_through2; in db_SolveQuarticForced() local 216 ns=lz_through2*lz_through2-c0; in db_SolveQuarticForced() 220 if(ns<0.0) ns=0.0; in db_SolveQuarticForced() 223 n=sqrt(ns)*db_sign(mn); in db_SolveQuarticForced()
|
/packages/modules/Wifi/framework/tests/src/android/net/wifi/aware/ |
D | WifiAwareManagerTest.java | 1026 WifiAwareNetworkSpecifier ns = in testNetworkSpecifierWithClient() local 1034 equalTo(ns.role)); in testNetworkSpecifierWithClient() 1035 collector.checkThat("client_id", clientId, equalTo(ns.clientId)); in testNetworkSpecifierWithClient() 1036 collector.checkThat("session_id", sessionId, equalTo(ns.sessionId)); in testNetworkSpecifierWithClient() 1037 collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId)); in testNetworkSpecifierWithClient() 1048 ns = (WifiAwareNetworkSpecifier) publishSession.getValue().createNetworkSpecifierPmk( in testNetworkSpecifierWithClient() 1055 equalTo(ns.role)); in testNetworkSpecifierWithClient() 1056 collector.checkThat("client_id", clientId, equalTo(ns.clientId)); in testNetworkSpecifierWithClient() 1057 collector.checkThat("session_id", sessionId, equalTo(ns.sessionId)); in testNetworkSpecifierWithClient() 1058 collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId)); in testNetworkSpecifierWithClient() [all …]
|
D | WifiAwareAgentNetworkSpecifierTest.java | 69 for (WifiAwareNetworkSpecifier ns : nsSet) { in testParcel() 70 assertTrue(dut.satisfiesAwareNetworkSpecifier(ns)); in testParcel() 71 assertTrue(rereadDut.satisfiesAwareNetworkSpecifier(ns)); in testParcel() 81 WifiAwareNetworkSpecifier ns = getMockNetworkSpecifier(6); in testEmptyDoesntMatchAnything() local 82 collector.checkThat("No match expected", ns.canBeSatisfiedBy(dut), equalTo(false)); in testEmptyDoesntMatchAnything()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/ |
D | WifiAwareDataPathStateManagerTest.java | 1325 WifiAwareNetworkSpecifier ns = in testDataPathInitiatorResponderMismatchUtility() local 1327 ns = new WifiAwareNetworkSpecifier( in testDataPathInitiatorResponderMismatchUtility() 1328 ns.type, in testDataPathInitiatorResponderMismatchUtility() 1329 1 - ns.role, // corruption hack in testDataPathInitiatorResponderMismatchUtility() 1330 ns.clientId, in testDataPathInitiatorResponderMismatchUtility() 1331 ns.sessionId, in testDataPathInitiatorResponderMismatchUtility() 1332 ns.peerId, in testDataPathInitiatorResponderMismatchUtility() 1333 ns.peerMac, in testDataPathInitiatorResponderMismatchUtility() 1334 ns.pmk, in testDataPathInitiatorResponderMismatchUtility() 1335 ns.passphrase, in testDataPathInitiatorResponderMismatchUtility() [all …]
|
D | WifiAwareMetricsTest.java | 490 WifiAwareNetworkSpecifier ns = addNetworkInfoToCache(networkRequestCache, 11, uid2, in testDataPathMetrics() local 511 networkRequestCache.remove(ns); in testDataPathMetrics() 703 WifiAwareNetworkSpecifier ns = new WifiAwareNetworkSpecifier(0, 0, 0, index, 0, null, null, in addNetworkInfoToCache() local 707 anri.networkSpecifier = ns; in addNetworkInfoToCache() 713 networkRequestCache.put(ns, anri); in addNetworkInfoToCache() 714 return ns; in addNetworkInfoToCache()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WifiScoreReportTest.java | 424 public boolean matches(NetworkScore ns) { in testExternalScorerWhileLingering_sendLingeringScore() 425 return ns.getLegacyInt() == 49 && ns.isExiting() && ns.isTransportPrimary(); in testExternalScorerWhileLingering_sendLingeringScore() 510 NetworkScore ns = scoreCaptor.getValue(); in giveUpOnBadRssiWhenDataIsNotMoving() 511 assertEquals(score, ns.getLegacyInt()); in giveUpOnBadRssiWhenDataIsNotMoving() 512 assertTrue(ns.isExiting()); in giveUpOnBadRssiWhenDataIsNotMoving() 513 assertTrue(ns.isTransportPrimary()); in giveUpOnBadRssiWhenDataIsNotMoving() 1358 NetworkScore ns = scoreCaptor.getValue(); in verifyNudCheckAndScoreIfToggleOffForAospScorer() local 1359 assertEquals(51, ns.getLegacyInt()); in verifyNudCheckAndScoreIfToggleOffForAospScorer() 1360 assertFalse(ns.isExiting()); in verifyNudCheckAndScoreIfToggleOffForAospScorer() 1361 assertTrue(ns.isTransportPrimary()); in verifyNudCheckAndScoreIfToggleOffForAospScorer() [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | XmpInterface.java | 96 final String ns = parser.getNamespace(); in XmpInterface() local 99 if (NS_RDF.equals(ns) && NAME_DESCRIPTION.equals(name)) { in XmpInterface() 108 } else if (NS_DC.equals(ns) && NAME_FORMAT.equals(name)) { in XmpInterface() 110 } else if (NS_XMPMM.equals(ns) && NAME_DOCUMENT_ID.equals(name)) { in XmpInterface() 112 } else if (NS_XMPMM.equals(ns) && NAME_INSTANCE_ID.equals(name)) { in XmpInterface() 114 } else if (NS_XMPMM.equals(ns) && NAME_ORIGINAL_DOCUMENT_ID.equals(name)) { in XmpInterface() 116 } else if (NS_EXIF.equals(ns) && redactedExifTags.contains(name)) { in XmpInterface()
|
/packages/apps/Nfc/nci/jni/ |
D | CondVar.cpp | 104 long ns = absoluteTime.tv_nsec + ((millisec % 1000) * 1000000); in wait() local 105 if (ns > 1000000000) { in wait() 107 absoluteTime.tv_nsec = ns - 1000000000; in wait() 109 absoluteTime.tv_nsec = ns; in wait()
|
/packages/modules/Connectivity/Tethering/tests/privileged/src/android/net/ip/ |
D | DadProxyTest.java | 305 ByteBuffer ns = createDadPacket(NeighborPacketForwarder.ICMPV6_NEIGHBOR_SOLICITATION); in testNsForwardingFromTetherToUpstream() local 307 ByteBuffer out = copy(ns); in testNsForwardingFromTetherToUpstream() 310 receivePacketAndExpectForwarded(ns, mTetheredPacketReader, out, mUpstreamPacketReader); in testNsForwardingFromTetherToUpstream() 316 ByteBuffer ns = createDadPacket(NeighborPacketForwarder.ICMPV6_NEIGHBOR_SOLICITATION); in testNsForwardingFromUpstreamToTether() local 318 ByteBuffer out = copy(ns); in testNsForwardingFromUpstreamToTether() 319 updateSrcMac(ns, mUpstreamParams); in testNsForwardingFromUpstreamToTether() 321 receivePacketAndExpectNotForwarded(ns, mUpstreamPacketReader, out, mTetheredPacketReader); in testNsForwardingFromUpstreamToTether()
|
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/ |
D | Pyramid.cpp | 209 ImageTypeShortBase *s, *ns, *ls, *p, *np; in BorderReduceOdd() local 213 ns = s + scr->pitch; in BorderReduceOdd() 220 for (; s < ls; s = ns, ns += scr->pitch, p = np, np += in->pitch) { in BorderReduceOdd() 231 ns = s + out->pitch; in BorderReduceOdd() 237 for (; s < ls; s = ns, ns += out->pitch, p = np, np += pitch2) { in BorderReduceOdd()
|
/packages/modules/Connectivity/tests/common/java/android/net/ |
D | NetworkSpecifierTest.kt | 48 val ns: TestNetworkSpecifier = TestNetworkSpecifier() in canBeSatisfiedBy() constant 49 val redactNs = ns.redact() in canBeSatisfiedBy() 51 assertEquals(ns.intData, redactNs.intData) in canBeSatisfiedBy() 52 assertNotEquals(ns.stringData, redactNs.stringData) in canBeSatisfiedBy()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/ |
D | WifiNetworkFactory.java | 694 NetworkSpecifier ns = networkRequest.getNetworkSpecifier(); in acceptRequest() local 695 if (ns == null) { in acceptRequest() 699 if (!(ns instanceof WifiNetworkSpecifier)) { in acceptRequest() 700 Log.e(TAG, "Unsupported network specifier: " + ns + ". Rejecting"); in acceptRequest() 761 NetworkSpecifier ns = networkRequest.getNetworkSpecifier(); in needNetworkFor() local 762 if (ns == null) { in needNetworkFor() 769 if (!(ns instanceof WifiNetworkSpecifier)) { in needNetworkFor() 770 Log.e(TAG, "Unsupported network specifier: " + ns + ". Ignoring"); in needNetworkFor() 796 WifiNetworkSpecifier wns = (WifiNetworkSpecifier) ns; in needNetworkFor() 824 NetworkSpecifier ns = networkRequest.getNetworkSpecifier(); in releaseNetworkFor() local [all …]
|
D | WifiScoreCard.java | 1834 NetworkStats ns; in finishPendingRead() 1836 ns = NetworkStats.parseFrom(serialized); in finishPendingRead() 1841 mergeNetworkStatsFromMemory(ns); in finishPendingRead() 1845 PerNetwork mergeNetworkStatsFromMemory(@NonNull NetworkStats ns) { in mergeNetworkStatsFromMemory() argument 1846 if (ns.hasId() && this.id != ns.getId()) { in mergeNetworkStatsFromMemory() 1849 if (ns.hasRecentStats()) { in mergeNetworkStatsFromMemory() 1850 ConnectionStats recentStats = ns.getRecentStats(); in mergeNetworkStatsFromMemory() 1853 if (ns.hasStatsCurrBuild()) { in mergeNetworkStatsFromMemory() 1854 ConnectionStats statsCurr = ns.getStatsCurrBuild(); in mergeNetworkStatsFromMemory() 1858 if (ns.hasStatsPrevBuild()) { in mergeNetworkStatsFromMemory() [all …]
|
/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/util/ |
D | TetheringUtilsTest.java | 175 final ByteBuffer ns = Ipv6Utils.buildNsPacket(mac1, mac2, ll1, ll2, ll1); in testIcmpSocketFilters() local 185 received = checkIcmpSocketFilter(ns /* passed */, rs /* dropped */, in testIcmpSocketFilters()
|