/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 …]
|
D | proximity_info_state_utils.cpp | 34 /* static */ int ProximityInfoStateUtils::trimLastTwoTouchPoints(std::vector<int> *sampledInputXs, in trimLastTwoTouchPoints() 35 std::vector<int> *sampledInputYs, std::vector<int> *sampledInputTimes, in trimLastTwoTouchPoints() 36 std::vector<int> *sampledLengthCache, std::vector<int> *sampledInputIndice) { in trimLastTwoTouchPoints() 50 const int pushTouchPointStartIndex, std::vector<int> *sampledInputXs, in updateTouchPoints() 51 std::vector<int> *sampledInputYs, std::vector<int> *sampledInputTimes, in updateTouchPoints() 52 std::vector<int> *sampledLengthCache, std::vector<int> *sampledInputIndice) { in updateTouchPoints() 158 const ProximityInfo *const proximityInfo, const std::vector<int> *const sampledInputXs, in calculateSquaredDistanceFromSweetSpotCenter() 159 const std::vector<int> *const sampledInputYs, const int keyIndex, const int inputIndex) { in calculateSquaredDistanceFromSweetSpotCenter() 169 const ProximityInfo *const proximityInfo, const std::vector<int> *const sampledInputXs, in calculateNormalizedSquaredDistance() 170 const std::vector<int> *const sampledInputYs, const int keyIndex, const int inputIndex) { in calculateNormalizedSquaredDistance() [all …]
|
/packages/services/Car/surround_view/service-impl/ |
D | AnimationModuleTests.cpp | 34 std::map<std::string, CarPart> getSampleCarPartsMap() { in getSampleCarPartsMap() 35 std::vector<std::string> carFrameChildPartIds{"front_left_door", "front_right_door", in getSampleCarPartsMap() 39 android_auto::surround_view::CarPart frame(std::vector<CarVertex>(), in getSampleCarPartsMap() 43 android_auto::surround_view::CarPart frameChild(std::vector<CarVertex>(), in getSampleCarPartsMap() 46 std::vector<std::string>()); in getSampleCarPartsMap() 48 std::map<std::string, CarPart> sampleCarParts; in getSampleCarPartsMap() 49 sampleCarParts.emplace(std::make_pair("frame", frame)); in getSampleCarPartsMap() 50 sampleCarParts.emplace(std::make_pair("front_left_door", frameChild)); in getSampleCarPartsMap() 51 sampleCarParts.emplace(std::make_pair("front_right_door", frameChild)); in getSampleCarPartsMap() 52 sampleCarParts.emplace(std::make_pair("front_left_blinker", frameChild)); in getSampleCarPartsMap() [all …]
|
D | AnimationModule.h | 50 AnimationModule(const std::map<std::string, CarPart>& partsMap, 51 const std::map<std::string, CarTexture>& texturesMap, 52 const std::vector<AnimationInfo>& animations); 55 std::vector<AnimationParam> getUpdatedAnimationParams( 56 const std::vector<VehiclePropValue>& vehiclePropValue); 62 std::string partId; 65 std::vector<std::string> childIds; 82 std::string textureId; 87 std::map<uint64_t, float> vhalProgressMap; 91 std::map<uint64_t, bool> vhalOffMap; [all …]
|
D | IOModuleCommon.h | 35 std::string evsGroupId; 38 std::vector<std::string> evsCameraIds; 41 std::vector<std::string> maskFilenames; 64 std::string carModelConfigFile; 67 std::string carModelObjFile; 76 std::string version; 100 std::array<float, 3> axisVector; 103 std::array<float, 3> rotationPoint; 169 std::array<float, 3> direction; 202 std::string defaultTexture; [all …]
|
D | core_lib.h | 358 return (0 == std::memcmp(intrinsics, rhs.intrinsics, 9 * sizeof(float))) && 359 (0 == std::memcmp(distorion, rhs.distorion, 4 * sizeof(float))) && 360 (0 == std::memcmp(rvec, rhs.rvec, 3 * sizeof(float))) && 361 (0 == std::memcmp(tvec, rhs.tvec, 3 * sizeof(float))) && size == rhs.size && 366 std::memcpy(intrinsics, rhs.intrinsics, 9 * sizeof(float)); 367 std::memcpy(distorion, rhs.distorion, 4 * sizeof(float)); 368 std::memcpy(rvec, rhs.rvec, 3 * sizeof(float)); 369 std::memcpy(tvec, rhs.tvec, 3 * sizeof(float)); 384 return (0 == std::memcmp(pos, rhs.pos, 3 * sizeof(float))) && 385 (0 == std::memcmp(rgba, rhs.rgba, 4 * sizeof(uint8_t))); [all …]
|
D | ObjReader.cpp | 45 const std::array<float, 16> kMat4Identity = { 52 void CopyFaceToCarVertex(const std::vector<std::array<float, kNumberOfAxes>>& currentVertices, in CopyFaceToCarVertex() 53 const std::vector<std::array<float, kNumberOfAxes>>& currentTextures, in CopyFaceToCarVertex() 54 const std::vector<std::array<float, kNumberOfAxes>>& currentNormals, in CopyFaceToCarVertex() 56 std::memcpy(carVertex->pos.data(), currentVertices[vertexId - 1].data(), in CopyFaceToCarVertex() 60 std::memcpy(carVertex->tex_coord.data(), currentTextures[textureId - 1].data(), in CopyFaceToCarVertex() 66 std::memcpy(carVertex->normal.data(), currentNormals[normalId - 1].data(), in CopyFaceToCarVertex() 72 bool ReadObjFromFile(const std::string& objFilename, std::map<std::string, CarPart>* carPartsMap) { in ReadObjFromFile() 76 bool ReadObjFromFile(const std::string& objFilename, const ReadObjOptions& option, in ReadObjFromFile() 77 std::map<std::string, CarPart>* carPartsMap) { in ReadObjFromFile() [all …]
|
D | VhalHandler.cpp | 44 std::scoped_lock<std::mutex> lock(mAccessLock); in initialize() 82 std::vector<VehiclePropValue> propertiesToRead; in pollProperties() 85 std::scoped_lock<std::mutex> lock(mAccessLock); in pollProperties() 96 std::vector<VehiclePropValue> vehiclePropValuesUpdated; in pollProperties() 117 std::scoped_lock<std::mutex> lock(mAccessLock); in pollProperties() 118 std::swap(mPropertyValues, vehiclePropValuesUpdated); in pollProperties() 121 std::unique_lock<std::mutex> sleepLock(mPollThreadSleepMutex); in pollProperties() 125 const nsecs_t kTargetRateNs = std::pow(10, 9) / mRate; in pollProperties() 131 mPollThreadCondition.wait_for(sleepLock, std::chrono::nanoseconds(sleepDurationNs), in pollProperties() 139 std::scoped_lock<std::mutex> lock(mAccessLock); in startPropertiesUpdate() [all …]
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder_client_ndk.h | 31 inline const std::vector<std::string> kDefaultServers = {"127.0.0.3"}; 32 inline const std::vector<std::string> kDefaultSearchDomains = {"example.com"}; 33 inline const std::vector<int> kDefaultParams = { 44 std::cerr << " Skip test. Remote version is too old, required version: " << version \ 45 << std::endl; \ 55 std::string host; 56 std::string entry; 57 std::string ip4; 58 std::string ip6; 63 static void SetupMappings(unsigned num_hosts, const std::vector<std::string>& domains, [all …]
|
D | dns_responder.h | 44 std::string name; 58 std::string toString() const; 66 std::vector<char> rdata; 69 std::string toString() const; 95 std::vector<DNSQuestion> questions; 96 std::vector<DNSRecord> answers; 97 std::vector<DNSRecord> authorities; 98 std::vector<DNSRecord> additionals; 101 bool write(std::vector<uint8_t>* out) const; 102 std::string toString() const; [all …]
|
D | dns_responder_client_ndk.cpp | 40 void DnsResponderClient::SetupMappings(unsigned numHosts, const std::vector<std::string>& domains, in SetupMappings() 41 std::vector<Mapping>* mappings) { in SetupMappings() 58 int netId, const std::vector<int>& params, const std::vector<std::string>& servers, in makeResolverParamsParcel() 59 const std::vector<std::string>& domains, const std::string& tlsHostname, in makeResolverParamsParcel() 60 const std::vector<std::string>& tlsServers, const std::string& caCert) { in makeResolverParamsParcel() 94 unsigned netId, std::vector<std::string>* servers, in GetResolverInfo() 95 std::vector<std::string>* domains, in GetResolverInfo() 96 std::vector<std::string>* tlsServers, res_params* params, in GetResolverInfo() 97 std::vector<ResolverStats>* stats, in GetResolverInfo() 100 std::vector<int32_t> params32; in GetResolverInfo() [all …]
|
/packages/providers/MediaProvider/jni/ |
D | node-inl.h | 44 const std::unique_ptr<const RedactionInfo> ri; 59 std::vector<std::shared_ptr<DirectoryEntry>> de; 75 explicit NodeTracker(std::recursive_mutex* lock) : lock_(lock) {} in NodeTracker() 80 std::lock_guard<std::recursive_mutex> guard(*lock_); in CheckTracked() 87 std::lock_guard<std::recursive_mutex> guard(*lock_); in NodeDeleted() 97 std::lock_guard<std::recursive_mutex> guard(*lock_); in NodeCreated() 106 std::recursive_mutex* lock_; 107 std::unordered_set<const node*> active_nodes_; 113 static node* Create(node* parent, const std::string& name, std::recursive_mutex* lock, in Create() 118 std::lock_guard<std::recursive_mutex> guard(*lock); in Create() [all …]
|
/packages/services/Car/computepipe/runner/engine/ |
D | DefaultEngine.h | 56 std::string source; 58 explicit EngineCommand(std::string s, Type t) : source(s), cmdType(t) { in EngineCommand() 68 std::string source; 69 std::string message; 70 std::string currentPhase; 71 explicit ComponentError(std::string s, std::string m, std::string p, bool fatal = false) 93 Status setArgs(std::string engine_args) override; 94 void setClientInterface(std::unique_ptr<client_interface::ClientInterface>&& client) override; 95 void setPrebuiltGraph(std::unique_ptr<graph::PrebuiltGraph>&& graph) override; 108 void DispatchSerializedData(int streamId, int64_t timestamp, std::string&& output) override; [all …]
|
D | DefaultEngine.cpp | 47 int getStreamIdFromSource(std::string source) { in getStreamIdFromSource() 49 return std::stoi(source.substr(pos + 1)); in getStreamIdFromSource() 53 void DefaultEngine::setClientInterface(std::unique_ptr<ClientInterface>&& client) { in setClientInterface() 54 mClient = std::move(client); in setClientInterface() 57 void DefaultEngine::setPrebuiltGraph(std::unique_ptr<PrebuiltGraph>&& graph) { in setPrebuiltGraph() 58 mGraph = std::move(graph); in setPrebuiltGraph() 66 Status DefaultEngine::setArgs(std::string engine_args) { in setArgs() 68 if (pos != std::string::npos) { in setArgs() 72 if (pos == std::string::npos) { in setArgs() 75 mDisplayStream = std::stoi(engine_args.substr(pos + strlen(kDisplayStreamId))); in setArgs() [all …]
|
/packages/services/Car/watchdog/server/tests/ |
D | ProcPidStatTest.cpp | 39 std::string toString(const PidStat& stat) { in toString() 47 std::string toString(const ProcessStats& stats) { in toString() 48 std::string buffer; in toString() 59 std::string toString(const std::vector<ProcessStats>& stats) { in toString() 60 std::string buffer; in toString() 74 bool isEqual(std::vector<ProcessStats>* lhs, std::vector<ProcessStats>* rhs) { in isEqual() 78 std::sort(lhs->begin(), lhs->end(), [&](const ProcessStats& l, const ProcessStats& r) -> bool { in isEqual() 81 std::sort(rhs->begin(), rhs->end(), [&](const ProcessStats& l, const ProcessStats& r) -> bool { in isEqual() 84 return std::equal(lhs->begin(), lhs->end(), rhs->begin(), in isEqual() 107 std::unordered_map<uint32_t, std::vector<uint32_t>> pidToTids = { in TEST() [all …]
|
/packages/services/Car/computepipe/runner/graph/ |
D | GrpcGraph.cpp | 37 std::pair<Status, std::string> FinishRpcAndGetResult( in FinishRpcAndGetResult() 47 return std::pair(Status::FATAL_ERROR, "Unexpected shutdown of the completion queue"); in FinishRpcAndGetResult() 52 return std::pair(Status::FATAL_ERROR, "Unable to complete RPC request"); in FinishRpcAndGetResult() 57 std::string error_message = in FinishRpcAndGetResult() 58 std::string("Grpc failed with error: ") + grpcStatus.error_message(); in FinishRpcAndGetResult() 60 return std::pair(Status::FATAL_ERROR, std::move(error_message)); in FinishRpcAndGetResult() 63 return std::pair(Status::SUCCESS, std::string("")); in FinishRpcAndGetResult() 69 std::lock_guard lock(mLock); in GetGraphState() 74 std::lock_guard lock(mLock); in GetStatus() 78 std::string GrpcGraph::GetErrorMessage() const { in GetErrorMessage() [all …]
|
/packages/modules/DnsResolver/ |
D | DnsQueryLogTest.cpp | 26 using namespace std::chrono_literals; 33 std::string captureDumpOutput(const DnsQueryLog& queryLog) { in captureDumpOutput() 41 void verifyDumpOutput(const std::string& dumpLog, const std::vector<int>& expectedNetIds) { in verifyDumpOutput() 43 static const std::regex pattern( in verifyDumpOutput() 46 std::string str(dumpLog); in verifyDumpOutput() 47 std::smatch sm; in verifyDumpOutput() 50 EXPECT_TRUE(std::regex_search(str, sm, pattern)); in verifyDumpOutput() 51 EXPECT_EQ(sm[1], std::to_string(netId)); in verifyDumpOutput() 56 EXPECT_FALSE(std::regex_search(str, sm, pattern)); in verifyDumpOutput() 63 const std::vector<std::string> serversV4 = {"127.0.0.1", "1.2.3.4"}; [all …]
|
/packages/inputmethods/LatinIME/native/dicttoolkit/src/utils/ |
D | arguments_parser.h | 36 static OptionSpec keyValueOption(const std::string &valueName, const std::string &defaultValue, in keyValueOption() 37 const std::string &description) { in keyValueOption() 41 static OptionSpec switchOption(const std::string &description) { in switchOption() 47 const std::string &getValueName() const { return mValueName; } in getValueName() 48 const std::string &getDefaultValue() const { return mDefaultValue; } in getDefaultValue() 49 const std::string &getDescription() const { return mDescription; } in getDescription() 52 OptionSpec(const bool needsValue, const std::string &valueName, const std::string &defaultValue, in OptionSpec() 53 const std::string &description) in OptionSpec() 62 std::string mValueName; 63 std::string mDefaultValue; [all …]
|
D | arguments_and_options.h | 33 ArgumentsAndOptions(std::unordered_map<std::string, std::string> &&options, in ArgumentsAndOptions() 34 std::unordered_map<std::string, std::vector<std::string>> &&arguments) in ArgumentsAndOptions() 35 : mIsValid(true), mOptions(std::move(options)), mArguments(std::move(arguments)) {} in ArgumentsAndOptions() 41 bool hasOption(const std::string &optionName) const { in hasOption() 45 const std::string &getOptionValue(const std::string &optionName) const { in getOptionValue() 51 bool hasArgument(const std::string &name) const { in hasArgument() 56 const std::string &getSingleArgument(const std::string &name) const { in getSingleArgument() 62 const std::vector<std::string> &getVariableLengthArguments(const std::string &name) const { in getVariableLengthArguments() 72 const std::unordered_map<std::string, std::string> mOptions; 73 const std::unordered_map<std::string, std::vector<std::string>> mArguments;
|
/packages/apps/Bluetooth/jni/ |
D | com_android_bluetooth_avrcp_target.cpp | 38 static std::shared_timed_mutex interface_mutex; 39 static std::shared_timed_mutex callbacks_mutex; 43 static std::string getCurrentMediaId(); 46 static std::vector<SongInfo> getNowPlayingList(); 48 static std::vector<MediaPlayerInfo> getMediaPlayerList(); 52 static void getFolderItems(uint16_t player_id, std::string media_id, 55 std::string media_id); 69 using map_entry = std::pair<std::string, GetFolderItemsCb>; 70 std::map<std::string, GetFolderItemsCb> get_folder_items_cb_map; 71 std::map<RawAddress, ::bluetooth::avrcp::VolumeInterface::VolumeChangedCb> [all …]
|
/packages/services/Car/watchdog/server/src/ |
D | IoPerfCollection.cpp | 66 const std::chrono::seconds kDefaultBoottimeCollectionInterval = 1s; 67 const std::chrono::seconds kDefaultPeriodicCollectionInterval = 10s; 72 const std::chrono::nanoseconds kMinCollectionInterval = 1s; 75 const std::chrono::nanoseconds kCustomCollectionInterval = 10s; 76 const std::chrono::nanoseconds kCustomCollectionDuration = 30min; 78 const std::string kDumpMajorDelimiter = std::string(100, '-') + "\n"; 104 std::string comm = ""; 111 std::vector<ProcessInfo> topNIoBlockedProcesses = {}; 112 std::vector<ProcessInfo> topNMajorFaultProcesses = {}; 115 std::unique_ptr<std::unordered_map<uint32_t, UidProcessStats>> getUidProcessStats( in getUidProcessStats() [all …]
|
/packages/services/Car/computepipe/router/include/ |
D | Registry.h | 68 std::unique_ptr<PipeHandle<T>> getClientPipeHandle(const std::string& name, in getClientPipeHandle() 69 std::unique_ptr<ClientHandle> clientHandle) { in getClientPipeHandle() 73 return getPipeHandle(name, std::move(clientHandle)); in getClientPipeHandle() 78 std::list<std::string> getPipeList(); 84 Error RegisterPipe(std::unique_ptr<PipeHandle<T>> h, const std::string& name) { in RegisterPipe() 85 std::lock_guard<std::mutex> lock(mPipeDbLock); in RegisterPipe() 91 name, std::unique_ptr<PipeContext<T>>(new PipeContext<T>(std::move(h), name))); in RegisterPipe() 100 name, std::unique_ptr<PipeContext<T>>(new PipeContext<T>(std::move(h), name))); in RegisterPipe() 118 std::unique_ptr<PipeHandle<T>> getPipeHandle(const std::string& name, in getPipeHandle() 119 std::unique_ptr<ClientHandle> clientHandle) { in getPipeHandle() [all …]
|
/packages/modules/DnsResolver/tests/ |
D | resolv_integration_test.cpp | 82 using namespace std::chrono_literals; 111 std::pair<ScopedAddrinfo, int> safe_getaddrinfo_time_taken(const char* node, const char* service, in safe_getaddrinfo_time_taken() 115 return {std::move(result), s.timeTakenUs() / 1000}; in safe_getaddrinfo_time_taken() 120 NameserverStats(const std::string server) : server(server) {} in NameserverStats() 138 const std::string server; 203 void StartDns(test::DNSResponder& dns, const std::vector<DnsRecord>& records) { in StartDns() 217 EXPECT_EQ(mDnsClient.resolvService()->dump(fd, querylogCmd, std::size(querylogCmd)), 0); in DumpResolverService() 221 std::chrono::milliseconds timeout = std::chrono::milliseconds(1000)) { in WaitForNat64Prefix() 225 bool WaitForPrivateDnsValidation(std::string serverAddr, bool validated) { in WaitForPrivateDnsValidation() 229 bool hasUncaughtPrivateDnsValidation(const std::string& serverAddr) { in hasUncaughtPrivateDnsValidation() [all …]
|
D | dnsresolver_binder_test.cpp | 73 std::shared_ptr<aidl::android::net::IDnsResolver> mDnsResolver; 78 explicit TimedOperation(const std::string& name) : mName(name) {} in TimedOperation() 80 std::cerr << " " << mName << ": " << timeTakenUs() << "us" << std::endl; in ~TimedOperation() 84 std::string mName; 104 std::shared_ptr<DummyListener> dummyListener = ndk::SharedRefBase::make<DummyListener>(); in TEST_F() 119 std::string hostname; in TEST_F() 127 static const std::vector<TestOnDnsEvent::TestResult> expectedResults = { in TEST_F() 151 const std::vector<std::string> test_servers = {listen_addr}; in TEST_F() 152 std::vector<std::string> test_domains = {"example.com"}; in TEST_F() 153 std::vector<int> test_params = {300 /*sample_validity*/, 25 /*success_threshold*/, in TEST_F() [all …]
|
/packages/inputmethods/LatinIME/native/dicttoolkit/tests/utils/ |
D | arguments_parser_test.cpp | 27 std::unordered_map<std::string, OptionSpec> optionSpecs; in TEST() 28 std::vector<ArgumentSpec> argumentSpecs; in TEST() 30 ArgumentsParser(std::move(optionSpecs), std::move(argumentSpecs)).validateSpecs()); in TEST() 33 std::unordered_map<std::string, OptionSpec> optionSpecs; in TEST() 35 const std::vector<ArgumentSpec> argumentSpecs = { in TEST() 41 ArgumentsParser(std::move(optionSpecs), std::move(argumentSpecs)).validateSpecs()); in TEST() 44 const std::vector<ArgumentSpec> argumentSpecs = { in TEST() 48 EXPECT_FALSE(ArgumentsParser(std::unordered_map<std::string, OptionSpec>(), in TEST() 49 std::move(argumentSpecs)).validateSpecs()); in TEST() 52 const std::vector<ArgumentSpec> argumentSpecs = { in TEST() [all …]
|