/packages/apps/TV/tuner/src/com/android/tv/tuner/util/ |
D | ByteArrayBuffer.java | 41 private int len; field in ByteArrayBuffer 53 System.arraycopy(this.buffer, 0, newbuffer, 0, this.len); in expand() 57 public void append(final byte[] b, int off, int len) { in append() argument 63 || (len < 0) in append() 64 || ((off + len) < 0) in append() 65 || ((off + len) > b.length)) { in append() 68 if (len == 0) { in append() 71 int newlen = this.len + len; in append() 75 System.arraycopy(b, off, this.buffer, this.len, len); in append() 76 this.len = newlen; in append() [all …]
|
/packages/modules/DnsResolver/ |
D | sethostent.cpp | 71 size_t len, num, i; in _hf_gethtbyname2() local 85 if ((ptr = buf = (char*) malloc(len = info->buflen)) == NULL) { in _hf_gethtbyname2() 119 HENT_SCOPY(hent.h_name, hp->h_name, ptr, len); in _hf_gethtbyname2() 122 HENT_SCOPY(aliases[anum], hp->h_aliases[anum], ptr, len); in _hf_gethtbyname2() 129 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr, len); in _hf_gethtbyname2() 145 len = info->buflen; in _hf_gethtbyname2() 150 HENT_ARRAY(hp->h_aliases, anum, ptr, len); in _hf_gethtbyname2() 151 HENT_ARRAY(hp->h_addr_list, num, ptr, len); in _hf_gethtbyname2() 154 HENT_COPY(hp->h_addr_list[i], addr_ptrs[i], hp->h_length, ptr, len); in _hf_gethtbyname2() 158 HENT_COPY(ptr, NAT64_PAD, sizeof(NAT64_PAD), ptr, len); in _hf_gethtbyname2() [all …]
|
D | hostent.h | 43 int _hf_gethtbyaddr(const unsigned char* uaddr, int len, int af, getnamaddr* info); 50 #define HENT_ARRAY(dst, anum, ptr, len) do { \ argument 52 if (_len > len) goto nospc; \ 55 len -= _len; \ 58 #define HENT_COPY(dst, src, slen, ptr, len) do { \ argument 59 if ((size_t) slen > len) goto nospc; \ 63 len -= slen; \ 66 #define HENT_SCOPY(dst, src, ptr, len) do { \ argument 68 HENT_COPY(dst, src, _len, ptr, len); \
|
D | gethnamaddr.cpp | 112 static int dns_gethtbyaddr(const unsigned char* uaddr, int len, int af, 475 int resolv_gethostbyaddr(const void* addr, socklen_t len, int af, hostent* hp, char* buf, in resolv_gethostbyaddr() argument 484 if (af == AF_INET6 && len == NS_IN6ADDRSZ && in resolv_gethostbyaddr() 489 if (af == AF_INET6 && len == NS_IN6ADDRSZ && in resolv_gethostbyaddr() 496 len = NS_INADDRSZ; in resolv_gethostbyaddr() 508 if (size != len) { in resolv_gethostbyaddr() 518 if (_hf_gethtbyaddr(uaddr, len, af, &info)) { in resolv_gethostbyaddr() 519 int error = dns_gethtbyaddr(uaddr, len, af, netcontext, &info, event); in resolv_gethostbyaddr() 532 int af, len; in netbsd_gethostent_r() local 566 len = NS_IN6ADDRSZ; in netbsd_gethostent_r() [all …]
|
D | res_send.cpp | 758 uint16_t len = htons(static_cast<uint16_t>(buflen)); in send_vc() local 760 {.iov_base = &len, .iov_len = INT16SZ}, in send_vc() 774 len = INT16SZ; in send_vc() 775 while ((n = read(statp->tcp_nssock, (char*)cp, (size_t)len)) > 0) { in send_vc() 777 if ((len -= n) == 0) break; in send_vc() 802 len = anssiz; in send_vc() 804 len = resplen; in send_vc() 805 if (len < HFIXEDSZ) { in send_vc() 809 LOG(DEBUG) << __func__ << ": undersized: " << len; in send_vc() 815 while (len != 0 && (n = read(statp->tcp_nssock, (char*)cp, (size_t)len)) > 0) { in send_vc() [all …]
|
/packages/apps/Gallery2/jni/filters/ |
D | kmeans.h | 26 inline void sum(T values[], int len, int dimension, int stride, N dst[]) { in sum() argument 32 for (x = 0; x < len; x+= stride) { in sum() 88 void initialPickHeuristicRandom(int k, T values[], int len, int dimension, int stride, T dst[], in initialPickHeuristicRandom() argument 91 num_vals = len / stride; in initialPickHeuristicRandom() 141 int calculateNewCentroids(int k, T values[], int len, int dimension, int stride, T oldCenters[], in calculateNewCentroids() argument 156 for (x = 0; x < len; x+=stride) { in calculateNewCentroids() 179 void runKMeansWithPicks(int k, T finalCentroids[], T values[], int len, int dimension, int stride, in runKMeansWithPicks() argument 194 ret = calculateNewCentroids<T, N>(k, values, len, dimension, stride, c1, c2); in runKMeansWithPicks() 209 void runKMeans(int k, T finalCentroids[], T values[], int len, int dimension, int stride, in runKMeans() argument 213 initialPickHeuristicRandom<T>(k, values, len, dimension, stride, initialPicks, seed); in runKMeans() [all …]
|
D | kmeans.cc | 49 int len = swidth * sheight * 4; in JNIFUNCF() local 58 runKMeans<unsigned char, int>(k, finalCentroids, small_ds, len, dimension, in JNIFUNCF() 62 len = lwidth * lheight * 4; in JNIFUNCF() 67 runKMeansWithPicks<unsigned char, int>(k, nextCentroids, large_ds, len, in JNIFUNCF() 70 len = width * height * 4; in JNIFUNCF() 73 applyCentroids<unsigned char, int>(k, nextCentroids, dst, len, dimension, stride); in JNIFUNCF()
|
/packages/apps/Nfc/src/com/android/nfc/handover/ |
D | HandoverDataParser.java | 406 int len = payload.get(); in parseBtOob() local 410 nameBytes = new byte[len - 1]; in parseBtOob() 417 nameBytes = new byte[len - 1]; in parseBtOob() 428 result.uuids = parseUuidFromBluetoothRecord(payload, type, len - 1); in parseBtOob() 434 if (len - 1 != CLASS_OF_DEVICE_SIZE) { in parseBtOob() 446 payload.position(payload.position() + len - 1); in parseBtOob() 466 int len = payload.get(); in parseBleOob() local 493 byte[] nameBytes = new byte[len - 1]; in parseBleOob() 498 if (len-1 != SECURITY_MANAGER_TK_SIZE) { in parseBleOob() 504 byte[] securityManagerTK = new byte[len - 1]; in parseBleOob() [all …]
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder.cpp | 56 std::string str2hex(const char* buffer, size_t len) { in str2hex() argument 57 std::string str(len * 2, '\0'); in str2hex() 58 for (size_t i = 0; i < len; ++i) { in str2hex() 178 const size_t len = dot_pos - pos; in write() local 179 if (len >= 256) { in write() 180 LOG(ERROR) << "name component '" << name.substr(pos, dot_pos - pos) << "' is " << len in write() 184 if (buffer_cur + sizeof(uint8_t) + len > buffer_end) { in write() 188 *buffer_cur++ = len; in write() 256 int len = snprintf(buffer, sizeof(buffer), "Q<%s,%s,%s>", qname.name.c_str(), in toString() local 258 return std::string(buffer, len); in toString() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/archives/ |
D | ArchiveEntryInputStream.java | 51 public int read(byte[] b, int off, int len) throws IOException { in read() argument 53 return mReadSource.read(b, off, len); in read() 75 int read(byte[] b, int off, int len) throws IOException; in read() argument 136 (b, off, len) -> ((SevenZFile) commonArchive).read(b, off, len), in create() 143 (b, off, len) -> inputStream.read(b, off, len), in create() 148 (b, off, len) -> ((ArchiveInputStream) commonArchive).read(b, off, len), in create()
|
/packages/modules/IPsec/src/java/com/android/internal/net/utils/ |
D | BigIntegerUtils.java | 53 int len = byteArrayWithSignBit.length; in bigIntegerToUnsignedByteArray() local 62 len = len - 1; in bigIntegerToUnsignedByteArray() 63 System.arraycopy(byteArrayWithSignBit, 1, output, size - len, len); in bigIntegerToUnsignedByteArray() 65 System.arraycopy(byteArrayWithSignBit, 0, output, size - len, len); in bigIntegerToUnsignedByteArray()
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/internal/ |
D | dtoa.h | 34 inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, ui… in GrisuRound() argument 38 buffer[len - 1]--; in GrisuRound() 59 inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* … in DigitGen() argument 66 *len = 0; in DigitGen() 82 if (d || *len) in DigitGen() 83 buffer[(*len)++] = static_cast<char>('0' + static_cast<char>(d)); in DigitGen() 88 … GrisuRound(buffer, *len, delta, tmp, static_cast<uint64_t>(kPow10[kappa]) << -one.e, wp_w.f); in DigitGen() 98 if (d || *len) in DigitGen() 99 buffer[(*len)++] = static_cast<char>('0' + d); in DigitGen() 104 GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-static_cast<int>(kappa)]); in DigitGen()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/calling/ |
D | ListWithEntrySummaryPreferenceTest.java | 69 int len = mDefaultEntries.length; in initialize_defaultEntries_shouldDisplayDefaultEntries() local 70 assertThat(adapter.getCount()).isEqualTo(len); in initialize_defaultEntries_shouldDisplayDefaultEntries() 71 for (int i = 0; i < len; i++) { in initialize_defaultEntries_shouldDisplayDefaultEntries() 88 int len = mCustomEntries.length; in setEntries_customEntries_shouldUpdateEntries() local 89 assertThat(adapter.getCount()).isEqualTo(len); in setEntries_customEntries_shouldUpdateEntries() 90 for (int i = 0; i < len; i++) { in setEntries_customEntries_shouldUpdateEntries() 113 int len = mCustomEntries.length; in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries() local 114 assertThat(adapter.getCount()).isEqualTo(len); in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries() 115 for (int i = 0; i < len; i++) { in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries()
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | IsoInterface.java | 140 final long len = Integer.toUnsignedLong(readInt(fd)); in parseNextBox() local 141 if (len <= 0 || pos + len > end) { in parseNextBox() 142 Log.w(TAG, "Invalid box at " + pos + " of length " + len in parseNextBox() 153 final Box box = new Box(type, new long[] { pos, len }); in parseNextBox() 156 + " at " + pos + " length " + len); in parseNextBox() 166 box.data = new byte[(int) (len - 8 - 16)]; in parseNextBox() 172 box.data = new byte[(int) (len - 8)]; in parseNextBox() 181 while ((child = parseNextBox(fd, pos + len, prefix + " ")) != null) { in parseNextBox() 187 Os.lseek(fd, pos + len, OsConstants.SEEK_SET); in parseNextBox()
|
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/ |
D | AoapInterface.java | 112 int len = conn.controlTransfer( in getProtocol() local 115 if (len != 2) { in getProtocol() 128 int len = conn.controlTransfer( in sendString() local 132 if (len != buffer.length) { in sendString() 140 int len = conn.controlTransfer( in sendAoapStart() local 143 if (len < 0) { in sendAoapStart() 144 throw new IOException("Control transfer for accessory start failed: " + len); in sendAoapStart()
|
/packages/apps/Nfc/nci/jni/extns/pn54x/src/mifare/ |
D | phNxpExtns_MifareStd.cpp | 396 p_data.ndef_data.len = NdefInfo.psUpperNdefMsg->length; in Mfc_ReadNdef_Completion_Routine() 552 NFCSTATUS Mfc_SetReadOnly(uint8_t* secrtkey, uint8_t len) { in Mfc_SetReadOnly() argument 559 memcpy(mif_secrete_key, secrtkey, len); in Mfc_SetReadOnly() 562 for (id = 0; id < len; id++) { in Mfc_SetReadOnly() 723 NFCSTATUS Mfc_WriteNdef(uint8_t* p_data, uint32_t len) { in Mfc_WriteNdef() argument 728 if (p_data == NULL || len == 0) { in Mfc_WriteNdef() 746 } else if (len > NdefInfo.NdefLength) { in Mfc_WriteNdef() 751 NdefInfo.psUpperNdefMsg->length = len; in Mfc_WriteNdef() 753 NdefInfo.AppWrLength = len; in Mfc_WriteNdef() 756 if (0 == len) { in Mfc_WriteNdef() [all …]
|
/packages/apps/Car/libs/ |
D | resource_generator.py | 149 leading_spaces = len(line) - len(stripped) 224 if len(row) == 0: 239 if (len(trimmed) != len(header)): 244 for idx in range(1, len(trimmed)): 247 if len(cell) > 0: 250 if len(var_values.keys()) > 0:
|
/packages/apps/Bluetooth/jni/ |
D | com_android_bluetooth_btservice_AdapterService.cpp | 100 callbackEnv, callbackEnv->NewByteArray(properties[i].len)); in get_properties() 106 callbackEnv->SetByteArrayRegion(propVal.get(), 0, properties[i].len, in get_properties() 239 addr.reset(sCallbackEnv->NewByteArray(properties[i].len)); in device_found_callback() 244 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, properties[i].len, in device_found_callback() 411 static void dut_mode_recv_callback(uint16_t opcode, uint8_t* buf, uint8_t len) { in dut_mode_recv_callback() argument 425 jsize len = 0; in energy_info_recv_callback() local 427 len++; in energy_info_recv_callback() 432 len, android_bluetooth_UidTraffic.clazz, NULL)); in energy_info_recv_callback() 865 int len = env->GetArrayLength(leBtDeviceAddress); in createBondOutOfBandNative() local 866 if (len != OOB_LE_BD_ADDR_SIZE) { in createBondOutOfBandNative() [all …]
|
D | com_android_bluetooth_hid_device.cpp | 100 static void set_report_callback(uint8_t type, uint8_t id, uint16_t len, in set_report_callback() argument 105 sCallbackEnv->NewByteArray(len)); in set_report_callback() 110 sCallbackEnv->SetByteArrayRegion(data.get(), 0, len, (jbyte*)p_data); in set_report_callback() 122 static void intr_data_callback(uint8_t report_id, uint16_t len, in intr_data_callback() argument 127 sCallbackEnv->NewByteArray(len)); in intr_data_callback() 132 sCallbackEnv->SetByteArrayRegion(data.get(), 0, len, (jbyte*)p_data); in intr_data_callback() 237 jsize len = env->GetArrayLength(in); in fill_qos() local 239 if (len != 6) return; in fill_qos() 241 uint32_t* buf = (uint32_t*)calloc(len, sizeof(uint32_t)); in fill_qos() 245 env->GetIntArrayRegion(in, 0, len, (jint*)buf); in fill_qos()
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/ |
D | ByteBufferInputStream.java | 39 public int read(byte[] bytes, int off, int len) { in read() argument 44 len = Math.min(len, mBuf.remaining()); in read() 45 mBuf.get(bytes, off, len); in read() 46 return len; in read()
|
/packages/apps/Camera2/src/com/android/camera/exif/ |
D | ByteBufferInputStream.java | 39 public int read(byte[] bytes, int off, int len) { in read() argument 44 len = Math.min(len, mBuf.remaining()); in read() 45 mBuf.get(bytes, off, len); in read() 46 return len; in read()
|
/packages/apps/Messaging/src/com/android/messaging/util/exif/ |
D | ByteBufferInputStream.java | 39 public int read(byte[] bytes, int off, int len) { in read() argument 44 len = Math.min(len, mBuf.remaining()); in read() 45 mBuf.get(bytes, off, len); in read() 46 return len; in read()
|
/packages/services/Telephony/src/com/android/phone/ |
D | SpecialCharSequenceMgr.java | 158 int len = input.length(); in handleSecretCode() local 159 if (len > 8 && input.startsWith("*#*#") && input.endsWith("#*#*")) { in handleSecretCode() 161 phone.sendDialerSpecialCode(input.substring(4, len - 4)); in handleSecretCode() 178 int len = input.length(); in handleAdnEntry() local 179 if ((len > 1) && (len < 5) && (input.endsWith("#"))) { in handleAdnEntry() 181 int index = Integer.parseInt(input.substring(0, len-1)); in handleAdnEntry()
|
/packages/apps/Nfc/nci/jni/extns/pn54x/src/ |
D | phNxpExtns.cpp | 243 NFCSTATUS EXTNS_MfcSetReadOnly(uint8_t* key, uint8_t len) { in EXTNS_MfcSetReadOnly() argument 250 msg.Size = len; in EXTNS_MfcSetReadOnly() 276 NFCSTATUS EXTNS_MfcWriteNDef(uint8_t* p_data, uint32_t len) { in EXTNS_MfcWriteNDef() argument 283 msg.Size = len; in EXTNS_MfcWriteNDef() 307 NFCSTATUS EXTNS_MfcFormatTag(uint8_t* key, uint8_t len) { in EXTNS_MfcFormatTag() argument 314 msg.Size = len; in EXTNS_MfcFormatTag() 389 NFCSTATUS EXTNS_MfcTransceive(uint8_t* p_data, uint32_t len) { in EXTNS_MfcTransceive() argument 396 msg.Size = len; in EXTNS_MfcTransceive()
|
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/ |
D | EncodedStringValue.java | 207 int len = mData.length; in clone() local 208 byte[] dstBytes = new byte[len]; in clone() 209 System.arraycopy(mData, 0, dstBytes, 0, len); in clone() 255 int len = list.size(); in extract() local 256 if (len > 0) { in extract() 257 return list.toArray(new EncodedStringValue[len]); in extract()
|