Home
last modified time | relevance | path

Searched refs:j (Results 1 – 25 of 188) sorted by relevance

12345678

/base/usb/usb_manager/test/native/js_unittest/
DUsbDevicePipeJsunitEx.test.js62 function findInitPoint(testParam, j) { argument
64 for (var k = 0; k < testParam.config.interfaces[j].endpoints.length; k++) {
65 var endpoint = testParam.config.interfaces[j].endpoints[k];
79 testParam.interface = testParam.config.interfaces[j]
85 function getFlag(testParam, j) { argument
86 if (testParam.config.interfaces[j].clazz != 10 ||
87 testParam.config.interfaces[j].subclass != 0 ||
88 testParam.config.interfaces[j].protocol != 2) {
92 if (testParam.config.interfaces[j].endpoints.length == 0) {
100 for (var j = 0; j < testParam.config.interfaces.length; j++) {
[all …]
DUsbDevicePipeJsunit.test.js62 function findInitPoint(testParam, j) { argument
64 for (var k = 0; k < testParam.config.interfaces[j].endpoints.length; k++) {
65 var endpoint = testParam.config.interfaces[j].endpoints[k];
78 testParam.interface = testParam.config.interfaces[j]
84 function getFlag(testParam, j) { argument
85 if (testParam.config.interfaces[j].endpoints.length == 0) {
89 if (testParam.config.interfaces[j].clazz != 10 ||
90 testParam.config.interfaces[j].subclass != 0 ||
91 testParam.config.interfaces[j].protocol != 2) {
98 for (var j = 0; j < testParam.config.interfaces.length; j++) {
[all …]
/base/security/device_security_level/baselib/utils/src/
Dutils_hexstring.c66 for (int32_t j = 0; j < BYTE_TO_HEX_OPER_LENGTH; j++) { /* iterate through array */ in DslmHexStringToByte() local
67 if ((nibble[j] <= 'F') && (nibble[j] >= 'A')) { in DslmHexStringToByte()
68 nibble[j] = nibble[j] - 'A' + 10; /* decimal conversion, add 10 */ in DslmHexStringToByte()
69 } else if ((nibble[j] <= 'f') && (nibble[j] >= 'a')) { in DslmHexStringToByte()
70 nibble[j] = nibble[j] - 'a' + 10; /* decimal conversion, add 10 */ in DslmHexStringToByte()
71 } else if ((nibble[j] >= '0') && (nibble[j] <= '9')) { in DslmHexStringToByte()
72 nibble[j] = nibble[j] - '0'; in DslmHexStringToByte()
Dutils_base64.c76 uint32_t j = 0; in Base64Encode() local
86 to[j++] = g_base64EncodeTable[(byte >> 18) & 0x3F]; /* get the 1st block by shift 18 */ in Base64Encode()
87 to[j++] = g_base64EncodeTable[(byte >> 12) & 0x3F]; /* get the 2nd block by shift 12 */ in Base64Encode()
88 to[j++] = g_base64EncodeTable[(byte >> 6) & 0x3F]; /* get the 3rd block by shift 6 */ in Base64Encode()
89 to[j++] = g_base64EncodeTable[(byte >> 0) & 0x3F]; in Base64Encode()
130 uint32_t j = 0; in Base64Decode() local
147 if (j < toLen) { in Base64Decode()
148 to[j++] = (byte >> 16) & 0xFF; // 16, the 3rd 8-bit in Base64Decode()
150 if (j < toLen) { in Base64Decode()
151 to[j++] = (byte >> 8) & 0xFF; // 8, the 2nd 8-bit in Base64Decode()
[all …]
/base/security/access_token/frameworks/common/src/
Djson_parser.cpp37 bool JsonParser::GetStringFromJson(const nlohmann::json& j, const std::string& tag, std::string& ou… in GetStringFromJson() argument
39 if (j.find(tag) != j.end() && j.at(tag).is_string()) { in GetStringFromJson()
40 out = j.at(tag).get<std::string>(); in GetStringFromJson()
46 bool JsonParser::GetIntFromJson(const nlohmann::json& j, const std::string& tag, int& out) in GetIntFromJson() argument
48 if (j.find(tag) != j.end() && j.at(tag).is_number()) { in GetIntFromJson()
49 out = j.at(tag).get<int>(); in GetIntFromJson()
55 bool JsonParser::GetUnsignedIntFromJson(const nlohmann::json& j, const std::string& tag, unsigned i… in GetUnsignedIntFromJson() argument
57 if (j.find(tag) != j.end() && j.at(tag).is_number()) { in GetUnsignedIntFromJson()
58 out = j.at(tag).get<unsigned int>(); in GetUnsignedIntFromJson()
64 bool JsonParser::GetBoolFromJson(const nlohmann::json& j, const std::string& tag, bool& out) in GetBoolFromJson() argument
[all …]
/base/startup/appspawn/test/unittest/app_spawn_client_test/
Dapp_spawn_interface_test.cpp64 for (size_t j = 0; j < ARRAY_LENGTH(inputhandle); j++) { variable
65 printf("App_Spawn_Interface_Init_001 %zu %zu \n", i, j);
66 int ret = AppSpawnClientInit(serviceName[i], inputhandle[j]);
67 EXPECT_EQ(((i <= 5) && j == 0 && ret == 0) || (ret != 0), 1); // 3 valid
166 for (size_t j = 0; j < ARRAY_LENGTH(processName); j++) { variable
167 int ret = AppSpawnReqMsgCreate(msgType[i], processName[j], &reqHandle);
168 printf("App_Spawn_Interface_Msg_Create_001 %zu %zu \n", i, j);
169 EXPECT_EQ(((i != 4) && (j < 3) && ret == 0) || (ret != 0), 1); // 4 3 valid index
176 for (size_t j = 0; j < ARRAY_LENGTH(processName); j++) { variable
177 int ret = AppSpawnReqMsgCreate(msgType[i], processName[j], nullptr);
[all …]
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/
Dnative_token_receptor.cpp48 const nlohmann::json& j, std::vector<PermissionStateFull>& permStateList) in NativeReqPermsGet() argument
51 if (j.find(JSON_PERMS) == j.end() || (!j.at(JSON_PERMS).is_array())) { in NativeReqPermsGet()
55 permReqList = j.at(JSON_PERMS).get<std::vector<std::string>>(); in NativeReqPermsGet()
78 void from_json(const nlohmann::json& j, std::shared_ptr<NativeTokenInfoInner>& p) in from_json() argument
82 if (!JsonParser::GetStringFromJson(j, JSON_PROCESS_NAME, native.processName) || in from_json()
88 if (!JsonParser::GetIntFromJson(j, JSON_APL, aplNum) || !DataValidator::IsAplNumValid(aplNum)) { in from_json()
94 if (j.find(JSON_VERSION) == j.end() || (!j.at(JSON_VERSION).is_number())) { in from_json()
97 native.ver = (uint8_t)j.at(JSON_VERSION).get<int>(); in from_json()
102 …if (!JsonParser::GetUnsignedIntFromJson(j, JSON_TOKEN_ID, native.tokenID) || (native.tokenID == 0)… in from_json()
111 if (!JsonParser::GetUnsignedIntFromJson(j, JSON_TOKEN_ATTR, native.tokenAttr)) { in from_json()
[all …]
/base/security/device_auth/frameworks/deviceauth_lite/source/json/
Dcommonutil.c53 for (int32_t j = 0; j < BYTE_TO_HEX_OPER_LENGTH; j++) { /* iterate through array */ in hex_string_to_byte() local
54 if ((nibble[j] <= 'F') && (nibble[j] >= 'A')) { in hex_string_to_byte()
55 nibble[j] = nibble[j] - 'A' + 10; /* decimal conversion */ in hex_string_to_byte()
56 } else if ((nibble[j] <= 'f') && (nibble[j] >= 'a')) { in hex_string_to_byte()
57 nibble[j] = nibble[j] - 'a' + 10; /* decimal conversion */ in hex_string_to_byte()
58 } else if ((nibble[j] >= '0') && (nibble[j] <= '9')) { in hex_string_to_byte()
59 nibble[j] = nibble[j] - '0'; in hex_string_to_byte()
/base/sensors/sensor/vibration_convert/core/algorithm/conversion/src/
Dconversion_mfcc.cpp106 for (uint32_t j = 0; j < numFilters_; j++) { in HandleDiscreteCosineTransform() local
107 uint32_t idx = i + (j * numCoeffs_); in HandleDiscreteCosineTransform()
108 coeffs_[i] += (dctMatrix_[idx] * melBands_[j]); in HandleDiscreteCosineTransform()
168 for (uint32_t j = 0; j < numBins_; ++j) { in CalcMelFilterBank() local
169 uint32_t idx = i + (j * numFilters_); in CalcMelFilterBank()
170 if (SetMelFilters(idx, binFs[j], filterHzPos[i], filterHzPos[i + 1], in CalcMelFilterBank()
201 for (uint32_t j = 0; j < numFilters_; j++) { in CreateDCTCoeffs() local
202 uint32_t idx = i + (j * numCoeffs_); in CreateDCTCoeffs()
204 dctMatrix_[idx] = w1 * cos(k * (i + 1) * (j + F_HALF)); in CreateDCTCoeffs()
206 dctMatrix_[idx] = w2 * cos(k * (i + 1) * (j + F_HALF)); in CreateDCTCoeffs()
[all …]
/base/account/os_account/services/accountmgr/src/osaccount/
Dos_account_photo_operator.cpp110 size_t j = 0; in DeCode() local
111 for (j = i; j < SIZET_FOUR; j++) in DeCode()
112 char_array_4[j] = 0; in DeCode()
114 for (j = 0; j < SIZET_FOUR; j++) in DeCode()
115 char_array_4[j] = baseChars_.find(char_array_4[j]); in DeCode()
123 for (j = 0; (j < i - 1); j++) in DeCode()
124 byteStr += char_array_3[j]; in DeCode()
/base/sensors/miscdevice/services/miscdevice_service/haptic_matcher/src/
Dcustom_vibration_matcher.cpp188 size_t j = 0; in MergeCurve() local
189 while (i < curveLeft.size() || j < curveRight.size()) { in MergeCurve()
191 (j == curveRight.size()))) { in MergeCurve()
195 …while (j < curveRight.size() && ((curveRight[j].time < overlapLeft) || (curveRight[j].time > overl… in MergeCurve()
197 newCurve.push_back(curveRight[j]); in MergeCurve()
198 ++j; in MergeCurve()
201 if (i < curveLeft.size() && j < curveRight.size()) { in MergeCurve()
202 if ((curveLeft[i].time < curveRight[j].time) && (j > 0)) { in MergeCurve()
203 int32_t intensity = Interpolation(curveRight[j - 1].time, curveRight[j].time, in MergeCurve()
204 curveRight[j - 1].intensity, curveRight[j].intensity, curveLeft[i].time); in MergeCurve()
[all …]
/base/customization/enterprise_device_management/test/unittest/interface/plugin_kits/
Dutils_test.cpp191 size_t j = 0; variable
192 while (i < data.size() && j < currentData.size()) {
193 if (data[i] == currentData[j]) {
196 j++;
197 } else if (data[i] < currentData[j]) {
201 resultData.push_back(currentData[j]);
202 j++;
209 while (j < currentData.size()) {
210 resultData.push_back(currentData[j]);
211 j++;
[all …]
/base/hiviewdfx/hisysevent/frameworks/native/c_wrapper/source/
Dhisysevent_c_wrapper.cpp30 for (size_t j = 0; j < MAX_LENGTH_OF_PARAM_NAME && wrapper.paramName[j] != '\0'; j++) { in ConvertParamWrapper() local
31 dest[i].name[j] = wrapper.paramName[j]; in ConvertParamWrapper()
83 for (size_t j = 0; (j < MAX_LENGTH_OF_EVENT_DOMAIN) && (wrapper.domain[j] != '\0'); j++) { in ConvertQueryRuleWrapper() local
84 dest[i].domain[j] = wrapper.domain[j]; in ConvertQueryRuleWrapper()
/base/sensors/miscdevice/frameworks/native/vibrator/src/
Dvibrator_service_client.cpp361 for (int32_t j = 0; j < pattern.events[i].pointNum; ++j) { in PlayPattern() local
367 point.time = pattern.events[i].points[j].time; in PlayPattern()
368 point.intensity = pattern.events[i].points[j].intensity; in PlayPattern()
369 point.frequency = pattern.events[i].points[j].frequency; in PlayPattern()
407 for (int32_t j = 0; j < eventSize; ++j) { in ConvertVibratePackage() local
408 events[j].type = static_cast<VibratorEventType >(vibrateEvents[j].tag); in ConvertVibratePackage()
409 events[j].time = vibrateEvents[j].time; in ConvertVibratePackage()
410 events[j].duration = vibrateEvents[j].duration; in ConvertVibratePackage()
411 events[j].intensity = vibrateEvents[j].intensity; in ConvertVibratePackage()
412 events[j].frequency = vibrateEvents[j].frequency; in ConvertVibratePackage()
[all …]
/base/startup/appspawn/test/unittest/app_spawn_standard_test/
Dapp_spawn_sandboxmgr_test.cpp173 for (size_t j = 0; j < lenCount; j++) { variable
174 testFunc(inputName[i], inputDataLen[j], i, j);
203 for (size_t j = 0; j < lenCount; j++) { variable
204 SandboxSection *section = CreateSandboxSection(inputName[i], inputDataLen[j], 0);
206 section = CreateSandboxSection(inputName[i], inputDataLen[j], 1);
208 section = CreateSandboxSection(inputName[i], inputDataLen[j], SANDBOX_TAG_INVALID);
210 section = CreateSandboxSection(inputName[i], inputDataLen[j], SANDBOX_TAG_INVALID + 1);
308 for (size_t j = 0; j < SANDBOX_TAG_INVALID; j++) { variable
309 SandboxMountNode *path = CreateSandboxMountNode(inputDataLen[i], j);
377 for (size_t j = 0; j < SANDBOX_TAG_INVALID; j++) { variable
[all …]
Dapp_spawn_appmgr_test.cpp126 for (size_t j = 0; j < pidCount; j++) { variable
127 AppSpawnedProcess *app = AddSpawnedProcess(pidInput[j], processNameInput[i]);
128 EXPECT_EQ(app != nullptr, result[i * pidCount + j]);
140 for (size_t j = 0; j < pidCount; j++) { variable
141 AppSpawnedProcess *app = GetSpawnedProcess(pidInput[j]);
142 EXPECT_EQ(app != nullptr, resultGet[j]);
169 for (size_t j = 0; j < pidCount; j++) { variable
170 AppSpawnedProcess *app = AddSpawnedProcess(pidInput[j], processNameInput[i]);
171 EXPECT_EQ(app != nullptr, result[i * pidCount + j]);
183 for (size_t j = 0; j < pidCount; j++) { variable
[all …]
/base/startup/init/services/init/lite/
Dinit_jobs.c40 for (int j = 0; j < g_jobs[i].cmdLines->cmdNum; j++) { in DumpAllJobs() local
41 CmdLine *cmd = &g_jobs[i].cmdLines->cmds[j]; in DumpAllJobs()
140 for (int j = 0; j < cmdLines->cmdNum; ++j) { in DoJob() local
141 DoCmdByIndex(cmdLines->cmds[j].cmdIndex, cmdLines->cmds[j].cmdContent, NULL); in DoJob()
/base/sensors/miscdevice/utils/common/src/
Dvibrator_infos.cpp41 for (int32_t j = 0; j < pointSize; ++j) { in Dump() local
43 … events[i].points[j].time, events[i].points[j].intensity, events[i].points[j].frequency); in Dump()
159 for (size_t j = 0; j < events[i].points.size(); ++j) { in Marshalling() local
160 if (!parcel.WriteInt32(events[i].points[j].time)) { in Marshalling()
164 if (!parcel.WriteInt32(events[i].points[j].intensity)) { in Marshalling()
168 if (!parcel.WriteInt32(events[i].points[j].frequency)) { in Marshalling()
235 for (int32_t j = 0; j < pointSize; ++j) { in Unmarshalling() local
/base/security/access_token/services/accesstokenmanager/main/cpp/src/permission/
Ddlp_permission_set_parser.cpp38 void from_json(const nlohmann::json& j, PermissionDlpMode& p) in from_json() argument
40 if (j.find("name") == j.end() || (!j.at("name").is_string())) { in from_json()
43 p.permissionName = j.at("name").get<std::string>(); in from_json()
48 if (j.find("dlpGrantRange") == j.end() || (!j.at("dlpGrantRange").is_string())) { in from_json()
51 std::string dlpModeStr = j.at("dlpGrantRange").get<std::string>(); in from_json()
/base/telephony/sms_mms/test/fuzztest/smspdubuffer_fuzzer/
Dsmspdubuffer_fuzzer.cpp58 for (uint8_t j = 0; j < TEST_BITS; j++) { in ReadBuffer() local
59 buffer->ReadBits(v3, j); in ReadBuffer()
99 for (uint8_t j = 0; j < TEST_BITS; j++) { in WriteBuffer() local
100 buffer->WriteBits(v3, j); in WriteBuffer()
/base/security/access_token/frameworks/common/include/
Djson_parser.h28 static bool GetStringFromJson(const nlohmann::json& j, const std::string& tag, std::string& out);
29 static bool GetIntFromJson(const nlohmann::json& j, const std::string& tag, int& out);
30 static bool GetUnsignedIntFromJson(const nlohmann::json& j, const std::string& tag, unsigned int& o…
31 static bool GetBoolFromJson(const nlohmann::json& j, const std::string& tag, bool& out);
/base/sensors/sensor/vibration_convert/core/native/src/
Dvibration_convert_core.cpp176 for (int32_t j = curClearBegin; j < i; ++j) { in PreprocessAudioData() local
177 dstData[j] = 0; in PreprocessAudioData()
180 for (int32_t j = preClearEnd; j < curClearBegin; ++j) { in PreprocessAudioData() local
181 dstData[j] = 0; in PreprocessAudioData()
264 int32_t j = rmseSize - 1; in GetRmseLowerDelta() local
265 for (; j >= 0 ; j = (j - 1)) { in GetRmseLowerDelta()
266 if (rmses[j] > lowerDelta) { in GetRmseLowerDelta()
270 if ((j - i) <= 0) { in GetRmseLowerDelta()
273 double totalDuration = (j - i) * rmsTimePerFrame; in GetRmseLowerDelta()
298 int32_t j = newDrwIdxs[0]; in CalcRmsLowerData() local
[all …]
/base/sensors/sensor/vibration_convert/core/utils/src/
Dutils.cpp91 for (size_t j = 0; j < cols; j++) { in TransposeMatrix() local
92 dst[j * rows + i] = values[index++]; in TransposeMatrix()
218 for (size_t j = 0; j < invalidValues.size(); j++) { in ProcessSilence() local
219 if (flag[j]) { in ProcessSilence()
220 preUnzero = invalidValues[j]; in ProcessSilence()
254 for (size_t j = 0; j < (data.size() - count);) { in ObtainAmplitudeEnvelop() local
255 partAmplitude.assign(it + j, it + j + count); in ObtainAmplitudeEnvelop()
258 j += hopLength; in ObtainAmplitudeEnvelop()
/base/sensors/sensor/vibration_convert/core/algorithm/frequency_estimation/src/
Dfrequency_estimation.cpp96 for (size_t j = 0; j < (curFrameSize - 1); ++j) { in GetZeroCrossingRate() local
97 oneFrmData[j] = oneFrmData[j] - curFrameMean; in GetZeroCrossingRate()
98 if (IsLessOrEqual(oneFrmData[j] * oneFrmData[j + 1], 0.0)) { in GetZeroCrossingRate()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/common/src/
Dcm_x509.c147 for (uint32_t j = 0; j < sizeList; ++j) { in GetX509SubjectNameLongFormat() local
149 … int32_t length = GetX509SubjectName(x509cert, subjectNameList[j], subjectName, NAME_MAX_SIZE); in GetX509SubjectNameLongFormat()
154 subjectNameList[j], subjectName, (char)(((j + 1) == sizeList) ? '\0' : ',')) < 0) { in GetX509SubjectNameLongFormat()
157 offset += strlen(subjectNameList[j]) + strlen(subjectName) + NAME_DELIMITER_SIZE; in GetX509SubjectNameLongFormat()
171 for (uint32_t j = 0; j < sizeList; ++j) { in GetX509IssueNameLongFormat() local
173 int32_t length = GetX509IssueName(x509cert, issueNameList[j], issueName, NAME_MAX_SIZE); in GetX509IssueNameLongFormat()
178 issueNameList[j], issueName, (char)(((j + 1) == sizeList) ? '\0' : ',')) < 0) { in GetX509IssueNameLongFormat()
181 offset += strlen(issueNameList[j]) + strlen(issueName) + NAME_DELIMITER_SIZE; in GetX509IssueNameLongFormat()

12345678