/system/bt/service/common/android/bluetooth/ |
D | uuid.cc | 36 ::bluetooth::Uuid::UUID128Bit bytes = uuid.To128BitBE(); in writeToParcel() 39 ((((uint64_t)bytes[0]) << 56) | (((uint64_t)bytes[1]) << 48) | in writeToParcel() 40 (((uint64_t)bytes[2]) << 40) | (((uint64_t)bytes[3]) << 32) | in writeToParcel() 41 (((uint64_t)bytes[4]) << 24) | (((uint64_t)bytes[5]) << 16) | in writeToParcel() 42 (((uint64_t)bytes[6]) << 8) | bytes[7]); in writeToParcel() 45 ((((uint64_t)bytes[8]) << 56) | (((uint64_t)bytes[9]) << 48) | in writeToParcel() 46 (((uint64_t)bytes[10]) << 40) | (((uint64_t)bytes[11]) << 32) | in writeToParcel() 47 (((uint64_t)bytes[12]) << 24) | (((uint64_t)bytes[13]) << 16) | in writeToParcel() 48 (((uint64_t)bytes[14]) << 8) | bytes[15]); in writeToParcel() 58 ::bluetooth::Uuid::UUID128Bit bytes; in readFromParcel() [all …]
|
/system/chre/platform/shared/ |
D | memory_manager.cc | 23 void *MemoryManager::nanoappAlloc(Nanoapp *app, uint32_t bytes) { in nanoappAlloc() argument 25 if (bytes > 0) { in nanoappAlloc() 29 } else if ((mTotalAllocatedBytes + bytes) > kMaxAllocationBytes) { in nanoappAlloc() 34 doAlloc(app, sizeof(AllocHeader) + bytes)); in nanoappAlloc() 37 app->setTotalAllocatedBytes(app->getTotalAllocatedBytes() + bytes); in nanoappAlloc() 38 mTotalAllocatedBytes += bytes; in nanoappAlloc() 43 header->data.bytes = bytes; in nanoappAlloc() 66 if (nanoAppTotalAllocatedBytes >= header->data.bytes) { in nanoappFree() 68 nanoAppTotalAllocatedBytes - header->data.bytes); in nanoappFree() 73 if (mTotalAllocatedBytes >= header->data.bytes) { in nanoappFree() [all …]
|
/system/core/fs_mgr/libfs_avb/tests/ |
D | util_test.cpp | 105 uint8_t bytes[16]; in TEST() local 107 EXPECT_TRUE(HexToBytes((uint8_t*)bytes, sizeof(bytes), hex)); in TEST() 108 for (size_t i = 0; i < sizeof(bytes); i++) { in TEST() 109 EXPECT_EQ(i, bytes[i]); in TEST() 115 uint8_t bytes[16]; in TEST() local 117 EXPECT_TRUE(HexToBytes((uint8_t*)bytes, sizeof(bytes), hex)); in TEST() 118 for (size_t i = 0; i < sizeof(bytes); i++) { in TEST() 119 EXPECT_EQ(16 + i, bytes[i]); in TEST() 124 const uint8_t bytes[16]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; in TEST() local 126 EXPECT_EQ("0102", BytesToHex((uint8_t*)bytes, 2)); in TEST() [all …]
|
/system/nfc/utils/test/ |
D | config_test.cc | 80 auto bytes = config.getBytes("BYTES_VALUE"); in TEST() local 81 EXPECT_EQ(bytes.size(), 5u); in TEST() 82 EXPECT_EQ(bytes[0], 10); in TEST() 83 EXPECT_EQ(bytes[1], 11); in TEST() 84 EXPECT_EQ(bytes[2], 12); in TEST() 85 EXPECT_EQ(bytes[3], 255); in TEST() 86 EXPECT_EQ(bytes[4], 0); in TEST() 128 auto bytes = config.getBytes("BYTES_VALUE"); in TEST_F() local 129 EXPECT_EQ(bytes.size(), 5u); in TEST_F() 130 EXPECT_EQ(bytes[0], 10); in TEST_F() [all …]
|
/system/core/libunwindstack/tests/ |
D | MemoryRangesTest.cpp | 53 size_t bytes = ranges_->Read(0, dst.data(), dst.size()); in TEST_F() local 54 ASSERT_EQ(1000UL, bytes); in TEST_F() 55 for (size_t i = 0; i < bytes; i++) { in TEST_F() 59 bytes = ranges_->Read(2000, dst.data(), dst.size()); in TEST_F() 60 ASSERT_EQ(2000UL, bytes); in TEST_F() 61 for (size_t i = 0; i < bytes; i++) { in TEST_F() 65 bytes = ranges_->Read(4000, dst.data(), dst.size()); in TEST_F() 66 ASSERT_EQ(100UL, bytes); in TEST_F() 67 for (size_t i = 0; i < bytes; i++) { in TEST_F() 83 size_t bytes = ranges_->Read(6000, dst.data(), dst.size()); in TEST_F() local [all …]
|
D | MemoryRemoteTest.cpp | 136 size_t bytes = in TEST_F() local 139 ASSERT_LE(1024U, bytes); in TEST_F() 140 for (size_t i = 0; i < bytes; i++) { in TEST_F() 145 bytes = in TEST_F() 147 ASSERT_EQ(1024U, bytes); in TEST_F() 148 for (size_t i = 0; i < bytes; i++) { in TEST_F() 329 size_t bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping), &value, sizeof(value)); in TEST_F() local 330 ASSERT_EQ(sizeof(value), bytes); in TEST_F() 332 …bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping) + page_size, &value, sizeof(value)); in TEST_F() 333 ASSERT_EQ(sizeof(value), bytes); in TEST_F() [all …]
|
/system/chre/apps/chqts/src/shared/ |
D | nano_endian_test.cc | 28 uint8_t bytes[] = { in swapByteTest() local 37 static_assert(arrayLength(bytes) == arrayLength(postSwap), in swapByteTest() 40 static_assert((kByteCount > 0) && (kByteCount <= arrayLength(bytes)), in swapByteTest() 45 nanoapp_testing::swapBytes(bytes, kByteCount); in swapByteTest() 46 EXPECT_EQ(0, ::memcmp(bytes, kExpected, kByteCount)); in swapByteTest() 48 if (arrayLength(bytes) < kByteCount) { in swapByteTest() 50 EXPECT_EQ(kByteCount + 1, bytes[kByteCount]); in swapByteTest() 95 const uint8_t *bytes = reinterpret_cast<uint8_t*>(&value); in TEST() local 96 EXPECT_EQ(0, ::memcmp(kLittleEndianRepresentation, bytes, in TEST()
|
D | nano_endian.cc | 21 void swapBytes(uint8_t *bytes, size_t size) { in swapBytes() argument 23 uint8_t tmp = bytes[front]; in swapBytes() 24 bytes[front] = bytes[end]; in swapBytes() 25 bytes[end] = tmp; in swapBytes()
|
/system/core/storaged/ |
D | storaged_service.cpp | 51 rec.second.bytes[READ][FOREGROUND][CHARGER_OFF], in dumpUidRecords() 52 rec.second.bytes[WRITE][FOREGROUND][CHARGER_OFF], in dumpUidRecords() 53 rec.second.bytes[READ][BACKGROUND][CHARGER_OFF], in dumpUidRecords() 54 rec.second.bytes[WRITE][BACKGROUND][CHARGER_OFF], in dumpUidRecords() 55 rec.second.bytes[READ][FOREGROUND][CHARGER_ON], in dumpUidRecords() 56 rec.second.bytes[WRITE][FOREGROUND][CHARGER_ON], in dumpUidRecords() 57 rec.second.bytes[READ][BACKGROUND][CHARGER_ON], in dumpUidRecords() 58 rec.second.bytes[WRITE][BACKGROUND][CHARGER_ON]); in dumpUidRecords() 68 uid_usage.bytes[READ][FOREGROUND][CHARGER_OFF], in dumpUidRecordsDebug() 69 uid_usage.bytes[WRITE][FOREGROUND][CHARGER_OFF], in dumpUidRecordsDebug() [all …]
|
D | storaged_uid_monitor.cpp | 112 if (bytes[i][j][k]) in is_zero() 283 if (uid_usage.bytes[READ][FOREGROUND][CHARGER_ON] + in dump() 284 uid_usage.bytes[READ][FOREGROUND][CHARGER_OFF] + in dump() 285 uid_usage.bytes[READ][BACKGROUND][CHARGER_ON] + in dump() 286 uid_usage.bytes[READ][BACKGROUND][CHARGER_OFF] + in dump() 287 uid_usage.bytes[WRITE][FOREGROUND][CHARGER_ON] + in dump() 288 uid_usage.bytes[WRITE][FOREGROUND][CHARGER_OFF] + in dump() 289 uid_usage.bytes[WRITE][BACKGROUND][CHARGER_ON] + in dump() 290 uid_usage.bytes[WRITE][BACKGROUND][CHARGER_OFF] > threshold) { in dump() 332 usage.uid_ios.bytes[READ][FOREGROUND][charger_stat_] += in update_curr_io_stats_locked() [all …]
|
/system/core/fastboot/ |
D | udp.cpp | 60 static uint16_t ExtractUint16(const uint8_t* bytes) { in ExtractUint16() argument 61 return (static_cast<uint16_t>(bytes[0]) << 8) | bytes[1]; in ExtractUint16() 71 const uint8_t* bytes() const { return bytes_; } in bytes() function in udp::Header 228 ssize_t bytes = SendSinglePacketHelper(&header, tx_data, packet_data_length, rx_data, in SendData() local 233 if (bytes == -1) { in SendData() 235 } else if (static_cast<size_t>(bytes) < rx_length) { in SendData() 236 rx_data += bytes; in SendData() 237 rx_length -= bytes; in SendData() 246 ret += bytes; in SendData() 260 if (!socket_->Send({{header->bytes(), kHeaderSize}, {tx_data, tx_length}})) { in SendSinglePacketHelper() [all …]
|
/system/core/libutils/ |
D | JenkinsHash.cpp | 37 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { in JenkinsHashMixBytes() argument 44 uint32_t data = bytes[i] | (bytes[i+1] << 8) | (bytes[i+2] << 16) | (bytes[i+3] << 24); in JenkinsHashMixBytes() 48 uint32_t data = bytes[i]; in JenkinsHashMixBytes() 49 data |= ((size & 3) > 1) ? (bytes[i+1] << 8) : 0; in JenkinsHashMixBytes() 50 data |= ((size & 3) > 2) ? (bytes[i+2] << 16) : 0; in JenkinsHashMixBytes()
|
/system/netd/server/ |
D | BandwidthController.h | 41 int setInterfaceSharedQuota(const std::string& iface, int64_t bytes); 42 int getInterfaceSharedQuota(int64_t *bytes); 45 int setInterfaceQuota(const std::string& iface, int64_t bytes); 46 int getInterfaceQuota(const std::string& iface, int64_t* bytes); 60 int setGlobalAlert(int64_t bytes); 65 int setSharedAlert(int64_t bytes); 68 int setInterfaceAlert(const std::string& iface, int64_t bytes); 102 int runIptablesAlertCmd(IptOp op, const std::string& alertName, int64_t bytes); 103 int runIptablesAlertFwdCmd(IptOp op, const std::string& alertName, int64_t bytes); 105 int updateQuota(const std::string& alertName, int64_t bytes); [all …]
|
/system/bt/gd/packet/ |
D | bit_inserter_unittest.cc | 37 std::vector<uint8_t> bytes; in TEST() local 38 BitInserter it(bytes); in TEST() 51 ASSERT_EQ(result.size(), bytes.size()); in TEST() 52 for (size_t i = 0; i < bytes.size(); i++) { in TEST() 53 ASSERT_EQ(result[i], bytes[i]); in TEST()
|
D | raw_builder.cc | 31 bool RawBuilder::AddOctets(size_t octets, const vector<uint8_t>& bytes) { in AddOctets() argument 34 if (octets != bytes.size()) return false; in AddOctets() 36 payload_.insert(payload_.end(), bytes.begin(), bytes.end()); in AddOctets() 41 bool RawBuilder::AddOctets(const vector<uint8_t>& bytes) { in AddOctets() argument 42 return AddOctets(bytes.size(), bytes); in AddOctets()
|
/system/bt/vendor_libs/test_vendor_lib/packets/hci/ |
D | event_payload_builder.cc | 29 bool EventPayloadBuilder::AddPayloadOctets(size_t octets, const vector<uint8_t>& bytes) { in AddPayloadOctets() argument 32 if (octets != bytes.size()) return false; in AddPayloadOctets() 34 payload_.insert(payload_.end(), bytes.begin(), bytes.end()); in AddPayloadOctets() 39 bool EventPayloadBuilder::AddPayloadOctets(const vector<uint8_t>& bytes) { in AddPayloadOctets() argument 40 return AddPayloadOctets(bytes.size(), bytes); in AddPayloadOctets()
|
/system/core/libbacktrace/ |
D | BacktracePtrace.cpp | 64 size_t BacktracePtrace::Read(uint64_t addr, uint8_t* buffer, size_t bytes) { in Read() argument 75 bytes = MIN(map.end - addr, bytes); in Read() 83 size_t copy_bytes = MIN(sizeof(word_t) - align_bytes, bytes); in Read() 87 bytes -= copy_bytes; in Read() 91 size_t num_words = bytes / sizeof(word_t); in Read() 102 size_t left_over = bytes & (sizeof(word_t) - 1); in Read()
|
/system/bt/vendor_libs/test_vendor_lib/packets/ |
D | raw_builder.cc | 29 bool RawBuilder::AddOctets(size_t octets, const vector<uint8_t>& bytes) { in AddOctets() argument 32 if (octets != bytes.size()) return false; in AddOctets() 34 payload_.insert(payload_.end(), bytes.begin(), bytes.end()); in AddOctets() 39 bool RawBuilder::AddOctets(const vector<uint8_t>& bytes) { in AddOctets() argument 40 return AddOctets(bytes.size(), bytes); in AddOctets()
|
/system/core/fs_mgr/libfs_avb/ |
D | util.cpp | 49 bool HexToBytes(uint8_t* bytes, size_t bytes_len, const std::string& hex) { in HexToBytes() argument 50 CHECK(bytes != nullptr); in HexToBytes() 67 bytes[j] = (high << 4) | low; in HexToBytes() 72 std::string BytesToHex(const uint8_t* bytes, size_t bytes_len) { in BytesToHex() argument 73 CHECK(bytes != nullptr); in BytesToHex() 79 hex.push_back(hex_digits[(bytes[i] & 0xF0) >> 4]); in BytesToHex() 80 hex.push_back(hex_digits[bytes[i] & 0x0F]); in BytesToHex()
|
/system/core/libunwindstack/tools/ |
D | unwind_for_offline.cpp | 116 size_t bytes = fwrite(&sp_start, 1, sizeof(sp_start), fp.get()); in SaveStack() local 117 if (bytes != sizeof(sp_start)) { in SaveStack() 119 bytes); in SaveStack() 123 bytes = fwrite(buffer.data(), 1, buffer.size(), fp.get()); in SaveStack() 124 if (bytes != buffer.size()) { in SaveStack() 125 printf("Failed to write all stack data: stack size %zu, written %zu\n", buffer.size(), bytes); in SaveStack() 144 size_t bytes = memory->Read(info->start, buffer.data(), buffer.size()); in CreateElfFromMemory() local 145 if (bytes == 0) { in CreateElfFromMemory() 156 size_t bytes_written = fwrite(buffer.data(), 1, bytes, output.get()); in CreateElfFromMemory() 157 if (bytes_written != bytes) { in CreateElfFromMemory() [all …]
|
/system/timezone/testing/src/main/java/libcore/timezone/testing/ |
D | ZoneInfoTestHelper.java | 278 byte[] bytes = baos.toByteArray(); in build() 279 setInt(bytes, indexOffsetOffset, in build() 281 setInt(bytes, dataOffsetOffset, in build() 283 setInt(bytes, zoneTabOffsetOffset, in build() 285 return bytes; in build() 314 byte[] bytes = ByteBuffer.allocate(4).putInt(value).array(); in writeInt() 315 writeByteArray(os, bytes); in writeInt() 318 static void setInt(byte[] bytes, int offset, int value) { in setInt() argument 319 bytes[offset] = (byte) (value >>> 24); in setInt() 320 bytes[offset + 1] = (byte) (value >>> 16); in setInt() [all …]
|
/system/core/debuggerd/libdebuggerd/ |
D | utility.cpp | 146 size_t bytes = memory->Read(addr, reinterpret_cast<uint8_t*>(data), sizeof(data)); local 147 if (bytes % sizeof(uintptr_t) != 0) { 149 ALOGE("Bytes read %zu, is not a multiple of %zu", bytes, sizeof(uintptr_t)); 150 bytes &= ~(sizeof(uintptr_t) - 1); 155 if (bytes == 0) { 166 if (bytes < MEMORY_BYTES_TO_DUMP && !skip_2nd_read) { 173 size_t bytes2 = memory->Read(addr + start + bytes, reinterpret_cast<uint8_t*>(data) + bytes, 174 sizeof(data) - bytes - start); 175 bytes += bytes2; 176 if (bytes2 > 0 && bytes % sizeof(uintptr_t) != 0) { [all …]
|
/system/bt/btif/src/ |
D | btif_uid.cc | 75 void uid_set_add_tx(uid_set_t* set, int32_t app_uid, uint64_t bytes) { in uid_set_add_tx() argument 76 if (app_uid == -1 || bytes == 0) return; in uid_set_add_tx() 80 node->data.tx_bytes += bytes; in uid_set_add_tx() 83 void uid_set_add_rx(uid_set_t* set, int32_t app_uid, uint64_t bytes) { in uid_set_add_rx() argument 84 if (app_uid == -1 || bytes == 0) return; in uid_set_add_rx() 88 node->data.rx_bytes += bytes; in uid_set_add_rx()
|
/system/core/libziparchive/ |
D | zip_archive_stream_entry.cc | 84 size_t bytes = (length_ > data_.size()) ? data_.size() : length_; in Read() local 87 if (!archive->mapped_zip.ReadAtOffset(data_.data(), bytes, offset_)) { in Read() 97 if (bytes < data_.size()) { in Read() 98 data_.resize(bytes); in Read() 101 length_ -= bytes; in Read() 102 offset_ += bytes; in Read() 206 size_t bytes = (compressed_length_ > in_.size()) ? in_.size() : compressed_length_; in Read() local 209 if (!archive->mapped_zip.ReadAtOffset(in_.data(), bytes, offset_)) { in Read() 218 compressed_length_ -= bytes; in Read() 219 offset_ += bytes; in Read() [all …]
|
/system/chre/platform/slpi/ |
D | memory_manager.cc | 24 void *MemoryManager::doAlloc(Nanoapp *app, uint32_t bytes) { in doAlloc() argument 26 return chre::memoryAlloc(bytes); in doAlloc() 28 return chre::memoryAllocBigImage(bytes); in doAlloc()
|