Home
last modified time | relevance | path

Searched refs:std (Results 1 – 25 of 3210) sorted by relevance

12345678910>>...129

/packages/modules/Bluetooth/system/gd/crypto_toolbox/
Dcrypto_toolbox_test.cc62 std::reverse(std::begin(k), std::end(k)); in TEST()
63 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST()
83 std::reverse(std::begin(k), std::end(k)); in TEST()
84 std::reverse(std::begin(m), std::end(m)); in TEST()
85 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST()
108 std::reverse(std::begin(k), std::end(k)); in TEST()
109 std::reverse(std::begin(m), std::end(m)); in TEST()
110 std::reverse(std::begin(aes_cmac_k_m), std::end(aes_cmac_k_m)); in TEST()
128 std::reverse(std::begin(k), std::end(k)); in TEST()
129 std::reverse(std::begin(m), std::end(m)); in TEST()
[all …]
/packages/modules/Bluetooth/system/test/mock/
Dmock_osi_config.h49 std::string return_value{std::string()};
50 std::function<std::string(const char* filename)> body{
52 std::string operator()(const char* filename) { return body(filename); }; in operator()
61 std::function<bool(const std::string& checksum, const std::string& filename)>
62 body{[this](const std::string& /* checksum */,
63 const std::string& /* filename */) { return return_value; }};
64 bool operator()(const std::string& checksum, const std::string& filename) { in operator()
75 std::function<bool(const config_t& config, const std::string& section,
76 const std::string& key, bool def_value)>
78 const std::string& /* section */,
[all …]
Dmock_device_iot_config.h30 std::function<bool(const std::string& section, const std::string& key,
32 body{[this](const std::string& /* section */,
33 const std::string& /* key */,
35 bool operator()(const std::string& section, const std::string& key, in operator()
47 std::function<bool(const std::string& section, const std::string& key,
49 body{[this](const std::string& /* section */,
50 const std::string& /* key */,
52 bool operator()(const std::string& section, const std::string& key, in operator()
64 std::function<bool(const std::string& section, const std::string& key)> body{
65 [this](const std::string& /* section */, const std::string& /* key */) {
[all …]
Dmock_btif_config.h44 std::function<bool(const RawAddress& bda, int* p_clock_offset)> body{
56 std::function<bool(const RawAddress& bda, int clock_offset)> body{
68 std::function<bool(const std::string& section, const std::string& key)> body{
69 [](const std::string& /* section */, const std::string& /* key */) {
72 bool operator()(const std::string& section, const std::string& key) { in operator()
81 std::function<bool(const std::string& section, const std::string& key,
83 body{[](const std::string& /* section */, const std::string& /* key */,
85 bool operator()(const std::string& section, const std::string& key, in operator()
95 std::function<bool(const std::string& section, const std::string& key,
97 body{[](const std::string& /* section */, const std::string& /* key */,
[all …]
/packages/modules/Bluetooth/system/btif/test/
Dbtif_core_test.cc119 std::unique_ptr<BasePacketBuilder> builder) { in BuilderToView()
120 std::shared_ptr<std::vector<uint8_t>> packet_bytes = in BuilderToView()
121 std::make_shared<std::vector<uint8_t>>(); in BuilderToView()
130 auto timeout_time = std::chrono::seconds(3);
132 std::map<std::string, std::function<void()>> callback_map_;
226 auto promise = std::promise<void>(); in SetUp()
232 ASSERT_EQ(std::future_status::ready, future.wait_for(timeout_time)); in SetUp()
237 auto promise = std::promise<void>(); in TearDown()
243 ASSERT_EQ(std::future_status::ready, future.wait_for(timeout_time)); in TearDown()
274 std::promise<int> promise0;
[all …]
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Dqueue_unittest.cc30 using namespace std::chrono_literals;
77 explicit TestEnqueueEnd(Queue<std::string>* queue, Handler* handler) in TestEnqueueEnd()
82 void RegisterEnqueue(std::unordered_map<int, std::promise<int>>* promise_map) { in RegisterEnqueue()
88 std::promise<void> promise; in UnregisterEnqueue()
92 …common::BindOnce(&TestEnqueueEnd::handle_unregister_enqueue, common::Unretained(this), std::move(p… in UnregisterEnqueue()
96 std::unique_ptr<std::string> EnqueueCallbackForTest() { in EnqueueCallbackForTest()
98 std::this_thread::sleep_for(std::chrono::milliseconds(delay_)); in EnqueueCallbackForTest()
102 std::unique_ptr<std::string> data = std::move(buffer_.front()); in EnqueueCallbackForTest()
104 std::string copy = *data; in EnqueueCallbackForTest()
122 std::queue<std::unique_ptr<std::string>> buffer_;
[all …]
/packages/modules/Bluetooth/system/packet/tests/avrcp/
Davrcp_test_packets.h25 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/StatsD/statsd/src/metrics/parsing_utils/
Dconfig_update_utils.h51 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap,
52 const std::vector<sp<AtomMatchingTracker>>& oldAtomMatchingTrackers,
53 const std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap,
54 std::vector<UpdateStatus>& matchersToUpdate, std::vector<uint8_t>& cycleTracker);
69 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap,
70 const std::vector<sp<AtomMatchingTracker>>& oldAtomMatchingTrackers,
71 std::unordered_map<int, std::vector<int>>& allTagIdsToMatchersMap,
72 std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap,
73 std::vector<sp<AtomMatchingTracker>>& newAtomMatchingTrackers,
74 std::set<int64_t>& replacedMatchers);
[all …]
Dmetrics_manager_util.h63 const std::unordered_map<int64_t, int>& metricToActivationMap, uint64_t& metricHash);
70 const std::vector<sp<AtomMatchingTracker>>& allAtomMatchingTrackers,
71 const std::unordered_map<int64_t, int>& atomMatchingTrackerMap,
72 std::unordered_map<int, std::vector<int>>& trackerToMetricMap, int& logTrackerIndex);
78 const std::unordered_map<int64_t, int>& conditionTrackerMap,
80 const std::vector<sp<ConditionTracker>>& allConditionTrackers, int& conditionIndex,
81 std::unordered_map<int, std::vector<int>>& conditionToMetricMap);
88 const std::unordered_map<int64_t, int>& metricToActivationMap,
89 const std::unordered_map<int64_t, int>& oldAtomMatchingTrackerMap,
90 const std::unordered_map<int64_t, int>& newAtomMatchingTrackerMap,
[all …]
/packages/modules/Bluetooth/system/gd/storage/
Dstorage_module.cc45 static const std::string kFactoryResetProperty = "persist.bluetooth.factoryreset";
49 static const std::chrono::milliseconds kDefaultConfigSaveDelay = std::chrono::milliseconds(3000);
52 static const std::chrono::milliseconds kMinConfigSaveDelay = std::chrono::milliseconds(20);
55 const std::string kConfigFilePrefix = "bt_config-origin";
56 const std::string kConfigFileHash = "hash";
58 const std::string StorageModule::kInfoSection = BTIF_STORAGE_SECTION_INFO;
59 const std::string StorageModule::kTimeCreatedProperty = "TimeCreated";
60 const std::string StorageModule::kTimeCreatedFormat = "%Y-%m-%d %H:%M:%S";
62 const std::string StorageModule::kAdapterSection = BTIF_STORAGE_SECTION_ADAPTER;
65 std::string config_file_path, in StorageModule()
[all …]
Dconfig_cache_helper.h45 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 …]
Dstorage_module.h51 static const std::string kInfoSection;
52 static const std::string kFileSourceProperty;
53 static const std::string kTimeCreatedProperty;
54 static const std::string kTimeCreatedFormat;
56 static const std::string kAdapterSection;
110 std::vector<Device> GetBondedDevices();
120 std::string ToString() const override;
144 std::string config_file_path,
145 std::chrono::milliseconds config_save_delay,
150 bool HasSection(const std::string& section) const;
[all …]
Dconfig_cache.cc31 const std::unordered_set<std::string_view> kEncryptKeyNameList = {
34 bool TrimAfterNewLine(std::string& value) { in TrimAfterNewLine()
35 std::string value_no_newline; in TrimAfterNewLine()
37 if (newline_position != std::string::npos) { in TrimAfterNewLine()
44 bool InEncryptKeyNameList(std::string key) { in InEncryptKeyNameList()
53 const std::unordered_set<std::string_view> kLePropertyNames = {
56 const std::unordered_set<std::string_view> kClassicPropertyNames = {
59 const std::string ConfigCache::kDefaultSectionName = "Global";
61 std::string kEncryptedStr = "encrypted";
63 ConfigCache::ConfigCache(size_t temp_device_capacity, std::unordered_set<std::string_view> persiste… in ConfigCache()
[all …]
Dmutation_entry.h34 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 …]
Dconfig_cache.h54 …ConfigCache(size_t temp_device_capacity, std::unordered_set<std::string_view> persistent_property_…
72 virtual bool HasSection(const std::string& section) const;
73 virtual bool HasProperty(const std::string& section, const std::string& property) const;
75 …virtual std::optional<std::string> GetProperty(const std::string& section, const std::string& prop…
77 virtual std::vector<std::string> GetPersistentSections() const;
79 virtual bool IsPersistentSection(const std::string& section) const;
82 const std::string& section, const std::unordered_set<std::string_view>& property_names) const;
84 virtual bool IsPersistentProperty(const std::string& property) const;
86 virtual std::string SerializeToLegacyFormat() const;
89 std::string section;
[all …]
/packages/services/Car/tools/telemetry/lua-interpreter/tests/
Dlua_engine_test.cc34 std::string ConvertVectorToString(std::vector<std::string> vector) { in ConvertVectorToString()
35 std::stringstream output; in ConvertVectorToString()
36 for (std::string s : vector) { in ConvertVectorToString()
42 std::string ConvertArrayToString(char** array, int size) { in ConvertArrayToString()
43 std::stringstream output; in ConvertArrayToString()
52 std::vector<std::string> output = lua_engine_.ExecuteScript( in TEST_F()
54 std::string actual = ConvertVectorToString(output); in TEST_F()
55 EXPECT_NE(actual.find("LUA: Logging here"), std::string::npos); in TEST_F()
59 std::vector<std::string> output = lua_engine_.ExecuteScript( in TEST_F()
61 std::string actual = ConvertVectorToString(output); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/gd/common/
Dstrings.h41 inline std::string ToString(const T& value) { in ToString()
42 std::stringstream tmp; in ToString()
49 std::string ToHexString(T x) { in ToHexString()
54 std::stringstream tmp; in ToHexString()
55 …tmp << "0x" << std::internal << std::hex << std::setfill('0') << std::setw(sizeof(T) * 2) << (unsi… in ToHexString()
60 inline std::string ToHexString<>(signed long x) {
65 std::stringstream tmp;
66 …tmp << "0x" << std::internal << std::hex << std::setfill('0') << std::setw(sizeof(signed long) * 2)
72 inline std::string ToHexString<>(unsigned int x) {
73 std::stringstream tmp;
[all …]
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/layout/
Dproximity_info_state_utils.h32 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/services/Car/cpp/watchdog/server/tests/
DUidProcStatsCollectorTest.cpp46 const auto& actual = std::get<0>(arg);
47 const auto& expected = std::get<1>(arg);
52 std::string pidStatusStr(pid_t pid, uid_t uid) { in pidStatusStr()
57 std::string smapsRollupStr(uint64_t rssKb, uint64_t pssKb, uint64_t ussKb, uint64_t swapPssKb) { in smapsRollupStr()
58 std::string buffer; in smapsRollupStr()
92 std::string toString(const std::unordered_map<uid_t, UidProcStats>& uidProcStatsByUid) { in toString()
93 std::string buffer; in toString()
106 void applyFeatureFilter(std::unordered_map<uid_t, UidProcStats>* uidProcStatsByUid) { in applyFeatureFilter()
122 bool isSmapsRollupSupported(std::string rootPath) { in isSmapsRollupSupported()
123 std::string path = StringPrintf((rootPath + kSmapsRollupFileFormat).c_str(), 1); in isSmapsRollupSupported()
[all …]
/packages/modules/NeuralNetworks/common/types/include/nnapi/
DTypeUtils.h51 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/
Dmodule_gdx_unittest.cc40 std::promise<pid_t> gdx_external_function_promise;
41 std::promise<pid_t> private_impl_promise;
42 std::promise<pid_t> protected_method_promise;
64 std::shared_ptr<TestGdxModule::PrivateImpl> ptr, int a, double b, char c) { in privateCallableRepostOnMainMethod()
69 std::shared_ptr<TestGdxModule::PrivateImpl> ptr, int a, double b, char c) { in privateCallableRepostOnJniMethod()
74 std::shared_ptr<TestGdxModule::PrivateImpl> ptr, int depth, double b, char c) { in privateCallableRecursiveOnMainMethod()
83 std::shared_ptr<TestGdxModule::PrivateImpl> ptr, int depth, double b, char c) { in privateCallableRecursiveOnJniMethod()
94 protected_method_promise = std::promise<pid_t>(); in call_on_handler_protected_method()
97 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_handler_protected_method()
103 gdx_external_function_promise = std::promise<pid_t>(); in call_on_main_external_function()
[all …]
/packages/modules/NeuralNetworks/runtime/test/
DTestServerFlag.cpp36 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/Bluetooth/tools/rootcanal/model/setup/
Dtest_command_handler.h40 void HandleCommand(const std::string& name,
41 const std::vector<std::string>& args);
44 void RegisterSendResponse(std::function<void(const std::string&)> callback);
49 void AddDevice(const std::vector<std::string>& args);
52 void AddRemote(const std::vector<std::string>& args);
55 void RemoveDevice(const std::vector<std::string>& args);
58 void AddPhy(const std::vector<std::string>& args);
61 void RemovePhy(const std::vector<std::string>& args);
64 void AddDeviceToPhy(const std::vector<std::string>& args);
67 void RemoveDeviceFromPhy(const std::vector<std::string>& args);
[all …]
/packages/modules/Bluetooth/system/bta/le_audio/
Dle_audio_log_history.h24 static std::string kLogConnectionTag("CONN_STATE");
25 static std::string kLogStateMachineTag("SM");
26 static std::string kLogControlPointCmd("ASCS_CP_CMD");
27 static std::string kLogControlPointNotif("ASCS_CP_NOTIF");
28 static std::string kLogAseStateNotif("ASE_NOTIF");
29 static std::string kLogHciEvent("HCI_EVENT");
30 static std::string kLogAfCallBt("AF --> ");
31 static std::string kLogBtCallAf("AF <-- ");
34 static std::string kLogStateChangedOp("STATE CHANGED");
35 static std::string kLogTargetStateChangedOp("TARGET STATE CHANGED");
[all …]
/packages/providers/MediaProvider/jni/
Dnode-inl.h57 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 …]

12345678910>>...129