/system/core/fs_mgr/liblp/ |
D | builder_test.cpp | 47 unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(1024 * 1024, 1024, 2); in TEST_F() local 48 ASSERT_NE(builder, nullptr); in TEST_F() 50 Partition* partition = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F() 55 EXPECT_EQ(builder->FindPartition("system"), partition); in TEST_F() 57 builder->RemovePartition("system"); in TEST_F() 58 EXPECT_EQ(builder->FindPartition("system"), nullptr); in TEST_F() 62 unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(1024 * 1024, 1024, 2); in TEST_F() local 63 ASSERT_NE(builder, nullptr); in TEST_F() 65 Partition* system = builder->AddPartition("system", LP_PARTITION_ATTR_READONLY); in TEST_F() 67 EXPECT_EQ(builder->ResizePartition(system, 65536), true); in TEST_F() [all …]
|
D | io_test.cpp | 80 unique_ptr<MetadataBuilder> builder = in CreateDefaultBuilder() local 82 return builder; in CreateDefaultBuilder() 91 static bool AddDefaultPartitions(MetadataBuilder* builder) { in AddDefaultPartitions() argument 92 Partition* system = builder->AddPartition("system", LP_PARTITION_ATTR_NONE); in AddDefaultPartitions() 96 return builder->ResizePartition(system, 24 * 1024); in AddDefaultPartitions() 101 unique_ptr<MetadataBuilder> builder = CreateDefaultBuilder(); in CreateFlashedDisk() local 102 if (!builder || !AddDefaultPartitions(builder.get())) { in CreateFlashedDisk() 110 unique_ptr<LpMetadata> exported = builder->Export(); in CreateFlashedDisk() 140 unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(kDiskSize + 4096, 512, 2); in TEST() local 141 ASSERT_NE(builder, nullptr); in TEST() [all …]
|
/system/bt/packet/tests/avrcp/ |
D | get_capabilities_packet_test.cc | 57 auto builder = GetCapabilitiesResponseBuilder::MakeCompanyIdBuilder(0x000000); in TEST() local 58 ASSERT_EQ(builder->size(), 15u); in TEST() 59 builder->AddCompanyId(0x000001); in TEST() 60 ASSERT_EQ(builder->size(), 18u); in TEST() 61 builder->AddCompanyId(0x000002); in TEST() 62 ASSERT_EQ(builder->size(), 21u); in TEST() 64 builder = GetCapabilitiesResponseBuilder::MakeEventsSupportedBuilder( in TEST() 66 ASSERT_EQ(builder->size(), 13u); in TEST() 67 builder->AddEvent(Event::TRACK_CHANGED); in TEST() 68 ASSERT_EQ(builder->size(), 14u); in TEST() [all …]
|
D | get_folder_items_packet_test.cc | 29 auto builder = GetFolderItemsResponseBuilder::MakePlayerListBuilder( in TEST() local 32 ASSERT_EQ(builder->size(), get_folder_items_error_response.size()); in TEST() 35 builder->AddMediaPlayer(player); in TEST() 36 ASSERT_EQ(builder->size(), get_folder_items_media_player_response.size()); in TEST() 40 auto builder = GetFolderItemsResponseBuilder::MakePlayerListBuilder( in TEST() local 43 builder->AddMediaPlayer(player); in TEST() 46 builder->Serialize(test_packet); in TEST() 59 auto builder = GetFolderItemsResponseBuilder::MakePlayerListBuilder( in TEST() local 62 ASSERT_TRUE(builder->AddMediaPlayer(player1)); in TEST() 63 ASSERT_FALSE(builder->AddMediaPlayer(player2)); in TEST() [all …]
|
D | register_notification_packet_test.cc | 55 auto builder = in TEST() local 57 ASSERT_EQ(builder->size(), register_volume_changed_notification.size()); in TEST() 60 builder->Serialize(test_packet); in TEST() 106 auto builder = RegisterNotificationResponseBuilder::MakePlaybackStatusBuilder( in TEST() local 108 ASSERT_EQ(builder->size(), interim_play_status_notification.size()); in TEST() 110 builder->Serialize(test_packet); in TEST() 115 auto builder = RegisterNotificationResponseBuilder::MakeTrackChangedBuilder( in TEST() local 117 ASSERT_EQ(builder->size(), interim_track_changed_notification.size()); in TEST() 119 builder->Serialize(test_packet); in TEST() 124 auto builder = in TEST() local [all …]
|
D | get_element_attributes_packet_test.cc | 81 auto builder = GetElementAttributesResponseBuilder::MakeBuilder(0xFFFF); in TEST() local 82 ASSERT_EQ(builder->size(), 11u); in TEST() 83 builder->AddAttributeEntry(Attribute::TITLE, "test"); in TEST() 84 ASSERT_EQ(builder->size(), 23u); in TEST() 85 builder->AddAttributeEntry(Attribute::ARTIST_NAME, "test"); in TEST() 86 ASSERT_EQ(builder->size(), 35u); in TEST() 90 auto builder = GetElementAttributesResponseBuilder::MakeBuilder(0xFFFF); in TEST() local 91 builder->AddAttributeEntry(Attribute::TITLE, "Test Song"); in TEST() 92 builder->AddAttributeEntry(Attribute::ARTIST_NAME, "Test Artist"); in TEST() 93 builder->AddAttributeEntry(Attribute::ALBUM_NAME, "Test Album"); in TEST() [all …]
|
D | get_item_attributes_packet_test.cc | 29 auto builder = in TEST() local 31 ASSERT_EQ(builder->size(), 5u); in TEST() 33 builder->AddAttributeEntry(Attribute::TITLE, "Test Song"); in TEST() 34 ASSERT_EQ(builder->size(), 22u); in TEST() 36 builder->AddAttributeEntry(Attribute::ARTIST_NAME, "Test Artist"); in TEST() 37 ASSERT_EQ(builder->size(), 41u); in TEST() 39 builder->AddAttributeEntry(Attribute::ALBUM_NAME, "Test Album"); in TEST() 40 ASSERT_EQ(builder->size(), get_item_attributes_song_response.size()); in TEST() 44 auto builder = in TEST() local 46 builder->AddAttributeEntry(Attribute::TITLE, "Test Song"); in TEST() [all …]
|
D | change_path_packet_test.cc | 31 auto builder = ChangePathResponseBuilder::MakeBuilder(Status::NO_ERROR, 2); in TEST() local 32 ASSERT_EQ(builder->size(), change_path_response.size()); in TEST() 35 builder->Serialize(test_packet); in TEST() 42 auto builder = in TEST() local 44 ASSERT_EQ(builder->size(), change_path_error_response.size()); in TEST() 47 builder->Serialize(test_packet); in TEST() 76 auto builder = ChangePathRequestBuilder::MakeBuilder(0, Direction::DOWN, 2); in TEST() local 77 ASSERT_EQ(builder->size(), change_path_request.size()); in TEST() 80 builder->Serialize(test_packet); in TEST()
|
D | set_browsed_player_packet_test.cc | 29 auto builder = SetBrowsedPlayerResponseBuilder::MakeBuilder(Status::NO_ERROR, in TEST() local 31 ASSERT_EQ(builder->size(), set_browsed_player_response.size()); in TEST() 34 builder->Serialize(test_packet); in TEST() 40 auto builder = SetBrowsedPlayerResponseBuilder::MakeBuilder( in TEST() local 42 ASSERT_EQ(builder->size(), player_not_browsable_status.size()); in TEST() 45 builder->Serialize(test_packet); in TEST()
|
D | get_total_number_of_items_packet_test.cc | 30 auto builder = GetTotalNumberOfItemsResponseBuilder::MakeBuilder( in TEST() local 32 ASSERT_EQ(builder->size(), get_total_number_of_items_response.size()); in TEST() 35 builder->Serialize(test_packet); in TEST() 41 auto builder = GetTotalNumberOfItemsResponseBuilder::MakeBuilder( in TEST() local 43 ASSERT_EQ(builder->size(), inv_scope_status_packet.size()); in TEST() 46 builder->Serialize(test_packet); in TEST()
|
D | pass_through_packet_test.cc | 29 auto builder = PassThroughPacketBuilder::MakeBuilder(false, true, 0x44); in TEST() local 30 ASSERT_EQ(builder->size(), pass_through_command_play_pushed.size()); in TEST() 32 builder->Serialize(test_packet); in TEST() 35 builder = PassThroughPacketBuilder::MakeBuilder(true, false, 0x44); in TEST() 36 ASSERT_EQ(builder->size(), pass_through_command_play_released.size()); in TEST() 38 builder->Serialize(test_packet); in TEST()
|
D | set_absolute_volume_packet_test.cc | 29 auto builder = SetAbsoluteVolumeRequestBuilder::MakeBuilder(0x48); in TEST() local 30 ASSERT_EQ(builder->size(), set_absolute_volume_request.size()); in TEST() 33 builder->Serialize(test_packet); in TEST() 39 auto builder = SetAbsoluteVolumeRequestBuilder::MakeBuilder(0xc8); in TEST() local 41 builder->Serialize(test_packet); in TEST()
|
/system/bt/bta/test/gatt/ |
D | database_builder_sample_device_test.cc | 120 DatabaseBuilder builder; in TEST() local 122 EXPECT_FALSE(builder.InProgress()); in TEST() 126 builder.AddService(0x0001, 0x0007, SERVICE_1_UUID, true); in TEST() 131 EXPECT_TRUE(builder.InProgress()); in TEST() 133 builder.AddService(0x0008, 0x0008, SERVICE_2_UUID, true); in TEST() 134 builder.AddService(0x0009, 0x000c, SERVICE_3_UUID, true); in TEST() 135 builder.AddService(0x000d, 0x001a, SERVICE_4_UUID, true); in TEST() 136 builder.AddService(0x001b, 0x0029, SERVICE_5_UUID, true); in TEST() 137 builder.AddService(0x002a, 0x0031, SERVICE_6_UUID, true); in TEST() 141 EXPECT_TRUE(builder.StartNextServiceExploration()); in TEST() [all …]
|
D | database_builder_test.cc | 52 DatabaseBuilder builder; in TEST() local 54 EXPECT_FALSE(builder.InProgress()); in TEST() 57 builder.AddService(0x0001, 0x0001, SERVICE_1_UUID, true); in TEST() 58 EXPECT_FALSE(builder.StartNextServiceExploration()); in TEST() 60 Database result = builder.Build(); in TEST() 72 DatabaseBuilder builder; in TEST() local 74 EXPECT_FALSE(builder.InProgress()); in TEST() 77 builder.AddService(0x0001, 0x000f, SERVICE_1_UUID, true); in TEST() 78 builder.AddCharacteristic(0x0002, 0x0003, SERVICE_1_CHAR_1_UUID, 0x02); in TEST() 79 builder.AddDescriptor(0x0004, SERVICE_1_CHAR_1_DESC_1_UUID); in TEST() [all …]
|
/system/chre/platform/shared/ |
D | host_protocol_chre.cc | 121 FlatBufferBuilder& builder, const char *name, const char *vendor, in encodeHubInfoResponse() argument 126 auto nameOffset = addStringAsByteVector(builder, name); in encodeHubInfoResponse() 127 auto vendorOffset = addStringAsByteVector(builder, vendor); in encodeHubInfoResponse() 128 auto toolchainOffset = addStringAsByteVector(builder, toolchain); in encodeHubInfoResponse() 131 builder, nameOffset, vendorOffset, toolchainOffset, legacyPlatformVersion, in encodeHubInfoResponse() 134 finalize(builder, fbs::ChreMessage::HubInfoResponse, response.Union(), in encodeHubInfoResponse() 139 FlatBufferBuilder& builder, in addNanoappListEntry() argument 143 builder, appId, appVersion, enabled, isSystemNanoapp); in addNanoappListEntry() 150 FlatBufferBuilder& builder, in finishNanoappListResponse() argument 153 auto vectorOffset = builder.CreateVector<Offset<fbs::NanoappListEntry>>( in finishNanoappListResponse() [all …]
|
D | host_protocol_common.cc | 30 FlatBufferBuilder& builder, uint64_t appId, uint32_t messageType, in encodeNanoappMessage() argument 32 auto messageDataOffset = builder.CreateVector( in encodeNanoappMessage() 36 builder, appId, messageType, hostEndpoint, messageDataOffset); in encodeNanoappMessage() 37 finalize(builder, fbs::ChreMessage::NanoappMessage, nanoappMessage.Union()); in encodeNanoappMessage() 41 FlatBufferBuilder& builder, const char *str) { in addStringAsByteVector() argument 42 return builder.CreateVector(reinterpret_cast<const int8_t *>(str), in addStringAsByteVector() 47 FlatBufferBuilder& builder, fbs::ChreMessage messageType, in finalize() argument 51 builder, messageType, message, &hostAddr); in finalize() 52 builder.Finish(container); in finalize()
|
/system/extras/verity/ |
D | build_verity_tree_test.cpp | 42 builder.reset(new HashTreeBuilder(4096, EVP_sha256())); in SetUp() 46 return builder->zero_block_hash_; in zero_block_hash() 49 return builder->verity_tree_; in verity_tree() 54 ASSERT_TRUE(builder->Initialize(data.size(), salt)); in GenerateHashTree() 55 ASSERT_TRUE(builder->Update(data.data(), data.size())); in GenerateHashTree() 56 ASSERT_TRUE(builder->BuildHashTree()); in GenerateHashTree() 60 std::unique_ptr<HashTreeBuilder> builder; member in BuildVerityTreeTest 65 ASSERT_EQ(4096u, builder->CalculateSize(1)); in TEST_F() 67 ASSERT_EQ(4096u, builder->CalculateSize(128 * 4096)); in TEST_F() 69 ASSERT_EQ(12288u, builder->CalculateSize(128 * 4096 + 1)); in TEST_F() [all …]
|
D | build_verity_tree.cpp | 27 HashTreeBuilder* builder, in generate_verity_tree() argument 56 if (!builder->Initialize(len, salt_content)) { in generate_verity_tree() 67 sparse_file_callback(file, false, false, hash_callback, builder); in generate_verity_tree() 70 if (!builder->BuildHashTree()) { in generate_verity_tree() 74 return builder->WriteHashTreeToFile(verity_filename); in generate_verity_tree()
|
/system/bt/packet/tests/base/ |
D | packet_builder_test.cc | 29 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 32 builder->Serialize(packet); in TEST() 40 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 42 ASSERT_EQ(builder->size(), test_l2cap_data.size()); in TEST() 49 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 50 builder->ReserveSpace(packet, test_l2cap_data.size()); in TEST() 56 auto builder = TestPacketBuilder::MakeBuilder(test_l2cap_data); in TEST() local 59 builder->AddPayloadOctets1(packet, 0x01u); in TEST() 60 builder->AddPayloadOctets2(packet, 0x0302u); in TEST() 61 builder->AddPayloadOctets3(packet, 0x060504u); in TEST() [all …]
|
/system/chre/host/common/ |
D | host_protocol_host.cc | 95 void HostProtocolHost::encodeHubInfoRequest(FlatBufferBuilder& builder) { in encodeHubInfoRequest() argument 96 auto request = fbs::CreateHubInfoRequest(builder); in encodeHubInfoRequest() 97 finalize(builder, fbs::ChreMessage::HubInfoRequest, request.Union()); in encodeHubInfoRequest() 101 flatbuffers::FlatBufferBuilder& builder, in encodeFragmentedLoadNanoappRequest() argument 104 builder, request.transactionId, request.appId, request.appVersion, in encodeFragmentedLoadNanoappRequest() 109 void HostProtocolHost::encodeNanoappListRequest(FlatBufferBuilder& builder) { in encodeNanoappListRequest() argument 110 auto request = fbs::CreateNanoappListRequest(builder); in encodeNanoappListRequest() 111 finalize(builder, fbs::ChreMessage::NanoappListRequest, request.Union()); in encodeNanoappListRequest() 115 FlatBufferBuilder& builder, uint32_t transactionId, uint64_t appId, in encodeUnloadNanoappRequest() argument 118 builder, transactionId, appId, allowSystemNanoappUnload); in encodeUnloadNanoappRequest() [all …]
|
/system/chre/host/common/test/ |
D | chre_test_client.cc | 135 FlatBufferBuilder builder(64); in requestHubInfo() local 136 HostProtocolHost::encodeHubInfoRequest(builder); in requestHubInfo() 138 LOGI("Sending hub info request (%" PRIu32 " bytes)", builder.GetSize()); in requestHubInfo() 139 if (!client.sendMessage(builder.GetBufferPointer(), builder.GetSize())) { in requestHubInfo() 145 FlatBufferBuilder builder(64); in requestNanoappList() local 146 HostProtocolHost::encodeNanoappListRequest(builder); in requestNanoappList() 148 LOGI("Sending app list request (%" PRIu32 " bytes)", builder.GetSize()); in requestNanoappList() 149 if (!client.sendMessage(builder.GetBufferPointer(), builder.GetSize())) { in requestNanoappList() 155 FlatBufferBuilder builder(64); in sendMessageToNanoapp() local 158 builder, chre::kMessageWorldAppId, 1234 /* messageType */, in sendMessageToNanoapp() [all …]
|
/system/chre/platform/shared/include/chre/platform/shared/ |
D | host_protocol_chre.h | 97 flatbuffers::FlatBufferBuilder& builder, const char *name, 122 flatbuffers::FlatBufferBuilder& builder, 137 flatbuffers::FlatBufferBuilder& builder, 146 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 154 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 161 flatbuffers::FlatBufferBuilder& builder, const char *logBuffer, 171 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 178 flatbuffers::FlatBufferBuilder& builder, uint16_t hostClientId, 184 static void encodeTimeSyncRequest(flatbuffers::FlatBufferBuilder& builder); 191 flatbuffers::FlatBufferBuilder& builder); [all …]
|
/system/bt/packet/avrcp/ |
D | register_notification_packet.cc | 76 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakePlaybackStatusBuilder() local 80 builder->data_ = play_status; in MakePlaybackStatusBuilder() 81 return builder; in MakePlaybackStatusBuilder() 87 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakeTrackChangedBuilder() local 90 builder->data_ = track_uid; in MakeTrackChangedBuilder() 91 return builder; in MakeTrackChangedBuilder() 97 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakePlaybackPositionBuilder() local 101 builder->data_ = playback_pos; in MakePlaybackPositionBuilder() 102 return builder; in MakePlaybackPositionBuilder() 107 std::unique_ptr<RegisterNotificationResponseBuilder> builder( in MakeNowPlayingBuilder() local [all …]
|
/system/chre/platform/slpi/ |
D | host_link.cc | 74 FlatBufferBuilder *builder; member 105 PendingMessage(PendingMessageType msgType, FlatBufferBuilder *builder) { in PendingMessage() 107 data.builder = builder; in PendingMessage() 114 FlatBufferBuilder *builder; member 134 typedef void (MessageBuilderFunction)(FlatBufferBuilder& builder, void *cookie); 139 int copyToHostBuffer(const FlatBufferBuilder& builder, unsigned char *buffer, in copyToHostBuffer() argument 141 uint8_t *data = builder.GetBufferPointer(); in copyToHostBuffer() 142 size_t size = builder.GetSize(); in copyToHostBuffer() 199 auto builder = MakeUnique<FlatBufferBuilder>(initialBufferSize); in buildAndEnqueueMessage() local 200 if (builder.isNull()) { in buildAndEnqueueMessage() [all …]
|
/system/chre/host/common/include/chre_host/ |
D | host_protocol_host.h | 104 static void encodeHubInfoRequest(flatbuffers::FlatBufferBuilder& builder); 116 flatbuffers::FlatBufferBuilder& builder, 125 static void encodeNanoappListRequest(flatbuffers::FlatBufferBuilder& builder); 141 flatbuffers::FlatBufferBuilder& builder, uint32_t transactionId, 151 static void encodeTimeSyncMessage(flatbuffers::FlatBufferBuilder& builder, 160 static void encodeDebugDumpRequest(flatbuffers::FlatBufferBuilder& builder); 198 flatbuffers::FlatBufferBuilder& builder, uint32_t transactionId, 211 flatbuffers::FlatBufferBuilder& builder, uint32_t transactionId,
|