1 /* 2 * Copyright (c) 2022 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 #define private public 19 #define protected public 20 #include "notification.h" 21 #undef private 22 #undef protected 23 24 #include "notification_request.h" 25 #include "parcel.h" 26 27 using namespace testing::ext; 28 namespace OHOS { 29 namespace Notification { 30 class NotificationTest : public testing::Test { 31 public: SetUpTestCase()32 static void SetUpTestCase() {} TearDownTestCase()33 static void TearDownTestCase() {} SetUp()34 void SetUp() {} TearDown()35 void TearDown() {} 36 }; 37 38 /** 39 * @tc.name: GetBundleName_00001 40 * @tc.desc: Test when request_ is nullptr get parameters. 41 * @tc.type: FUNC 42 * @tc.require: issueI5WBBH 43 */ 44 HWTEST_F(NotificationTest, GetBundleName_00001, Function | SmallTest | Level1) 45 { 46 sptr<NotificationRequest> request = nullptr; 47 auto rrc = std::make_shared<Notification>(request); 48 std::string ret = ""; 49 EXPECT_EQ(rrc->GetBundleName(), ret); 50 EXPECT_EQ(rrc->GetCreateBundle(), ret); 51 EXPECT_EQ(rrc->GetLabel(), ret); 52 EXPECT_EQ(rrc->GetId(), -1); 53 EXPECT_EQ(rrc->GetUid(), 0); 54 EXPECT_EQ(rrc->GetPid(), 0); 55 EXPECT_EQ(rrc->IsUnremovable(), false); 56 EXPECT_EQ(rrc->IsGroup(), false); 57 EXPECT_EQ(rrc->IsFloatingIcon(), false); 58 EXPECT_EQ(rrc->GetUserId(), 0); 59 } 60 61 /** 62 * @tc.name: GetLedLightColor_00001 63 * @tc.desc: Test GetLedLightColor parameters. 64 * @tc.type: FUNC 65 * @tc.require: issueI5WBBH 66 */ 67 HWTEST_F(NotificationTest, GetLedLightColor_00001, Function | SmallTest | Level1) 68 { 69 int32_t color = 10; 70 std::string deviceId = "DeviceId"; 71 sptr<NotificationRequest> request = nullptr; 72 auto rrc = std::make_shared<Notification>(deviceId, request); 73 rrc->SetLedLightColor(color); 74 EXPECT_EQ(rrc->GetLedLightColor(), color); 75 } 76 77 /** 78 * @tc.name: GetLockscreenVisibleness_00001 79 * @tc.desc: Test GetLockscreenVisibleness parameters. 80 * @tc.type: FUNC 81 * @tc.require: issueI5WBBH 82 */ 83 HWTEST_F(NotificationTest, GetLockscreenVisibleness_00001, Function | SmallTest | Level1) 84 { 85 NotificationConstant::VisiblenessType visbleness = NotificationConstant::VisiblenessType::PUBLIC; 86 sptr<NotificationRequest> request = nullptr; 87 auto rrc = std::make_shared<Notification>(request); 88 rrc->SetLockScreenVisbleness(visbleness); 89 EXPECT_EQ(rrc->GetLockscreenVisibleness(), visbleness); 90 } 91 92 /** 93 * @tc.name: GetGroup_00001 94 * @tc.desc: Test GetGroup parameters. 95 * @tc.type: FUNC 96 * @tc.require: issue 97 */ 98 HWTEST_F(NotificationTest, GetGroup_00001, Function | SmallTest | Level1) 99 { 100 sptr<NotificationRequest> request = nullptr; 101 auto rrc = std::make_shared<Notification>(request); 102 std::string ret = ""; 103 EXPECT_EQ(rrc->GetGroup(), ret); 104 } 105 106 /** 107 * @tc.name: GetGroup_00002 108 * @tc.desc: Test when request_ is not nullptr get parameters. 109 * @tc.type: FUNC 110 * @tc.require: issue 111 */ 112 HWTEST_F(NotificationTest, GetGroup_00002, Function | SmallTest | Level1) 113 { 114 sptr<NotificationRequest> request = new NotificationRequest(1); 115 auto rrc = std::make_shared<Notification>(request); 116 std::string ret = ""; 117 EXPECT_EQ(rrc->GetGroup(), ret); 118 EXPECT_EQ(rrc->GetPid(), 0); 119 EXPECT_EQ(rrc->IsUnremovable(), false); 120 EXPECT_EQ(rrc->IsGroup(), false); 121 EXPECT_EQ(rrc->IsFloatingIcon(), false); 122 } 123 124 /** 125 * @tc.name: GetNotificationRequestPoint_00001 126 * @tc.desc: Test GetNotificationRequestPoint parameters. 127 * @tc.type: FUNC 128 * @tc.require: issue 129 */ 130 HWTEST_F(NotificationTest, GetNotificationRequestPoint_00001, Function | SmallTest | Level1) 131 { 132 int32_t notificationId = 10; 133 sptr<NotificationRequest> request = new(std::nothrow) NotificationRequest(notificationId); 134 auto rrc = std::make_shared<Notification>(request); 135 EXPECT_EQ(rrc->GetNotificationRequestPoint()->GetNotificationId(), notificationId); 136 } 137 138 /** 139 * @tc.name: GetPostTime_00001 140 * @tc.desc: Test GetPostTime parameters. 141 * @tc.type: FUNC 142 * @tc.require: issue 143 */ 144 HWTEST_F(NotificationTest, GetPostTime_00001, Function | SmallTest | Level1) 145 { 146 int64_t time = 10; 147 sptr<NotificationRequest> request = nullptr; 148 auto rrc = std::make_shared<Notification>(request); 149 rrc->SetPostTime(time); 150 EXPECT_EQ(rrc->GetPostTime(), time); 151 } 152 153 /** 154 * @tc.name: GetSound_00001 155 * @tc.desc: Test GetSound parameters. 156 * @tc.type: FUNC 157 * @tc.require: issue 158 */ 159 HWTEST_F(NotificationTest, GetSound_00001, Function | SmallTest | Level1) 160 { 161 Uri sound = Uri("sound"); 162 bool enable = true; 163 sptr<NotificationRequest> request = nullptr; 164 auto rrc = std::make_shared<Notification>(request); 165 rrc->SetSound(sound); 166 rrc->SetEnableSound(enable); 167 EXPECT_EQ(rrc->GetSound(), sound); 168 } 169 170 /** 171 * @tc.name: GetVibrationStyle_00001 172 * @tc.desc: Test GetVibrationStyle parameters. 173 * @tc.type: FUNC 174 * @tc.require: issue 175 */ 176 HWTEST_F(NotificationTest, GetVibrationStyle_00001, Function | SmallTest | Level1) 177 { 178 std::vector<int64_t> style; 179 sptr<NotificationRequest> request = nullptr; 180 auto rrc = std::make_shared<Notification>(request); 181 rrc->SetVibrationStyle(style); 182 EXPECT_EQ(rrc->GetVibrationStyle(), style); 183 } 184 185 /** 186 * @tc.name: GetRemindType_00001 187 * @tc.desc: Test GetRemindType parameters. 188 * @tc.type: FUNC 189 * @tc.require: issue 190 */ 191 HWTEST_F(NotificationTest, GetRemindType_00001, Function | SmallTest | Level1) 192 { 193 NotificationConstant::RemindType reminType = NotificationConstant::RemindType::NONE; 194 sptr<NotificationRequest> request = nullptr; 195 auto rrc = std::make_shared<Notification>(request); 196 rrc->SetRemindType(reminType); 197 EXPECT_EQ(rrc->GetRemindType(), reminType); 198 } 199 200 /** 201 * @tc.name: GenerateNotificationKey_00001 202 * @tc.desc: Test GenerateNotificationKey parameters. 203 * @tc.type: FUNC 204 * @tc.require: issue 205 */ 206 HWTEST_F(NotificationTest, GenerateNotificationKey_00001, Function | SmallTest | Level1) 207 { 208 int32_t userId = 10; 209 int32_t uid = 20; 210 std::string label = "Lable"; 211 int32_t id = 30; 212 sptr<NotificationRequest> request = sptr<NotificationRequest>::MakeSptr(); 213 request->SetCreatorUid(uid); 214 request->SetCreatorUserId(userId); 215 request->SetLabel(label); 216 request->SetNotificationId(id); 217 request->SetCreatorBundleName("come.test"); 218 auto rrc = std::make_shared<Notification>(request); 219 std::string result = "_10_20_come.test_Lable_30"; 220 EXPECT_EQ(rrc->GetKey(), result); 221 } 222 223 /** 224 * @tc.name: GenerateNotificationKey_00002 225 * @tc.desc: Test GenerateNotificationKey parameters. 226 * @tc.type: FUNC 227 * @tc.require: issue 228 */ 229 HWTEST_F(NotificationTest, GenerateNotificationKey_00002, Function | SmallTest | Level1) 230 { 231 std::string deviceId = "DeviceId"; 232 int32_t userId = 10; 233 int32_t uid = 20; 234 std::string label = "Lable"; 235 int32_t id = 30; 236 sptr<NotificationRequest> request = sptr<NotificationRequest>::MakeSptr(); 237 request->SetIsAgentNotification(true); 238 request->SetOwnerUid(uid); 239 request->SetOwnerUserId(userId); 240 request->SetLabel(label); 241 request->SetNotificationId(id); 242 request->SetCreatorBundleName("come.push"); 243 request->SetOwnerBundleName("come.test"); 244 auto rrc = std::make_shared<Notification>(deviceId, request); 245 std::string result = "DeviceId_10_20_come.test_Lable_30"; 246 EXPECT_EQ(rrc->GetKey(), result); 247 } 248 249 /** 250 * @tc.name: IsRemoveAllowed_00001 251 * @tc.desc: Test IsRemoveAllowed parameters. 252 * @tc.type: FUNC 253 * @tc.require: issue 254 */ 255 HWTEST_F(NotificationTest, IsRemoveAllowed_00001, Function | SmallTest | Level1) 256 { 257 bool removeAllowed = true; 258 sptr<NotificationRequest> request = nullptr; 259 auto rrc = std::make_shared<Notification>(request); 260 rrc->SetRemoveAllowed(removeAllowed); 261 EXPECT_EQ(rrc->IsRemoveAllowed(), removeAllowed); 262 } 263 264 /** 265 * @tc.name: GetSourceType_00001 266 * @tc.desc: Test GetSourceType parameters. 267 * @tc.type: FUNC 268 * @tc.require: issue 269 */ 270 HWTEST_F(NotificationTest, GetSourceType_00001, Function | SmallTest | Level1) 271 { 272 NotificationConstant::SourceType sourceType = NotificationConstant::SourceType::TYPE_NORMAL; 273 sptr<NotificationRequest> request = nullptr; 274 auto rrc = std::make_shared<Notification>(request); 275 rrc->SetSourceType(sourceType); 276 EXPECT_EQ(rrc->GetSourceType(), sourceType); 277 } 278 279 /** 280 * @tc.name: GetDeviceId_00001 281 * @tc.desc: Test GetDeviceId parameters. 282 * @tc.type: FUNC 283 * @tc.require: issue 284 */ 285 HWTEST_F(NotificationTest, GetDeviceId_00001, Function | SmallTest | Level1) 286 { 287 std::string deviceId = "DeviceId"; 288 sptr<NotificationRequest> request = new NotificationRequest(); 289 auto rrc = std::make_shared<Notification>(deviceId, request); 290 EXPECT_EQ(rrc->GetDeviceId(), deviceId); 291 } 292 293 /** 294 * @tc.name: Dump_00001 295 * @tc.desc: Test Dump parameters. 296 * @tc.type: FUNC 297 * @tc.require: issue 298 */ 299 HWTEST_F(NotificationTest, Dump_00001, Function | SmallTest | Level1) 300 { 301 std::string deviceId = "DeviceId"; 302 sptr<NotificationRequest> request = new NotificationRequest(); 303 auto rrc = std::make_shared<Notification>(deviceId, request); 304 std::string ret = "Notification{ key = DeviceId_-1_0___0, ledLightColor = 0, " 305 "lockscreenVisbleness = 0, remindType = -1, isRemoveAllowed = true, sourceType = 0, " 306 "deviceId = DeviceId, request = NotificationRequest{ notificationId = 0, slotType = 3, " 307 "createTime = 0, deliveryTime = 0, autoDeletedTime = -1, settingsText = , " 308 "creatorBundleName = , creatorPid = 0, creatorUid = 0, ownerBundleName = , " 309 "ownerUid = 0, groupName = , statusBarText = , label = , shortcutId = , " 310 "sortingKey = , groupAlertType = 0, color = 0, badgeNumber = 0, visiblenessType = 0, " 311 "progressValue = 0, progressMax = 0, badgeStyle = 0, classification = , " 312 "notificationContentType = 0, notificationControlFlags = 0, showDeliveryTime = false, " 313 "tapDismissed = true, colorEnabled = false, alertOneTime = false, showStopwatch = false, " 314 "isCountdown = false, inProgress = false, groupOverview = false, isRemoveAllowed = true, " 315 "progressIndeterminate = false, unremovable = false, floatingIcon = false, onlyLocal = false, " 316 "permitted = true, isAgent = false, removalWantAgent = null, maxScreenWantAgent = null, " 317 "additionalParams = null, littleIcon = null, bigIcon = null, overlayIcon = null, " 318 "notificationContent = null, notificationTemplate = null, actionButtons = empty, " 319 "messageUsers = empty, userInputHistory = empty, distributedOptions = " 320 "NotificationDistributedOptions{ isDistributed = true, devicesSupportDisplay = [], " 321 "devicesSupportOperate = [] }, notificationFlags = null, notificationFlagsOfDevices = null, " 322 "notificationBundleOption = null, agentBundle = null, creatorUserId = -1, ownerUserId = -1, " 323 "receiverUserId = -1, updateDeadLine = 0, finishDeadLine = 0, sound = , unifiedGroupInfo_ = null }, postTime = 0, " 324 "sound = nullptr, vibrationStyle = [], updateTimer = 0, finishTimer = 0, archiveTimer = 0 }"; 325 EXPECT_EQ(rrc->Dump(), ret); 326 } 327 328 /** 329 * @tc.name: MarshallingBool_00001 330 * @tc.desc: Test MarshallingBool parameters. 331 * @tc.type: FUNC 332 * @tc.require: issue 333 */ 334 HWTEST_F(NotificationTest, MarshallingBool_00001, Function | SmallTest | Level1) 335 { 336 Parcel parcel; 337 std::string deviceId = "DeviceId"; 338 sptr<NotificationRequest> request = new NotificationRequest(); 339 auto rrc = std::make_shared<Notification>(deviceId, request); 340 EXPECT_EQ(rrc->MarshallingBool(parcel), true); 341 } 342 343 /** 344 * @tc.name: Marshalling_00001 345 * @tc.desc: Test Marshalling parameters. 346 * @tc.type: FUNC 347 * @tc.require: issueI5WBBHI 348 */ 349 HWTEST_F(NotificationTest, Marshalling_00001, Function | SmallTest | Level1) 350 { 351 Parcel parcel; 352 std::string deviceId = "DeviceId"; 353 sptr<NotificationRequest> request = new NotificationRequest(); 354 auto rrc = std::make_shared<Notification>(deviceId, request); 355 EXPECT_EQ(rrc->Marshalling(parcel), true); 356 } 357 358 /** 359 * @tc.name: Unmarshalling_00001 360 * @tc.desc: Test Unmarshalling parameters. 361 * @tc.type: FUNC 362 * @tc.require: issueI5WBBH 363 */ 364 HWTEST_F(NotificationTest, Unmarshalling_001, Function | SmallTest | Level1) 365 { 366 bool unmarshalling = true; 367 Parcel parcel; 368 std::string deviceId = "DeviceId"; 369 sptr<NotificationRequest> request = new NotificationRequest(); 370 std::shared_ptr<Notification> result = 371 std::make_shared<Notification>(deviceId, request); 372 result->Marshalling(parcel); 373 374 if (nullptr != result) { 375 if (nullptr == result->Unmarshalling(parcel)) { 376 unmarshalling = false; 377 } 378 } 379 EXPECT_EQ(unmarshalling, false); 380 } 381 382 /** 383 * @tc.name: ReadFromParcel_00001 384 * @tc.desc: Test ReadFromParcel parameters. 385 * @tc.type: FUNC 386 * @tc.require: issueI5WBBH 387 */ 388 HWTEST_F(NotificationTest, ReadFromParcel_00001, Function | SmallTest | Level1) 389 { 390 Parcel parcel; 391 std::string deviceId = "DeviceId"; 392 sptr<NotificationRequest> request = new NotificationRequest(); 393 auto rrc = std::make_shared<Notification>(deviceId, request); 394 rrc->Marshalling(parcel); 395 EXPECT_EQ(rrc->ReadFromParcel(parcel), false); 396 } 397 398 /** 399 * @tc.name: GetSound_00002 400 * @tc.desc: Test GetSound parameters. 401 * @tc.type: FUNC 402 * @tc.require: issue 403 */ 404 HWTEST_F(NotificationTest, GetSound_00002, Function | SmallTest | Level1) 405 { 406 Uri sound = Uri("sound"); 407 bool enable = false; 408 sptr<NotificationRequest> request = nullptr; 409 auto rrc = std::make_shared<Notification>(request); 410 rrc->SetSound(sound); 411 rrc->SetEnableSound(enable); 412 EXPECT_EQ(rrc->GetSound(), Uri("")); 413 } 414 415 /** 416 * @tc.name: GetSound_00003 417 * @tc.desc: Test GetSound parameters. 418 * @tc.type: FUNC 419 * @tc.require: issue 420 */ 421 HWTEST_F(NotificationTest, GetSound_00003, Function | SmallTest | Level1) 422 { 423 Uri sound = Uri(""); 424 bool enable = true; 425 sptr<NotificationRequest> request = nullptr; 426 auto rrc = std::make_shared<Notification>(request); 427 rrc->SetSound(sound); 428 rrc->SetEnableSound(enable); 429 EXPECT_EQ(rrc->GetSound(), Uri("")); 430 } 431 432 /** 433 * @tc.name: EnableLight_00001 434 * @tc.desc: Test EnableLight parameters. 435 * @tc.type: FUNC 436 * @tc.require: issue 437 */ 438 HWTEST_F(NotificationTest, EnableLight_00001, Function | SmallTest | Level1) 439 { 440 bool enable = true; 441 sptr<NotificationRequest> request = nullptr; 442 auto rrc = std::make_shared<Notification>(request); 443 rrc->SetEnableLight(enable); 444 EXPECT_EQ(rrc->EnableLight(), enable); 445 } 446 447 /** 448 * @tc.name: EnableSound_00001 449 * @tc.desc: Test EnableSound parameters. 450 * @tc.type: FUNC 451 * @tc.require: issue 452 */ 453 HWTEST_F(NotificationTest, EnableSound_00001, Function | SmallTest | Level1) 454 { 455 bool enable = true; 456 sptr<NotificationRequest> request = nullptr; 457 auto rrc = std::make_shared<Notification>(request); 458 rrc->SetEnableSound(enable); 459 EXPECT_EQ(rrc->EnableSound(), enable); 460 Parcel parcel; 461 rrc->ReadFromParcelString(parcel); 462 } 463 464 /** 465 * @tc.name: EnableVibrate_00001 466 * @tc.desc: Test EnableVibrate parameters. 467 * @tc.type: FUNC 468 * @tc.require: issue 469 */ 470 HWTEST_F(NotificationTest, EnableVibrate_00001, Function | SmallTest | Level1) 471 { 472 bool enable = true; 473 sptr<NotificationRequest> request = nullptr; 474 auto rrc = std::make_shared<Notification>(request); 475 rrc->SetEnableVibration(enable); 476 EXPECT_EQ(rrc->EnableVibrate(), enable); 477 } 478 479 /** 480 * @tc.name: GetBundleName_00002 481 * @tc.desc: Test when request_ is nullptr get parameters. 482 * @tc.type: FUNC 483 * @tc.require: issueI5WBBH 484 */ 485 HWTEST_F(NotificationTest, GetBundleName_00002, Function | SmallTest | Level1) 486 { 487 sptr<NotificationRequest> request = new NotificationRequest(1); 488 auto rrc = std::make_shared<Notification>(request); 489 std::string ret = ""; 490 EXPECT_EQ(rrc->GetBundleName(), ret); 491 EXPECT_EQ(rrc->GetCreateBundle(), ret); 492 } 493 494 /** 495 * @tc.name: GetSound_00004 496 * @tc.desc: Test GetSound parameters. 497 * @tc.type: FUNC 498 * @tc.require: issue 499 */ 500 HWTEST_F(NotificationTest, GetSound_00004, Function | SmallTest | Level1) 501 { 502 Uri sound = Uri("sound"); 503 bool enable = false; 504 sptr<NotificationRequest> request = new NotificationRequest(1); 505 auto rrc = std::make_shared<Notification>(request); 506 rrc->SetSound(sound); 507 rrc->SetEnableSound(enable); 508 EXPECT_EQ(rrc->GetSound(), Uri("")); 509 } 510 511 /** 512 * @tc.name: GetSound_00005 513 * @tc.desc: Test GetSound parameters. 514 * @tc.type: FUNC 515 * @tc.require: issue 516 */ 517 HWTEST_F(NotificationTest, GetSound_00005, Function | SmallTest | Level1) 518 { 519 Uri sound = Uri("sound"); 520 bool enable = true; 521 sptr<NotificationRequest> request = new NotificationRequest(1); 522 auto rrc = std::make_shared<Notification>(request); 523 rrc->SetSound(sound); 524 rrc->SetEnableSound(enable); 525 EXPECT_EQ(rrc->GetSound(), Uri("sound")); 526 } 527 528 /** 529 * @tc.name: Marshalling_00002 530 * @tc.desc: Test Marshalling parameters. 531 * @tc.type: FUNC 532 * @tc.require: issueI5WBBHI 533 */ 534 HWTEST_F(NotificationTest, Marshalling_00002, Function | SmallTest | Level1) 535 { 536 Parcel parcel; 537 std::string deviceId = "DeviceId"; 538 sptr<NotificationRequest> request = new NotificationRequest(); 539 auto rrc = std::make_shared<Notification>(deviceId, request); 540 541 bool enable = true; 542 auto sound = std::make_shared<Uri>("sound"); 543 rrc->SetSound(*sound); 544 rrc->SetEnableSound(enable); 545 546 EXPECT_EQ(rrc->Marshalling(parcel), true); 547 } 548 549 /** 550 * @tc.name: Marshalling_00003 551 * @tc.desc: Test Marshalling parameters. 552 * @tc.type: FUNC 553 * @tc.require: issueI5WBBHI 554 */ 555 HWTEST_F(NotificationTest, Marshalling_00003, Function | SmallTest | Level1) 556 { 557 Parcel parcel; 558 std::string deviceId = "DeviceId"; 559 sptr<NotificationRequest> request = new NotificationRequest(); 560 auto rrc = std::make_shared<Notification>(deviceId, request); 561 562 bool enable = false; 563 auto sound = std::make_shared<Uri>("sound"); 564 rrc->SetSound(*sound); 565 rrc->SetEnableSound(enable); 566 567 EXPECT_EQ(rrc->Marshalling(parcel), true); 568 } 569 570 /** 571 * @tc.name: GetUpdateTimer_00001 572 * @tc.desc: Test get update timer. 573 * @tc.type: FUNC 574 * @tc.require: issue 575 */ 576 HWTEST_F(NotificationTest, GetUpdateTimer_00001, Function | SmallTest | Level1) 577 { 578 sptr<NotificationRequest> request = new NotificationRequest(1); 579 auto rrc = std::make_shared<Notification>(request); 580 rrc->SetUpdateTimer(1); 581 EXPECT_EQ(rrc->GetUpdateTimer(), 1); 582 } 583 584 /** 585 * @tc.name: GetFinishTimer_00001 586 * @tc.desc: Test get finish timer. 587 * @tc.type: FUNC 588 * @tc.require: issue 589 */ 590 HWTEST_F(NotificationTest, GetFinishTimer_00001, Function | SmallTest | Level1) 591 { 592 sptr<NotificationRequest> request = new NotificationRequest(1); 593 auto rrc = std::make_shared<Notification>(request); 594 rrc->SetFinishTimer(1); 595 EXPECT_EQ(rrc->GetFinishTimer(), 1); 596 } 597 } // namespace Notification 598 } // namespace OHOS 599