/packages/apps/Bluetooth/jni/ |
D | com_android_bluetooth_hfpclient.cpp | 57 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() local 58 if (!addr) { in marshall_bda() 62 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 64 return addr; in marshall_bda() 74 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_cb() local 75 if (!addr.get()) return; in connection_state_cb() 80 addr.get()); in connection_state_cb() 88 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in audio_state_cb() local 89 if (!addr.get()) return; in audio_state_cb() 92 (jint)state, addr.get()); in audio_state_cb() [all …]
|
D | com_android_bluetooth_hfp.cpp | 63 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() local 64 if (!addr) { in marshall_bda() 68 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 70 return addr; in marshall_bda() 89 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in ConnectionStateCallback() local 90 if (!addr.get()) return; in ConnectionStateCallback() 93 (jint)state, addr.get()); in ConnectionStateCallback() 104 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in AudioStateCallback() local 105 if (!addr.get()) return; in AudioStateCallback() 108 (jint)state, addr.get()); in AudioStateCallback() [all …]
|
D | com_android_bluetooth_avrcp_controller.cpp | 72 ScopedLocalRef<jbyteArray> addr( in btavrcp_passthrough_response_callback() local 74 if (!addr.get()) { in btavrcp_passthrough_response_callback() 79 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in btavrcp_passthrough_response_callback() 82 (jint)id, (jint)pressed, addr.get()); in btavrcp_passthrough_response_callback() 110 ScopedLocalRef<jbyteArray> addr( in btavrcp_connection_state_callback() local 112 if (!addr.get()) { in btavrcp_connection_state_callback() 117 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in btavrcp_connection_state_callback() 121 addr.get()); in btavrcp_connection_state_callback() 135 ScopedLocalRef<jbyteArray> addr( in btavrcp_get_rcfeatures_callback() local 137 if (!addr.get()) { in btavrcp_get_rcfeatures_callback() [all …]
|
D | com_android_bluetooth_hid_host.cpp | 44 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() local 45 if (!addr) { in marshall_bda() 49 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 51 return addr; in marshall_bda() 63 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_callback() local 64 if (!addr.get()) { in connection_state_callback() 70 addr.get(), (jint)state); in connection_state_callback() 88 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in get_protocol_mode_callback() local 89 if (!addr.get()) { in get_protocol_mode_callback() 95 addr.get(), (jint)mode); in get_protocol_mode_callback() [all …]
|
D | com_android_bluetooth_btservice_AdapterService.cpp | 209 ScopedLocalRef<jbyteArray> addr( in remote_device_properties_callback() local 211 if (!addr.get()) { in remote_device_properties_callback() 216 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in remote_device_properties_callback() 226 method_devicePropertyChangedCallback, addr.get(), in remote_device_properties_callback() 235 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), NULL); in device_found_callback() local 239 addr.reset(sCallbackEnv->NewByteArray(properties[i].len)); in device_found_callback() 240 if (!addr.get()) { in device_found_callback() 244 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, properties[i].len, in device_found_callback() 249 if (!addr.get()) { in device_found_callback() 262 addr.get()); in device_found_callback() [all …]
|
D | com_android_bluetooth_a2dp_sink.cpp | 41 ScopedLocalRef<jbyteArray> addr( in bta2dp_connection_state_callback() local 43 if (!addr.get()) { in bta2dp_connection_state_callback() 48 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in bta2dp_connection_state_callback() 51 addr.get(), (jint)state); in bta2dp_connection_state_callback() 60 ScopedLocalRef<jbyteArray> addr( in bta2dp_audio_state_callback() local 62 if (!addr.get()) { in bta2dp_audio_state_callback() 67 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in bta2dp_audio_state_callback() 70 addr.get(), (jint)state); in bta2dp_audio_state_callback() 80 ScopedLocalRef<jbyteArray> addr( in bta2dp_audio_config_callback() local 82 if (!addr.get()) { in bta2dp_audio_config_callback() [all …]
|
D | com_android_bluetooth_a2dp.cpp | 62 ScopedLocalRef<jbyteArray> addr( in bta2dp_connection_state_callback() local 64 if (!addr.get()) { in bta2dp_connection_state_callback() 70 addr.get(), 0, sizeof(RawAddress), in bta2dp_connection_state_callback() 73 addr.get(), (jint)state); in bta2dp_connection_state_callback() 84 ScopedLocalRef<jbyteArray> addr( in bta2dp_audio_state_callback() local 86 if (!addr.get()) { in bta2dp_audio_state_callback() 92 addr.get(), 0, sizeof(RawAddress), in bta2dp_audio_state_callback() 95 addr.get(), (jint)state); in bta2dp_audio_state_callback() 151 ScopedLocalRef<jbyteArray> addr( in bta2dp_audio_config_callback() local 153 if (!addr.get()) { in bta2dp_audio_config_callback() [all …]
|
D | com_android_bluetooth_hearing_aid.cpp | 53 ScopedLocalRef<jbyteArray> addr( in OnConnectionState() local 55 if (!addr.get()) { in OnConnectionState() 60 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnConnectionState() 63 (jint)state, addr.get()); in OnConnectionState() 75 ScopedLocalRef<jbyteArray> addr( in OnDeviceAvailable() local 77 if (!addr.get()) { in OnDeviceAvailable() 82 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnDeviceAvailable() 86 addr.get()); in OnDeviceAvailable() 166 jbyte* addr = env->GetByteArrayElements(address, nullptr); in connectHearingAidNative() local 167 if (!addr) { in connectHearingAidNative() [all …]
|
D | com_android_bluetooth_pan.cpp | 50 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() local 51 if (!addr) { in marshall_bda() 55 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 57 return addr; in marshall_bda() 88 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_callback() local 89 if (!addr.get()) { in connection_state_callback() 94 addr.get(), (jint)state, (jint)error, in connection_state_callback() 195 jbyte* addr = env->GetByteArrayElements(address, NULL); in connectPanNative() local 196 if (!addr) { in connectPanNative() 202 bt_status_t status = sPanIf->connect((RawAddress*)addr, src_role, dest_role); in connectPanNative() [all …]
|
D | com_android_bluetooth_hid_device.cpp | 44 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() local 45 if (!addr) { in marshall_bda() 49 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 51 return addr; in marshall_bda() 64 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), NULL); in application_state_callback() local 67 addr.reset(marshall_bda(bd_addr)); in application_state_callback() 68 if (!addr.get()) { in application_state_callback() 75 addr.get(), registered); in application_state_callback() 82 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_callback() local 83 if (!addr.get()) { in connection_state_callback() [all …]
|
D | com_android_bluetooth_sdp.cpp | 107 jbyte* addr = env->GetByteArrayElements(address, NULL); in sdpSearchNative() local 108 if (addr == NULL) { in sdpSearchNative() 116 env->ReleaseByteArrayElements(address, addr, 0); in sdpSearchNative() 122 (RawAddress*)addr, Uuid::From128BitBE((uint8_t*)uuid)); in sdpSearchNative() 127 if (addr) env->ReleaseByteArrayElements(address, addr, 0); in sdpSearchNative() 138 ScopedLocalRef<jbyteArray> addr( in sdp_search_callback() local 140 if (!addr.get()) return; in sdp_search_callback() 146 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in sdp_search_callback() 168 addr.get(), uuid.get(), (jint)record->mas.mas_instance_id, in sdp_search_callback() 179 addr.get(), uuid.get(), (jint)record->mns.hdr.l2cap_psm, in sdp_search_callback() [all …]
|
/packages/modules/NetworkStack/src/android/net/dhcp/ |
D | DhcpLeaseRepository.java | 168 final Inet4Address addr = it.next().getKey(); in cleanMap() local 169 if (!isValidAddress(addr) || mReservedAddrs.contains(addr)) { in cleanMap() 244 @Nullable Inet4Address addr) { in isIpAddrOutsidePrefix() argument 245 return addr != null && !addr.equals(IPV4_ADDR_ANY) && !prefix.contains(addr); in isIpAddrOutsidePrefix() 327 @NonNull Inet4Address addr, @Nullable String hostname, long currentTime) in checkClientAndMakeLease() argument 330 final DhcpLease currentLease = mCommittedLeases.getOrDefault(addr, null); in checkClientAndMakeLease() 337 if (isValidAddress(addr) && !mReservedAddrs.contains(addr)) { in checkClientAndMakeLease() 338 lease = new DhcpLease(clientId, hwAddr, addr, mPrefixLength, expTime, hostname); in checkClientAndMakeLease() 367 @NonNull Inet4Address addr) { in releaseLease() argument 368 final DhcpLease currentLease = mCommittedLeases.getOrDefault(addr, null); in releaseLease() [all …]
|
D | DhcpPacketListener.java | 71 final InetSocketAddress addr = new InetSocketAddress(0); in readPacket() local 73 fd, packetBuffer.mBytes, 0, packetBuffer.mBytes.length, 0 /* flags */, addr); in readPacket() 76 packetBuffer.mSrcAddr = inet4AddrOrNull(addr); in readPacket() 77 packetBuffer.mSrcPort = addr.getPort(); in readPacket() 82 private static Inet4Address inet4AddrOrNull(@NonNull InetSocketAddress addr) { in inet4AddrOrNull() argument 83 return addr.getAddress() instanceof Inet4Address in inet4AddrOrNull() 84 ? (Inet4Address) addr.getAddress() in inet4AddrOrNull()
|
D | DhcpServingParams.java | 162 for (int addr : addrs) { in toInet4AddressSet() 163 res.add(intToInet4AddressHTH(addr)); in toInet4AddressSet() 388 for (Inet4Address addr : mDefaultRouters) { in build() 389 if (!prefix.contains(addr)) { in build() 391 "Default router %s is not in server prefix %s", addr, mServerAddr)); in build() 415 static IpPrefix makeIpPrefix(@NonNull LinkAddress addr) { in makeIpPrefix() argument 416 return new IpPrefix(addr.getAddress(), addr.getPrefixLength()); in makeIpPrefix()
|
/packages/modules/NetworkStack/common/moduleutils/src/android/net/shared/ |
D | InitialConfiguration.java | 79 for (LinkAddress addr : ipAddresses) { in isValid() 80 if (!any(directlyConnectedRoutes, (p) -> p.contains(addr.getAddress()))) { in isValid() 85 for (InetAddress addr : dnsServers) { in isValid() 86 if (!any(directlyConnectedRoutes, (p) -> p.contains(addr))) { in isValid() 128 for (LinkAddress addr : ipAddresses) { in isProvisionedBy() 129 if (!any(addresses, (addrSeen) -> addr.isSameAddressAs(addrSeen))) { in isProvisionedBy() 184 private static boolean isPrefixLengthCompliant(LinkAddress addr) { in isPrefixLengthCompliant() argument 185 return isIPv4(addr) || isCompliantIPv6PrefixLength(addr.getPrefixLength()); in isPrefixLengthCompliant() 201 private static boolean isIPv4(LinkAddress addr) { in isIPv4() argument 202 return addr.getAddress() instanceof Inet4Address; in isIPv4() [all …]
|
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/shared/ |
D | IpConfigurationParcelableUtil.java | 35 public static String parcelAddress(@Nullable InetAddress addr) { in parcelAddress() argument 36 if (addr == null) return null; in parcelAddress() 37 return addr.getHostAddress(); in parcelAddress() 44 public static InetAddress unparcelAddress(@Nullable String addr) { in unparcelAddress() argument 45 if (addr == null) return null; in unparcelAddress() 46 return InetAddresses.parseNumericAddress(addr); in unparcelAddress()
|
/packages/modules/DnsResolver/ |
D | getaddrinfo.cpp | 181 #define GET_AI(ai, afd, addr) \ argument 184 (ai) = get_ai(pai, (afd), (addr)); \ 247 sockaddr_union addr = {.sin6 = sin6_test}; in have_ipv6() local 248 return _find_src_addr(&addr.sa, NULL, mark, uid) == 1; in have_ipv6() 256 sockaddr_union addr = {.sin = sin_test}; in have_ipv4() local 257 return _find_src_addr(&addr.sa, NULL, mark, uid) == 1; in have_ipv4() 617 const char *cp, *scope, *addr; in explore_numeric_scope() local 647 addr = hostname2; in explore_numeric_scope() 650 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope() 683 const char* addr) { in get_ai() argument [all …]
|
D | gethnamaddr.cpp | 475 int resolv_gethostbyaddr(const void* addr, socklen_t len, int af, hostent* hp, char* buf, in resolv_gethostbyaddr() argument 478 const uint8_t* uaddr = (const uint8_t*)addr; in resolv_gethostbyaddr() 482 _DIAGASSERT(addr != NULL); in resolv_gethostbyaddr() 485 (IN6_IS_ADDR_LINKLOCAL((const struct in6_addr*) addr) || in resolv_gethostbyaddr() 486 IN6_IS_ADDR_SITELOCAL((const struct in6_addr*) addr))) { in resolv_gethostbyaddr() 490 (IN6_IS_ADDR_V4MAPPED((const struct in6_addr*) addr) || in resolv_gethostbyaddr() 491 IN6_IS_ADDR_V4COMPAT((const struct in6_addr*) addr))) { in resolv_gethostbyaddr() 494 addr = uaddr; in resolv_gethostbyaddr()
|
/packages/apps/Messaging/src/android/support/v7/mms/ |
D | MmsRequest.java | 300 for (final InetAddress addr : InetAddress.getAllByName(host)) { in requestRoute() 301 final boolean requested = requestRouteToHostAddress(connectivityManager, addr); in requestRoute() 304 Log.i(MmsService.TAG, "Requested route to " + addr); in requestRoute() 306 Log.i(MmsService.TAG, "Could not requested route to " + addr); in requestRoute() 366 final byte [] addr = inetAddr.getAddress(); in inetAddressToInt() 367 return ((addr[3] & 0xff) << 24) | ((addr[2] & 0xff) << 16) | in inetAddressToInt() 368 ((addr[1] & 0xff) << 8) | (addr[0] & 0xff); in inetAddressToInt()
|
D | DefaultApnSettingsLoader.java | 451 private static String trimV4AddrZeros(final String addr) { in trimV4AddrZeros() argument 452 if (addr == null) { in trimV4AddrZeros() 455 final String[] octets = addr.split("\\."); in trimV4AddrZeros() 457 return addr; in trimV4AddrZeros() 464 return addr; in trimV4AddrZeros() 468 return addr; in trimV4AddrZeros()
|
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/ipmemorystore/ |
D | NetworkAttributes.java | 143 final InetAddress addr = getByAddressOrNull(b.data); in blobArrayToInetAddressList() local 144 if (null != addr) list.add(addr); in blobArrayToInetAddressList() 154 final InetAddress addr = addresses.get(i); in inetAddressListToBlobArray() local 155 if (null == addr) continue; in inetAddressListToBlobArray() 157 b.data = addr.getAddress(); in inetAddressListToBlobArray() 362 for (final InetAddress addr : dnsAddresses) { in toString() 363 resultJoiner.add(addr.getHostAddress()); in toString()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/pan/ |
D | PanService.java | 209 BluetoothDevice device = getDevice(cs.addr); 502 this.addr = address; in ConnectState() 509 public byte[] addr; field in PanService.ConnectState 698 InetAddress addr = null; in configureBtIface() local 700 if (linkAddr == null || (addr = linkAddr.getAddress()) == null || addr.equals( in configureBtIface() 701 InetAddresses.parseNumericAddress("0.0.0.0")) || addr.equals( in configureBtIface() 704 addr = InetAddresses.parseNumericAddress(address); in configureBtIface() 707 ifcg.setLinkAddress(new LinkAddress(addr, BLUETOOTH_PREFIX_LENGTH)); in configureBtIface()
|
/packages/modules/NetworkStack/src/com/android/server/ |
D | NetworkObserverRegistry.java | 133 public void onInterfaceAddressUpdated(String addr, String ifName, int flags, int scope) { in onInterfaceAddressUpdated() argument 134 final LinkAddress address = new LinkAddress(addr, flags, scope); in onInterfaceAddressUpdated() 139 public void onInterfaceAddressRemoved(String addr, in onInterfaceAddressRemoved() argument 141 final LinkAddress address = new LinkAddress(addr, flags, scope); in onInterfaceAddressRemoved()
|
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/details/ |
D | WifiIpAddressPreferenceController.java | 46 for (LinkAddress addr : getWifiInfoProvider().getLinkProperties().getLinkAddresses()) { in updateState() 47 if (addr.getAddress() instanceof Inet4Address) { in updateState() 48 ipv4Address = addr.getAddress().getHostAddress(); in updateState()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ |
D | BondStateMachine.java | 286 byte[] addr = Utils.getBytesFromAddress(dev.getAddress()); in cancelBond() 287 if (!mAdapterService.cancelBondNative(addr)) { in cancelBond() 299 byte[] addr = Utils.getBytesFromAddress(dev.getAddress()); in removeBond() 300 if (!mAdapterService.removeBondNative(addr)) { in removeBond() 317 byte[] addr = Utils.getBytesFromAddress(dev.getAddress()); in createBond() 320 result = mAdapterService.createBondOutOfBandNative(addr, transport, oobData); in createBond() 322 result = mAdapterService.createBondNative(addr, transport); in createBond()
|