1 /*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include <gtest/gtest.h>
17
18 #include "ability_command.h"
19 #include "ability_manager_client.h"
20 #include "ability_manager_interface.h"
21 #include "hilog_tag_wrapper.h"
22 #include "mock_ability_manager_stub.h"
23
24 using namespace testing::ext;
25 using namespace OHOS;
26 using namespace OHOS::AAFwk;
27 class AbilityCommandSecondTest : public ::testing::Test {
28 public:
29 static void SetUpTestCase();
30 static void TearDownTestCase();
31 void SetUp() override;
32 void TearDown() override;
33
34 void MakeMockObjects() const;
35
36 std::string cmd_ = "test";
37 };
38
SetUpTestCase()39 void AbilityCommandSecondTest::SetUpTestCase()
40 {}
41
TearDownTestCase()42 void AbilityCommandSecondTest::TearDownTestCase()
43 {}
44
SetUp()45 void AbilityCommandSecondTest::SetUp()
46 {
47 // reset optind to 0
48 optind = 0;
49
50 // make mock objects
51 MakeMockObjects();
52 }
53
TearDown()54 void AbilityCommandSecondTest::TearDown()
55 {}
56
MakeMockObjects() const57 void AbilityCommandSecondTest::MakeMockObjects() const
58 {
59 // mock a stub
60 auto managerStubPtr = sptr<IAbilityManager>(new MockAbilityManagerStub());
61
62 // set the mock stub
63 auto managerClientPtr = AbilityManagerClient::GetInstance();
64 managerClientPtr->proxy_ = managerStubPtr;
65 }
66
67 /**
68 * @tc.number: Ability_Command_Second_Test_0100
69 * @tc.name: ExecCommand
70 * @tc.desc: Verify the "aa test -E" command.
71 */
72 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0100, Function | MediumTest | Level1)
73 {
74 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0100 is called");
75 char* argv[] = {
76 (char*)TOOL_NAME.c_str(),
77 (char*)cmd_.c_str(),
78 (char*)"-E",
79 (char*)"isErrorInfoEnhance",
80 };
81 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
82 AbilityManagerShellCommand cmd(argc, argv);
83 Want want;
84 std::string windowMode;
85 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
86 EXPECT_TRUE(want.GetBoolParam("errorInfoEnhance", false));
87 }
88
89 /**
90 * @tc.number: Ability_Command_Second_Test_0200
91 * @tc.name: ExecCommand
92 * @tc.desc: Verify the "aa test -R" command.
93 */
94 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0200, Function | MediumTest | Level1)
95 {
96 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0200 is called");
97 char* argv[] = {
98 (char*)TOOL_NAME.c_str(),
99 (char*)cmd_.c_str(),
100 (char*)"-R",
101 (char*)"isMultiThread",
102 };
103 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
104 AbilityManagerShellCommand cmd(argc, argv);
105 Want want;
106 std::string windowMode;
107 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
108 EXPECT_TRUE(want.GetBoolParam("multiThread", false));
109 }
110
111 /**
112 * @tc.number: Ability_Command_Second_Test_0300
113 * @tc.name: ExecCommand
114 * @tc.desc: Verify the "aa test -wl xxx" command.
115 */
116 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0300, Function | MediumTest | Level1)
117 {
118 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0300 is called");
119 char* argv[] = {
120 (char*)TOOL_NAME.c_str(),
121 (char*)cmd_.c_str(),
122 (char*)"--wl",
123 (char*)"123",
124 };
125 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
126 AbilityManagerShellCommand cmd(argc, argv);
127 Want want;
128 std::string windowMode;
129 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
130 EXPECT_EQ(want.GetIntParam(Want::PARAM_RESV_WINDOW_LEFT, 0), 123); // 123 is the value of windowLeft
131 }
132
133 /**
134 * @tc.number: Ability_Command_Second_Test_0400
135 * @tc.name: ExecCommand
136 * @tc.desc: Verify the "aa test --wt xxx" command.
137 */
138 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0400, Function | MediumTest | Level1)
139 {
140 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0400 is called");
141 char* argv[] = {
142 (char*)TOOL_NAME.c_str(),
143 (char*)cmd_.c_str(),
144 (char*)"--wt",
145 (char*)"123",
146 };
147 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
148 AbilityManagerShellCommand cmd(argc, argv);
149 Want want;
150 std::string windowMode;
151 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
152 EXPECT_EQ(want.GetIntParam(Want::PARAM_RESV_WINDOW_TOP, 0), 123); // 123 is the value of windowTop
153 }
154
155 /**
156 * @tc.number: Ability_Command_Second_Test_0500
157 * @tc.name: ExecCommand
158 * @tc.desc: Verify the "aa test --wh xxx" command.
159 */
160 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0500, Function | MediumTest | Level1)
161 {
162 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0500 is called");
163 char* argv[] = {
164 (char*)TOOL_NAME.c_str(),
165 (char*)cmd_.c_str(),
166 (char*)"--wh",
167 (char*)"123",
168 };
169 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
170 AbilityManagerShellCommand cmd(argc, argv);
171 Want want;
172 std::string windowMode;
173 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
174 EXPECT_EQ(want.GetIntParam(Want::PARAM_RESV_WINDOW_HEIGHT, 0), 123); // 123 is the value of windowHeight
175 }
176 /**
177 * @tc.number: Ability_Command_Second_Test_0600
178 * @tc.name: ExecCommand
179 * @tc.desc: Verify the "aa test --ww xxx" command.
180 */
181 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0600, Function | MediumTest | Level1)
182 {
183 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0600 is called");
184 char* argv[] = {
185 (char*)TOOL_NAME.c_str(),
186 (char*)cmd_.c_str(),
187 (char*)"--ww",
188 (char*)"123",
189 };
190 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
191 AbilityManagerShellCommand cmd(argc, argv);
192 Want want;
193 std::string windowMode;
194 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
195 EXPECT_EQ(want.GetIntParam(Want::PARAM_RESV_WINDOW_WIDTH, 0), 123); // 123 is the value of windowWidth
196 }
197 /**
198 * @tc.number: Ability_Command_Second_Test_0700
199 * @tc.name: ExecCommand
200 * @tc.desc: Verify the "aa test -s xxx" command.
201 */
202 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0700, Function | MediumTest | Level1)
203 {
204 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0700 is called");
205 char* argv[] = {
206 (char*)TOOL_NAME.c_str(),
207 (char*)cmd_.c_str(),
208 (char*)"-stestMode",
209 (char*)"testMode",
210 };
211 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
212 AbilityManagerShellCommand cmd(argc, argv);
213 Want want;
214 std::string windowMode;
215 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
216 EXPECT_EQ(windowMode, "testMode");
217 }
218
219 /**
220 * @tc.number: Ability_Command_Second_Test_0800
221 * @tc.name: ExecCommand
222 * @tc.desc: Verify the "aa test -m xxx" command.
223 */
224 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0800, Function | MediumTest | Level1)
225 {
226 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0800 is called");
227 char* argv[] = {
228 (char*)TOOL_NAME.c_str(),
229 (char*)cmd_.c_str(),
230 (char*)"-mtestmodulename",
231 (char*)"testModule",
232 };
233 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
234 AbilityManagerShellCommand cmd(argc, argv);
235 Want want;
236 std::string windowMode;
237 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
238 }
239
240 /**
241 * @tc.number: Ability_Command_Second_Test_0900
242 * @tc.name: ExecCommand
243 * @tc.desc: Verify the "aa test -p xxx" command.
244 */
245 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_0900, Function | MediumTest | Level1)
246 {
247 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0900 is called");
248 char* argv[] = {
249 (char*)TOOL_NAME.c_str(),
250 (char*)cmd_.c_str(),
251 (char*)"-pdumpheap",
252 (char*)"dumpheap",
253 };
254 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
255 AbilityManagerShellCommand cmd(argc, argv);
256 Want want;
257 std::string windowMode;
258 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
259 }
260 /**
261 * @tc.number: Ability_Command_Second_Test_1000
262 * @tc.name: ExecCommand
263 * @tc.desc: Verify the "aa test -p xxx" command.
264 */
265 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1000, Function | MediumTest | Level1)
266 {
267 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1000 is called");
268 char* argv[] = {
269 (char*)TOOL_NAME.c_str(),
270 (char*)cmd_.c_str(),
271 (char*)"-p123",
272 (char*)"123",
273 };
274 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
275
276 AbilityManagerShellCommand cmd(argc, argv);
277 Want want;
278 std::string windowMode;
279 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
280 }
281
282 /**
283 * @tc.number: Ability_Command_Second_Test_1100
284 * @tc.name: ExecCommand
285 * @tc.desc: Verify the "aa start -p" command.
286 */
287 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1100, Function | MediumTest | Level1)
288 {
289 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0100 is called");
290 char* argv[] = {
291 (char*)TOOL_NAME.c_str(),
292 (char*)cmd_.c_str(),
293 (char*)"-p",
294 (char*)" ",
295 };
296 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
297
298 AbilityManagerShellCommand cmd(argc, argv);
299 Want want;
300 std::string windowMode;
301 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
302 }
303
304 /**
305 * @tc.number: Ability_Command_Second_Test_1200
306 * @tc.name: ExecCommand
307 * @tc.desc: Verify the "aa start -A" command.
308 */
309 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1200, Function | MediumTest | Level1)
310 {
311 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_0200 is called");
312 char* argv[] = {
313 (char*)TOOL_NAME.c_str(),
314 (char*)cmd_.c_str(),
315 (char*)"-A",
316 (char*)" ",
317 };
318 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
319
320 AbilityManagerShellCommand cmd(argc, argv);
321 Want want;
322 std::string windowMode;
323 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
324 }
325
326 /**
327 * @tc.number: Ability_Command_Second_Test_1300
328 * @tc.name: ExecCommand
329 * @tc.desc: Verify the "aa start -U" command.
330 */
331 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1300, Function | MediumTest | Level1)
332 {
333 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1300 is called");
334 char* argv[] = {
335 (char*)TOOL_NAME.c_str(),
336 (char*)cmd_.c_str(),
337 (char*)"-U",
338 (char*)" ",
339 };
340 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
341
342 AbilityManagerShellCommand cmd(argc, argv);
343 Want want;
344 std::string windowMode;
345 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
346 }
347
348 /**
349 * @tc.number: Ability_Command_Second_Test_1400
350 * @tc.name: ExecCommand
351 * @tc.desc: Verify the "aa start -C" command.
352 */
353 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1400, Function | MediumTest | Level1)
354 {
355 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1400 is called");
356 char* argv[] = {
357 (char*)TOOL_NAME.c_str(),
358 (char*)cmd_.c_str(),
359 (char*)"-C",
360 (char*)"isColdStart",
361 };
362 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
363
364 AbilityManagerShellCommand cmd(argc, argv);
365 Want want;
366 std::string windowMode;
367 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
368 EXPECT_TRUE(want.GetBoolParam("coldStart", false));
369 }
370
371 /**
372 * @tc.number: Ability_Command_Second_Test_1500
373 * @tc.name: ExecCommand
374 * @tc.desc: Verify the "aa start -c" command.
375 */
376 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1500, Function | MediumTest | Level1)
377 {
378 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1500 is called");
379 char* argv[] = {
380 (char*)TOOL_NAME.c_str(),
381 (char*)cmd_.c_str(),
382 (char*)"-c",
383 (char*)" ",
384 };
385 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
386
387 AbilityManagerShellCommand cmd(argc, argv);
388 Want want;
389 std::string windowMode;
390 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
391 EXPECT_EQ(want.GetFlags(), Want::FLAG_ABILITY_CONTINUATION);
392 }
393
394 /**
395 * @tc.number: Ability_Command_Second_Test_1600
396 * @tc.name: ExecCommand
397 * @tc.desc: Verify the "aa start -D" command.
398 */
399 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1600, Function | MediumTest | Level1)
400 {
401 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1600 is called");
402 char* argv[] = {
403 (char*)TOOL_NAME.c_str(),
404 (char*)cmd_.c_str(),
405 (char*)"-D",
406 (char*)"isdebugApp",
407 };
408 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
409
410 AbilityManagerShellCommand cmd(argc, argv);
411 Want want;
412 std::string windowMode;
413 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
414 EXPECT_TRUE(want.GetBoolParam("debugApp", false));
415 }
416
417 /**
418 * @tc.number: Ability_Command_Second_Test_1700
419 * @tc.name: ExecCommand
420 * @tc.desc: Verify the "aa start -S" command.
421 */
422 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1700, Function | MediumTest | Level1)
423 {
424 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1700 is called");
425 char* argv[] = {
426 (char*)TOOL_NAME.c_str(),
427 (char*)cmd_.c_str(),
428 (char*)"-S",
429 (char*)"issandboxApp",
430 };
431 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
432
433 AbilityManagerShellCommand cmd(argc, argv);
434 Want want;
435 std::string windowMode;
436 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
437 EXPECT_TRUE(want.GetBoolParam("sandboxApp", false));
438 }
439
440 /**
441 * @tc.number: Ability_Command_Second_Test_1800
442 * @tc.name: ExecCommand
443 * @tc.desc: Verify the "aa start -N" command.
444 */
445 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1800, Function | MediumTest | Level1)
446 {
447 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1800 is called");
448 char* argv[] = {
449 (char*)TOOL_NAME.c_str(),
450 (char*)cmd_.c_str(),
451 (char*)"-N",
452 (char*)"isNativeDebug",
453 };
454 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
455
456 AbilityManagerShellCommand cmd(argc, argv);
457 Want want;
458 std::string windowMode;
459 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
460 EXPECT_TRUE(want.GetBoolParam("nativeDebug", false));
461 }
462
463 /**
464 * @tc.number: Ability_Command_Second_Test_1900
465 * @tc.name: ExecCommand
466 * @tc.desc: Verify the "aa start -p" command.
467 */
468 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_1900, Function | MediumTest | Level1)
469 {
470 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_1900 is called");
471 char* argv[] = {
472 (char*)TOOL_NAME.c_str(),
473 (char*)cmd_.c_str(),
474 (char*)"-pdumpheap",
475 (char*)"dumpheap",
476 };
477 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
478
479 AbilityManagerShellCommand cmd(argc, argv);
480 Want want;
481 std::string windowMode;
482 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_OK);
483 EXPECT_EQ(want.GetStringParam("perfCmd"), "dumpheap");
484 }
485
486 /**
487 * @tc.number: Ability_Command_Second_Test_2000
488 * @tc.name: ExecCommand
489 * @tc.desc: Verify the "aa start --wl xxx" command.
490 */
491 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_2000, Function | MediumTest | Level1)
492 {
493 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_2000 is called");
494 char* argv[] = {
495 (char*)TOOL_NAME.c_str(),
496 (char*)"start",
497 (char*)"--wl",
498 (char*)"xxx",
499 };
500 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
501
502 AbilityManagerShellCommand cmd(argc, argv);
503 Want want;
504 std::string windowMode;
505 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
506 }
507
508 /**
509 * @tc.number: Ability_Command_Second_Test_2100
510 * @tc.name: ExecCommand
511 * @tc.desc: Verify the "aa start --wt xxx" Function.
512 */
513 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_2100, Function | MediumTest | Level1)
514 {
515 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_2100 is called");
516 char* argv[] = {
517 (char*)TOOL_NAME.c_str(),
518 (char*)"start",
519 (char*)"--wt",
520 (char*)"xxx",
521 };
522 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
523
524 AbilityManagerShellCommand cmd(argc, argv);
525 Want want;
526 std::string windowMode;
527 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
528 }
529
530 /**
531 * @tc.number: Ability_Command_Second_Test_2200
532 * @tc.name: ExecCommand
533 * @tc.desc: Verify the "aa start --wh xxx" Function.
534 */
535 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_2200, Function | MediumTest | Level1)
536 {
537 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_2200 is called");
538 char* argv[] = {
539 (char*)TOOL_NAME.c_str(),
540 (char*)"start",
541 (char*)"--wh",
542 (char*)"xxx",
543 };
544 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
545
546 AbilityManagerShellCommand cmd(argc, argv);
547 Want want;
548 std::string windowMode;
549 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
550 }
551
552 /**
553 * @tc.number: Ability_Command_Second_Test_2300
554 * @tc.name: ExecCommand
555 * @tc.desc: Verify the "aa start --ww xxx" Function.
556 */
557 HWTEST_F(AbilityCommandSecondTest, Ability_Command_Second_Test_2300, Function | MediumTest | Level1)
558 {
559 TAG_LOGI(AAFwkTag::TEST, "Ability_Command_Second_Test_2300 is called");
560 char* argv[] = {
561 (char*)TOOL_NAME.c_str(),
562 (char*)"start",
563 (char*)"--ww",
564 (char*)"xxx",
565 };
566 int argc = sizeof(argv) / sizeof(argv[0]) - 1;
567
568 AbilityManagerShellCommand cmd(argc, argv);
569 Want want;
570 std::string windowMode;
571 EXPECT_EQ(cmd.MakeWantFromCmd(want, windowMode), OHOS::ERR_INVALID_VALUE);
572 }