/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/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/bt/gd/packet/ |
D | bit_inserter_unittest.cc | 31 std::vector<uint8_t> bytes; in TEST() local 32 BitInserter it(bytes); in TEST() 41 ASSERT_EQ(result.size(), bytes.size()); in TEST() 42 for (size_t i = 0; i < bytes.size(); i++) { in TEST() 43 ASSERT_EQ(result[i], bytes[i]); in TEST() 48 std::vector<uint8_t> bytes; in TEST() local 49 BitInserter it(bytes); in TEST() 62 ASSERT_EQ(result.size(), bytes.size()); in TEST() 63 for (size_t i = 0; i < bytes.size(); i++) { in TEST() 64 ASSERT_EQ(result[i], bytes[i]); in TEST() [all …]
|
D | raw_builder.cc | 33 bool RawBuilder::AddOctets(size_t octets, const vector<uint8_t>& bytes) { in AddOctets() argument 36 if (octets != bytes.size()) return false; in AddOctets() 38 payload_.insert(payload_.end(), bytes.begin(), bytes.end()); in AddOctets() 43 bool RawBuilder::AddOctets(const vector<uint8_t>& bytes) { in AddOctets() argument 44 return AddOctets(bytes.size(), bytes); in AddOctets()
|
/system/core/libunwindstack/tests/ |
D | MemoryRangesTest.cpp | 52 size_t bytes = ranges_->Read(0, dst.data(), dst.size()); in TEST_F() local 53 ASSERT_EQ(1000UL, bytes); in TEST_F() 54 for (size_t i = 0; i < bytes; i++) { in TEST_F() 58 bytes = ranges_->Read(2000, dst.data(), dst.size()); in TEST_F() 59 ASSERT_EQ(2000UL, bytes); in TEST_F() 60 for (size_t i = 0; i < bytes; i++) { in TEST_F() 64 bytes = ranges_->Read(4000, dst.data(), dst.size()); in TEST_F() 65 ASSERT_EQ(100UL, bytes); in TEST_F() 66 for (size_t i = 0; i < bytes; i++) { in TEST_F() 82 size_t bytes = ranges_->Read(6000, dst.data(), dst.size()); in TEST_F() local [all …]
|
D | MemoryRemoteTest.cpp | 119 size_t bytes = in TEST() local 122 ASSERT_LE(1024U, bytes); in TEST() 123 for (size_t i = 0; i < bytes; i++) { in TEST() 128 bytes = in TEST() 130 ASSERT_EQ(1024U, bytes); in TEST() 131 for (size_t i = 0; i < bytes; i++) { in TEST() 316 size_t bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping), &value, sizeof(value)); in TEST() local 317 ASSERT_EQ(sizeof(value), bytes); in TEST() 319 …bytes = remote_ptrace.Read(reinterpret_cast<uint64_t>(mapping) + page_size, &value, sizeof(value)); in TEST() 320 ASSERT_EQ(sizeof(value), bytes); in TEST() [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 | 110 if (bytes[i][j][k]) in is_zero() 280 if (uid_usage.bytes[READ][FOREGROUND][CHARGER_ON] + in dump() 281 uid_usage.bytes[READ][FOREGROUND][CHARGER_OFF] + in dump() 282 uid_usage.bytes[READ][BACKGROUND][CHARGER_ON] + in dump() 283 uid_usage.bytes[READ][BACKGROUND][CHARGER_OFF] + in dump() 284 uid_usage.bytes[WRITE][FOREGROUND][CHARGER_ON] + in dump() 285 uid_usage.bytes[WRITE][FOREGROUND][CHARGER_OFF] + in dump() 286 uid_usage.bytes[WRITE][BACKGROUND][CHARGER_ON] + in dump() 287 uid_usage.bytes[WRITE][BACKGROUND][CHARGER_OFF] > threshold) { in dump() 329 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 229 ssize_t bytes = SendSinglePacketHelper(&header, tx_data, packet_data_length, rx_data, in SendData() local 234 if (bytes == -1) { in SendData() 236 } else if (static_cast<size_t>(bytes) < rx_length) { in SendData() 237 rx_data += bytes; in SendData() 238 rx_length -= bytes; in SendData() 247 ret += bytes; in SendData() 261 if (!socket_->Send({{header->bytes(), kHeaderSize}, {tx_data, tx_length}})) { in SendSinglePacketHelper() [all …]
|
/system/bt/gd/common/ |
D | byte_array.h | 42 ByteArray(std::array<uint8_t, kLength> a) : bytes(std::move(a)) {} in ByteArray() 44 std::array<uint8_t, kLength> bytes = {}; variable 47 return bytes.data(); in data() 51 return bytes.data(); in data() 56 return bytes < rhs.bytes; 59 return bytes == rhs.bytes; 76 return common::ToHexString(bytes.begin(), bytes.end()); in ToString()
|
/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/core/fs_mgr/libfs_avb/tests/ |
D | util_test.cpp | 108 uint8_t bytes[16]; in TEST() local 110 EXPECT_TRUE(HexToBytes((uint8_t*)bytes, sizeof(bytes), hex)); in TEST() 111 for (size_t i = 0; i < sizeof(bytes); i++) { in TEST() 112 EXPECT_EQ(i, bytes[i]); in TEST() 118 uint8_t bytes[16]; in TEST() local 120 EXPECT_TRUE(HexToBytes((uint8_t*)bytes, sizeof(bytes), hex)); in TEST() 121 for (size_t i = 0; i < sizeof(bytes); i++) { in TEST() 122 EXPECT_EQ(16 + i, bytes[i]); in TEST() 127 const uint8_t bytes[16]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; in TEST() local 129 EXPECT_EQ("0102", BytesToHex((uint8_t*)bytes, 2)); in TEST() [all …]
|
/system/bt/gd/hci/facade/ |
D | le_scanning_manager_facade.cc | 83 std::vector<uint8_t> bytes; in on_advertisements() local 84 BitInserter bit_inserter(bytes); in on_advertisements() 86 le_report_msg.set_event(std::string(bytes.begin(), bytes.end())); in on_advertisements() 99 std::vector<uint8_t> bytes; in on_advertisements() local 100 BitInserter bit_inserter(bytes); in on_advertisements() 102 le_report_msg.set_event(std::string(bytes.begin(), bytes.end())); in on_advertisements() 117 std::vector<uint8_t> bytes; in on_advertisements() local 118 BitInserter bit_inserter(bytes); in on_advertisements() 120 le_report_msg.set_event(std::string(bytes.begin(), bytes.end())); in on_advertisements() 132 std::vector<uint8_t> bytes; in on_timeout() local [all …]
|
D | acl_manager_facade.proto | 25 bytes address = 1; 38 bytes address = 1; 43 bytes packet = 1; 47 bytes event = 1; 52 bytes payload = 2;
|
/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/osi/test/fuzzers/compat/ |
D | fuzz_compat.cc | 36 std::vector<char> bytes = in LLVMFuzzerTestOneInput() local 38 if (bytes.empty()) { in LLVMFuzzerTestOneInput() 41 buf_size = bytes.size(); in LLVMFuzzerTestOneInput() 53 reinterpret_cast<char*>(bytes.data()), len_to_cpy); in LLVMFuzzerTestOneInput() 55 reinterpret_cast<char*>(bytes.data()), len_to_cpy); in LLVMFuzzerTestOneInput()
|
/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/core/libprocinfo/ |
D | process_map.cpp | 46 ssize_t bytes = in ReadMapFileAsyncSafe() local 48 if (bytes <= 0) { in ReadMapFileAsyncSafe() 51 return bytes == 0; in ReadMapFileAsyncSafe() 55 bytes = 1; in ReadMapFileAsyncSafe() 58 read_bytes += bytes; in ReadMapFileAsyncSafe()
|
/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 | 321 byte[] bytes = baos.toByteArray(); in build() 322 setInt(bytes, indexOffsetOffset, in build() 324 setInt(bytes, dataOffsetOffset, in build() 326 setInt(bytes, finalOffsetOffset, in build() 328 return bytes; in build() 369 byte[] bytes = ByteBuffer.allocate(4).putInt(value).array(); in writeInt() 370 writeByteArray(os, bytes); in writeInt() 374 byte[] bytes = ByteBuffer.allocate(8).putLong(value).array(); in writeLong() 375 writeByteArray(os, bytes); in writeLong() 378 static void setInt(byte[] bytes, int offset, int value) { in setInt() argument [all …]
|
/system/bt/gd/hal/ |
D | facade.proto | 18 bytes payload = 1; 22 bytes payload = 1; 26 bytes payload = 1; 30 bytes payload = 1;
|
/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()
|