/packages/modules/Bluetooth/system/btif/test/ |
D | btif_core_test.cc | 51 auto timeout_time = std::chrono::seconds(3); 53 std::map<std::string, std::function<void()>> callback_map_; 126 auto promise = std::promise<void>(); in SetUp() 132 ASSERT_EQ(std::future_status::ready, future.wait_for(timeout_time)); in SetUp() 137 auto promise = std::promise<void>(); in TearDown() 143 ASSERT_EQ(std::future_status::ready, future.wait_for(timeout_time)); in TearDown() 148 std::promise<int> promise0; 153 promise0 = std::promise<int>(); in TEST_F() 154 std::future<int> future0 = promise0.get_future(); in TEST_F() 156 ASSERT_EQ(std::future_status::ready, future0.wait_for(timeout_time)); in TEST_F() [all …]
|
/packages/modules/Bluetooth/system/stack/test/ |
D | crypto_toolbox_test.cc | 68 std::reverse(std::begin(k), std::end(k)); in TEST() 69 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST() 93 std::reverse(std::begin(k), std::end(k)); in TEST() 94 std::reverse(std::begin(m), std::end(m)); in TEST() 95 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST() 122 std::reverse(std::begin(k), std::end(k)); in TEST() 123 std::reverse(std::begin(m), std::end(m)); in TEST() 124 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST() 147 std::reverse(std::begin(k), std::end(k)); in TEST() 148 std::reverse(std::begin(m), std::end(m)); in TEST() [all …]
|
/packages/modules/Bluetooth/system/gd/crypto_toolbox/ |
D | crypto_toolbox_test.cc | 59 std::reverse(std::begin(k), std::end(k)); in TEST() 60 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST() 81 std::reverse(std::begin(k), std::end(k)); in TEST() 82 std::reverse(std::begin(m), std::end(m)); in TEST() 83 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST() 107 std::reverse(std::begin(k), std::end(k)); in TEST() 108 std::reverse(std::begin(m), std::end(m)); in TEST() 109 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST() 127 std::reverse(std::begin(k), std::end(k)); in TEST() 128 std::reverse(std::begin(m), std::end(m)); in TEST() [all …]
|
/packages/modules/Bluetooth/system/gd/os/linux_generic/ |
D | queue_unittest.cc | 30 using namespace std::chrono_literals; 75 explicit TestEnqueueEnd(Queue<std::string>* queue, Handler* handler) in TestEnqueueEnd() 80 void RegisterEnqueue(std::unordered_map<int, std::promise<int>>* promise_map) { in RegisterEnqueue() 86 std::promise<void> promise; in UnregisterEnqueue() 90 …common::BindOnce(&TestEnqueueEnd::handle_unregister_enqueue, common::Unretained(this), std::move(p… in UnregisterEnqueue() 94 std::unique_ptr<std::string> EnqueueCallbackForTest() { in EnqueueCallbackForTest() 96 std::this_thread::sleep_for(std::chrono::milliseconds(delay_)); in EnqueueCallbackForTest() 100 std::unique_ptr<std::string> data = std::move(buffer_.front()); in EnqueueCallbackForTest() 102 std::string copy = *data; in EnqueueCallbackForTest() 120 std::queue<std::unique_ptr<std::string>> buffer_; [all …]
|
/packages/modules/Bluetooth/system/test/mock/ |
D | mock_osi_config.h | 29 extern std::map<std::string, int> mock_function_count_map; 67 std::string return_value{std::string()}; 68 std::function<std::string(const char* filename)> body{ 70 std::string operator()(const char* filename) { return body(filename); }; in operator() 79 std::function<bool(const std::string& checksum, const std::string& filename)> 80 body{[this](const std::string& checksum, const std::string& filename) { 83 bool operator()(const std::string& checksum, const std::string& filename) { in operator() 94 std::function<bool(const config_t& config, const std::string& section, 95 const std::string& key, bool def_value)> 96 body{[this](const config_t& config, const std::string& section, [all …]
|
D | mock_btif_config.h | 27 extern std::map<std::string, int> mock_function_count_map; 53 std::function<bool(const std::string& section, const std::string& key)> body{ 54 [](const std::string& section, const std::string& key) { return false; }}; 55 bool operator()(const std::string& section, const std::string& key) { in operator() 64 std::function<bool(const std::string& section, const std::string& key, 66 body{[](const std::string& section, const std::string& key, int* value) { 69 bool operator()(const std::string& section, const std::string& key, in operator() 79 std::function<bool(const std::string& section, const std::string& key, 81 body{[](const std::string& section, const std::string& key, int value) { 84 bool operator()(const std::string& section, const std::string& key, in operator() [all …]
|
/packages/modules/StatsD/statsd/src/metrics/parsing_utils/ |
D | metrics_manager_util.h | 59 const std::unordered_map<int64_t, int>& metricToActivationMap, 67 const std::vector<sp<AtomMatchingTracker>>& allAtomMatchingTrackers, 68 const std::unordered_map<int64_t, int>& atomMatchingTrackerMap, 69 std::unordered_map<int, std::vector<int>>& trackerToMetricMap, int& logTrackerIndex); 75 const std::unordered_map<int64_t, int>& conditionTrackerMap, 78 const std::vector<sp<ConditionTracker>>& allConditionTrackers, int& conditionIndex, 79 std::unordered_map<int, std::vector<int>>& conditionToMetricMap); 86 const std::unordered_map<int64_t, int>& metricToActivationMap, 87 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap, 88 const std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap, [all …]
|
D | config_update_utils.h | 50 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap, 51 const std::vector<sp<AtomMatchingTracker>>& oldAtomMatchingTrackers, 52 const std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap, 53 std::vector<UpdateStatus>& matchersToUpdate, std::vector<bool>& cycleTracker); 66 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap, 67 const std::vector<sp<AtomMatchingTracker>>& oldAtomMatchingTrackers, 68 std::set<int>& allTagIds, 69 std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap, 70 std::vector<sp<AtomMatchingTracker>>& newAtomMatchingTrackers, 71 std::set<int64_t>& replacedMatchers); [all …]
|
/packages/modules/Bluetooth/system/gd/storage/ |
D | config_cache_helper.h | 45 virtual void SetBool(const std::string& section, const std::string& property, bool value); 46 …virtual std::optional<bool> GetBool(const std::string& section, const std::string& property) const; 47 virtual void SetUint64(const std::string& section, const std::string& property, uint64_t value); 48 …virtual std::optional<uint64_t> GetUint64(const std::string& section, const std::string& property)… 49 virtual void SetUint32(const std::string& section, const std::string& property, uint32_t value); 50 …virtual std::optional<uint32_t> GetUint32(const std::string& section, const std::string& property)… 51 virtual void SetInt64(const std::string& section, const std::string& property, int64_t value); 52 …virtual std::optional<int64_t> GetInt64(const std::string& section, const std::string& property) c… 53 virtual void SetInt(const std::string& section, const std::string& property, int value); 54 virtual std::optional<int> GetInt(const std::string& section, const std::string& property) const; [all …]
|
D | config_cache.cc | 29 const std::unordered_set<std::string_view> kEncryptKeyNameList = { 32 bool TrimAfterNewLine(std::string& value) { in TrimAfterNewLine() 33 std::string value_no_newline; in TrimAfterNewLine() 35 if (newline_position != std::string::npos) { in TrimAfterNewLine() 42 bool InEncryptKeyNameList(std::string key) { in InEncryptKeyNameList() 51 const std::unordered_set<std::string_view> kLePropertyNames = { 54 const std::unordered_set<std::string_view> kClassicPropertyNames = { 57 const std::string ConfigCache::kDefaultSectionName = "Global"; 59 std::string kEncryptedStr = "encrypted"; 61 ConfigCache::ConfigCache(size_t temp_device_capacity, std::unordered_set<std::string_view> persiste… in ConfigCache() [all …]
|
D | mutation_entry.h | 34 template <typename T, typename std::enable_if<std::is_integral_v<T>, int>::type = 0> 36 …PropertyType property_type, std::string section_param, std::string property_param, T value_param) { in Set() 38 … property_type, std::move(section_param), std::move(property_param), std::to_string(value_param)); in Set() 41 template <typename T, typename std::enable_if<std::is_enum_v<T>, int>::type = 0> 43 …PropertyType property_type, std::string section_param, std::string property_param, T value_param) { in Set() 44 using EnumUnderlyingType = typename std::underlying_type_t<T>; in Set() 47 std::move(section_param), in Set() 48 std::move(property_param), in Set() 52 template <typename T, typename std::enable_if<std::is_same_v<T, bool>, int>::type = 0> 54 …PropertyType property_type, std::string section_param, std::string property_param, T value_param) { in Set() [all …]
|
/packages/modules/Bluetooth/system/packet/tests/avrcp/ |
D | avrcp_test_packets.h | 25 std::vector<uint8_t> get_capabilities_request = { 29 std::vector<uint8_t> get_capabilities_request_company_id = { 33 std::vector<uint8_t> get_capabilities_request_unknown = { 37 std::vector<uint8_t> get_capabilities_response_company_id = { 42 std::vector<uint8_t> get_capabilities_response_events_supported = { 48 std::vector<uint8_t> get_element_attributes_request_partial = { 55 std::vector<uint8_t> get_element_attributes_request_full = { 65 std::vector<uint8_t> get_element_attributes_request_full_cover_art = { 80 std::vector<uint8_t> get_elements_attributes_response_full = { 93 std::vector<uint8_t> get_play_status_request = {0x01, 0x48, 0x00, 0x00, 0x19, [all …]
|
/packages/modules/Bluetooth/system/gd/common/ |
D | strings.h | 40 inline std::string ToString(const T& value) { in ToString() 41 std::stringstream tmp; in ToString() 48 std::string ToHexString(T x) { in ToHexString() 53 std::stringstream tmp; in ToHexString() 54 …tmp << "0x" << std::internal << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << (unsi… in ToHexString() 59 inline std::string ToHexString<>(signed long x) { 64 std::stringstream tmp; 65 …tmp << "0x" << std::internal << std::hex << std::setfill('0') << std::setw(sizeof(signed long) * 2) 71 inline std::string ToHexString<>(unsigned int x) { 72 std::stringstream tmp; [all …]
|
D | strings.cc | 29 struct IsSpace : std::unary_function<std::string::value_type, bool> { 30 bool operator()(std::string::value_type v) { in operator ()() 35 struct IsHexDigit : std::unary_function<std::string::value_type, bool> { 36 bool operator()(std::string::value_type v) { in operator ()() 46 std::string ToHexString(const std::vector<uint8_t>& value) { in ToHexString() 50 bool IsValidHexString(const std::string& str) { in IsValidHexString() 51 return std::find_if_not(str.begin(), str.end(), IsHexDigit{}) == str.end(); in IsValidHexString() 54 std::optional<std::vector<uint8_t>> FromHexString(const std::string& str) { in FromHexString() 57 return std::nullopt; in FromHexString() 59 if (std::find_if_not(str.begin(), str.end(), IsHexDigit{}) != str.end()) { in FromHexString() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/ |
D | proximity_info_state_utils.h | 32 typedef std::unordered_map<int, float> NearKeysDistanceMap; 33 typedef std::bitset<MAX_KEY_COUNT_IN_A_KEYBOARD> NearKeycodesSet; 35 static int trimLastTwoTouchPoints(std::vector<int> *sampledInputXs, 36 std::vector<int> *sampledInputYs, std::vector<int> *sampledInputTimes, 37 std::vector<int> *sampledLengthCache, std::vector<int> *sampledInputIndice); 43 std::vector<int> *sampledInputXs, std::vector<int> *sampledInputYs, 44 std::vector<int> *sampledInputTimes, std::vector<int> *sampledLengthCache, 45 std::vector<int> *sampledInputIndice); 48 static void popInputData(std::vector<int> *sampledInputXs, std::vector<int> *sampledInputYs, 49 std::vector<int> *sampledInputTimes, std::vector<int> *sampledLengthCache, [all …]
|
/packages/modules/NeuralNetworks/common/types/include/nnapi/ |
D | TypeUtils.h | 51 std::optional<size_t> getNonExtensionSize(OperandType operandType, const Dimensions& dimensions); 52 std::optional<size_t> getNonExtensionSize(const Operand& operand); 58 std::pair<int32_t, int32_t> getIntsFromOffset(size_t offset); 60 Result<std::vector<uint32_t>> countNumberOfConsumers(size_t numberOfOperands, 61 const std::vector<nn::Operation>& operations); 67 std::pair<size_t, std::vector<size_t>> getMemorySizes(const Model& model); 89 std::ostream& operator<<(std::ostream& os, const DeviceStatus& deviceStatus); 90 std::ostream& operator<<(std::ostream& os, const ExecutionPreference& executionPreference); 91 std::ostream& operator<<(std::ostream& os, const DeviceType& deviceType); 92 std::ostream& operator<<(std::ostream& os, const MeasureTiming& measureTiming); [all …]
|
/packages/modules/Bluetooth/system/gd/packet/parser/ |
D | main.cc | 42 const std::filesystem::path& input_file, 43 const std::filesystem::path& include_dir, 44 const std::filesystem::path& out_dir, 45 const std::string& root_namespace); 49 const std::filesystem::path& input_file, 50 const std::filesystem::path& include_dir, 51 const std::filesystem::path& out_dir, 52 const std::string& root_namespace, 57 const std::filesystem::path& input_file, 58 const std::filesystem::path& include_dir, [all …]
|
/packages/modules/NeuralNetworks/runtime/ |
D | Manager.cpp | 107 static std::shared_ptr<DriverDevice> create(SharedDevice device); 112 const std::string& getName() const override { return kInterface->getName(); } in getName() 113 const std::string& getVersionString() const override { return kInterface->getVersionString(); } in getVersionString() 116 const std::vector<Extension>& getSupportedExtensions() const override { in getSupportedExtensions() 119 std::vector<bool> getSupportedOperations(const MetaModel& metaModel) const override; 136 std::pair<uint32_t, uint32_t> getNumberOfCacheFilesNeeded() const override { in getNumberOfCacheFilesNeeded() 153 std::pair<int, std::shared_ptr<RuntimePreparedModel>> prepareModel( 156 const std::optional<CacheToken>& maybeToken, 157 const std::vector<TokenValuePair>& metaData, 158 const std::vector<ExtensionNameAndPrefix>& extensionNameAndPrefix) const override; [all …]
|
D | ExecutionPlan.h | 99 typedef std::pair<uint32_t, uint32_t> SourceOperandIndex; 115 std::vector<const ModelBuilder*> mModels; 190 std::optional<LocationAndShape> lookup(SourceOperandIndex sourceOperandIndex, 208 std::map<SourceOperandIndex, InternalLocationAndShape> mSourceOperandToTemporary; 211 std::map<uint32_t, std::vector<SourceOperandIndex>> mStepIndexToSourceOperandIndexes; 213 std::map<uint32_t, std::unique_ptr<MemoryAshmem>> mStepIndexToMemory; 217 std::set<uint32_t> mAllocatedStepIndexes; 233 typedef std::vector<std::pair<uint32_t, uint32_t>> RemapVectorType; 234 typedef std::set<std::pair<uint32_t, uint32_t>> StepModelOutputSetType; 239 std::shared_ptr<Device> device); [all …]
|
/packages/providers/MediaProvider/jni/ |
D | node-inl.h | 57 const std::unique_ptr<const RedactionInfo> ri; 75 std::vector<std::shared_ptr<DirectoryEntry>> de; 82 FdAccessResult(const std::string& file_path, const bool should_redact) in FdAccessResult() 85 const std::string file_path; 100 explicit NodeTracker(std::recursive_mutex* lock) : lock_(lock) {} in NodeTracker() 105 std::lock_guard<std::recursive_mutex> guard(*lock_); in Exists() 113 std::lock_guard<std::recursive_mutex> guard(*lock_); in CheckTracked() 120 std::lock_guard<std::recursive_mutex> guard(*lock_); in NodeDeleted() 130 std::lock_guard<std::recursive_mutex> guard(*lock_); in NodeCreated() 139 std::recursive_mutex* lock_; [all …]
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder_client_ndk.h | 38 inline const std::vector<std::string> kDefaultServers = {"127.0.0.3"}; 39 inline const std::vector<std::string> kDefaultSearchDomains = {"example.com"}; 40 inline const std::vector<int> kDefaultParams = { 51 std::cerr << " Skip test. Remote version is too old, required version: " << version \ 52 << std::endl; \ 62 std::string host; 63 std::string entry; 64 std::string ip4; 65 std::string ip6; 70 static void SetupMappings(unsigned num_hosts, const std::vector<std::string>& domains, [all …]
|
/packages/modules/NeuralNetworks/runtime/test/ |
D | TestServerFlag.cpp | 36 static std::string fakeServerFuncDefault(const std::string& /*categoryName*/, in fakeServerFuncDefault() 37 const std::string& /*flagName*/, in fakeServerFuncDefault() 38 const std::string& /*defaultValue*/) { in fakeServerFuncDefault() 39 return std::to_string(kDefaultFeatureLevelNum); in fakeServerFuncDefault() 42 static std::string fakeServerFuncMax(const std::string& /*categoryName*/, in fakeServerFuncMax() 43 const std::string& /*flagName*/, in fakeServerFuncMax() 44 const std::string& /*defaultValue*/) { in fakeServerFuncMax() 45 return std::to_string(kMaxFeatureLevelNum); in fakeServerFuncMax() 48 static std::string fakeServerFuncMin(const std::string& /*categoryName*/, in fakeServerFuncMin() 49 const std::string& /*flagName*/, in fakeServerFuncMin() [all …]
|
/packages/modules/NeuralNetworks/common/types/src/ |
D | TypeUtils.cpp | 45 constexpr std::underlying_type_t<Type> underlyingType(Type object) { in underlyingType() 46 return static_cast<std::underlying_type_t<Type>>(object); in underlyingType() 50 std::ostream& operator<<(std::ostream& os, const std::vector<Type>& vec) { in operator <<() 67 std::vector<Capabilities::OperandPerformance> makeOperandPerformance( in makeOperandPerformance() 89 std::vector<Capabilities::OperandPerformance> operandPerformance; in makeOperandPerformance() 90 operandPerformance.reserve(std::size(kOperandTypes)); in makeOperandPerformance() 91 std::transform(std::begin(kOperandTypes), std::end(kOperandTypes), in makeOperandPerformance() 92 std::back_inserter(operandPerformance), [&perfInfo](OperandType op) { in makeOperandPerformance() 98 void update(std::vector<Capabilities::OperandPerformance>* operandPerformance, OperandType type, in update() 101 auto it = std::lower_bound(operandPerformance->begin(), operandPerformance->end(), type, in update() [all …]
|
/packages/modules/adb/ |
D | transport.h | 47 using FeatureSet = std::vector<std::string>; 60 std::string FeatureSetToString(const FeatureSet& features); 61 FeatureSet StringToFeatureSet(const std::string& features_string); 64 bool CanUseFeature(const FeatureSet& feature_set, const std::string& feature); 111 virtual bool Write(std::unique_ptr<apacket> packet) = 0; 116 virtual bool DoTlsHandshake(RSA* key, std::string* auth_key = nullptr) = 0; 121 virtual bool Attach(std::string* error) { in Attach() 126 virtual bool Detach(std::string* error) { in Detach() 131 std::string Serial() const; 135 static std::unique_ptr<Connection> FromFd(unique_fd fd); [all …]
|
/packages/modules/StatsD/statsd/src/metrics/ |
D | MetricProducer.h | 126 std::vector<DropEvent> dropEvents; 138 ? std::make_optional<bool>(metric.split_bucket_for_app_upgrade()) in getAppUpgradeBucketSplit() 139 : std::nullopt; in getAppUpgradeBucketSplit() 151 const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap, 152 const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& 171 const std::vector<sp<AtomMatchingTracker>>& allAtomMatchingTrackers, in onConfigUpdated() 172 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap, in onConfigUpdated() 173 const std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap, in onConfigUpdated() 175 const std::vector<sp<ConditionTracker>>& allConditionTrackers, in onConfigUpdated() 176 const std::unordered_map<int64_t, int>& conditionTrackerMap, in onConfigUpdated() [all …]
|