/base/notification/distributed_notification_service/services/ans/test/unittest/ |
H A D | notification_preferences_test.cpp | 66 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in TearDown() 74 NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption_, slots); in TestAddNotificationSlot() 80 NotificationPreferences::GetInstance()->CheckSlotForCreateSlot(bundleOption_, slot, info); in TestAddNotificationSlot() 93 ASSERT_EQ((int)NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption_, slots), (int)ERR_OK); in HWTEST_F() 106 ASSERT_EQ((int)NotificationPreferences::GetInstance()->AddNotificationSlots(bundleEmptyOption_, slots), in HWTEST_F() 118 ASSERT_EQ((int)NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption_, slots), in HWTEST_F() 133 ASSERT_EQ((int)NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption_, slots), in HWTEST_F() 151 ASSERT_EQ((int)NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption_, slots), (int)ERR_OK); in HWTEST_F() 164 ASSERT_EQ((int)NotificationPreferences::GetInstance()->AddNotificationSlots(nullptr, slots), in HWTEST_F() 176 ASSERT_EQ((int)NotificationPreferences in HWTEST_F() [all...] |
H A D | permission_filter_test.cpp | 39 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp() 44 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in TearDown() 62 NotificationPreferences::GetInstance()->AddNotificationSlots( in HWTEST_F() 88 NotificationPreferences::GetInstance()->AddNotificationSlots( in HWTEST_F() 90 NotificationPreferences::GetInstance()->SetNotificationsEnabledForBundle( in HWTEST_F()
|
H A D | advanced_notification_utils_test.cpp | 77 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp() 393 NotificationPreferences::GetInstance()->GetNotificationsEnabledForBundle(bundle, enable); in HWTEST_F() 409 NotificationPreferences::GetInstance()->SetHasPoppedDialog(bundle, true); in HWTEST_F()
|
H A D | advanced_notification_slot_service_test.cpp | 66 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp() 502 NotificationPreferences::GetInstance()->AddNotificationSlots(bundle, slots); in HWTEST_F()
|
H A D | advanced_notification_live_view_service_test.cpp | 83 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp()
|
H A D | advanced_notification_publish_service_test.cpp | 71 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp() 464 NotificationPreferences::GetInstance()->SetHasPoppedDialog(bundle, true); in HWTEST_F() 469 NotificationPreferences::GetInstance()->SetHasPoppedDialog(bundle, false); in HWTEST_F()
|
H A D | advanced_notification_service_test.cpp | 94 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp()
|
/base/notification/distributed_notification_service/services/ans/src/ |
H A D | notification_preferences.cpp | 39 std::mutex NotificationPreferences::instanceMutex_; 40 std::shared_ptr<NotificationPreferences> NotificationPreferences::instance_; 42 NotificationPreferences::NotificationPreferences() in NotificationPreferences() function in OHOS::Notification::NotificationPreferences 53 std::shared_ptr<NotificationPreferences> NotificationPreferences::GetInstance() in GetInstance() 58 auto instance = std::make_shared<NotificationPreferences>(); in GetInstance() 65 ErrCode NotificationPreferences::AddNotificationSlots( in AddNotificationSlots() 101 ErrCode NotificationPreferences [all...] |
H A D | advanced_notification_slot_service.cpp | 81 result =NotificationPreferences::GetInstance()->GetNotificationSlot(bundleOption, in AddSlots() 94 result = NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption, addSlots); in AddSlots() 117 result = NotificationPreferences::GetInstance()->GetNotificationAllSlots(bundleOption, slots); in GetSlots() 155 result = NotificationPreferences::GetInstance()->GetNotificationAllSlots(bundle, slots); in GetSlotsByBundle() 195 result = NotificationPreferences::GetInstance()->GetNotificationSlot(bundle, slotType, slot); in GetSlotByBundle() 232 result = NotificationPreferences::GetInstance()->UpdateNotificationSlots(bundle, slots); in UpdateSlots() 267 if (NotificationPreferences::GetInstance()->GetNotificationSlot( in RemoveAllSlots() 272 result = NotificationPreferences::GetInstance()->RemoveNotificationAllSlots(bundleOption); in RemoveAllSlots() 286 (void)NotificationPreferences::GetInstance()->AddNotificationSlots(bundleOption, slots); in RemoveAllSlots() 315 result = NotificationPreferences in AddSlotByType() [all...] |
H A D | permission_filter.cpp | 38 NotificationPreferences::GetInstance()->GetNotificationsEnabledForBundle(record->bundleOption, enable); in OnPublish() 50 result = NotificationPreferences::GetInstance()->GetNotificationSlot(record->bundleOption, slotType, slot); in OnPublish()
|
H A D | advanced_notification_live_view_service.cpp | 280 auto result = NotificationPreferences::GetInstance()->SetKvToDb( in SetNotificationRequestToDb() 305 int32_t result = NotificationPreferences::GetInstance()->GetKvFromDb(key, value, userId); in GetNotificationRequestFromDb() 348 NotificationPreferences::GetInstance()->GetBatchKvsFromDb(REQUEST_STORAGE_KEY_PREFIX, dbRecords, userId); in GetBatchNotificationRequestsFromDb() 350 NotificationPreferences::GetInstance()->GetBatchKvsFromDb( in GetBatchNotificationRequestsFromDb() 397 auto result = NotificationPreferences::GetInstance()->DeleteKvFromDb(secureKey, userId); in DoubleDeleteNotificationFromDb() 408 auto result = NotificationPreferences::GetInstance()->DeleteKvFromDb(key, userId); in DeleteNotificationRequestFromDb() 415 result = NotificationPreferences::GetInstance()->DeleteKvFromDb(lockScreenPictureKey, userId); in DeleteNotificationRequestFromDb() 431 if (NotificationPreferences::GetInstance()->GetNotificationSlot(bundleOption, slotType, slot) != ERR_OK) { in IsAllowedRemoveSlot() 484 auto res = NotificationPreferences::GetInstance()->SetByteToDb(key, pixelsVec, request->GetReceiverUserId()); in SetLockScreenPictureToDb() 497 uint32_t res = NotificationPreferences in GetLockScreenPictureFromDb() [all...] |
H A D | advanced_notification_utils.cpp | 531 ErrCode result = NotificationPreferences::GetInstance()->RemoveNotificationForBundle(bundleOption); in OnBundleRemoved() 533 ANS_LOGW("NotificationPreferences::RemoveNotificationForBundle failed: %{public}d", result); in OnBundleRemoved() 567 NotificationPreferences::GetInstance()->RemoveAnsBundleDbInfo(bundleOption); in OnBundleRemoved() 571 NotificationPreferences::GetInstance()->RemoveEnabledDbByBundle(bundleOption); in OnBundleRemoved() 598 NotificationPreferences::GetInstance()->RemoveDoNotDisturbProfileTrustList(userId, bundleOption); in RemoveDoNotDisturbProfileTrustList() 614 auto errCode = NotificationPreferences::GetInstance()->SetNotificationsEnabledForBundle(bundleOption, true); in OnBundleDataAdd() 619 errCode = NotificationPreferences::GetInstance()->SetShowBadge(bundleOption, true); in OnBundleDataAdd() 646 auto errCode = NotificationPreferences::GetInstance()->GetNotificationsEnabledForBundle( in OnBundleDataUpdate() 858 NotificationPreferences::GetInstance()->AddDoNotDisturbProfiles(copyUserId, copyProfiles); in AddDoNotDisturbProfiles() 887 NotificationPreferences in RemoveDoNotDisturbProfiles() [all...] |
H A D | notification_extension_wrapper.cpp | 71 std::string ctrlConfig = NotificationPreferences::GetInstance()->GetAdditionalConfig("NOTIFICATION_CTL_LIST_PKG"); in InitExtentionWrapper() 76 std::string aggregateConfig = NotificationPreferences::GetInstance()->GetAdditionalConfig("AGGREGATE_CONFIG"); in InitExtentionWrapper()
|
H A D | advanced_notification_publish_service.cpp | 83 result = NotificationPreferences::GetInstance()->SetNotificationsEnabledForBundle(bundle, enabled); in SetDefaultNotificationEnabled() 528 result = NotificationPreferences::GetInstance()->SetTotalBadgeNums(bundleOption, num); in SetNotificationBadgeNum() 757 result = NotificationPreferences::GetInstance()->SetShowBadge(bundle, enabled); in SetShowBadgeEnabledForBundle() 807 result = NotificationPreferences::GetInstance()->IsShowBadge(bundle, enabled); in GetShowBadgeEnabledForBundle() 833 result = NotificationPreferences::GetInstance()->IsShowBadge(bundleOption, enabled); in GetShowBadgeEnabled() 932 result = NotificationPreferences::GetInstance()->SetNotificationsEnabled(userId, enabled); in SetNotificationsEnabledForAllBundles() 973 ErrCode saveRef = NotificationPreferences::GetInstance()->GetNotificationsEnabledForBundle( in SetNotificationsEnabledForSpecialBundle() 976 result = NotificationPreferences::GetInstance()->SetNotificationsEnabledForBundle(bundle, enabled); in SetNotificationsEnabledForSpecialBundle() 1023 result = NotificationPreferences::GetInstance()->GetNotificationsEnabled(userId, allowed); in IsAllowedNotify() 1133 result = NotificationPreferences in IsAllowedNotifySelf() [all...] |
H A D | reminder_swing_decision_center.cpp | 152 if (ERR_OK != NotificationPreferences::GetInstance()->IsSmartReminderEnabled(enableSwingDeviceType_, in SwingExecuteDecision()
|
H A D | system_event_observer.cpp | 104 NotificationPreferences::GetInstance()->InitSettingFromDisturbDB(userId); in OnReceiveEvent()
|
H A D | notification_dialog_manager.cpp | 225 ErrCode result = NotificationPreferences::GetInstance()->SetHasPoppedDialog(bundleOption, hasPopped); in SetHasPoppedDialog()
|
H A D | advanced_notification_service.cpp | 176 if (!sourceBundleName.empty() && NotificationPreferences::GetInstance()->IsAgentRelationship( in PrepareNotificationRequest() 435 NotificationPreferences::GetInstance()->IsAgentRelationship(GetClientBundleName(), sourceBundleName) && in PrepareNotificationInfo() 768 if (NotificationPreferences::GetInstance()->GetDoNotDisturbProfile(atoi(profileId.c_str()), userId, profile) != in CheckDoNotDisturbProfile() 837 result = NotificationPreferences::GetInstance()->AddNotificationSlots(record->bundleOption, slots); in UpdateSlotAuthInfo() 1180 result = NotificationPreferences::GetInstance()->GetImportance(bundleOption, importance); in GetBundleImportance() 1876 result = NotificationPreferences::GetInstance()->GetHasPoppedDialog(bundleOption, hasPopped); in GetHasPoppedDialog() 2254 NotificationPreferences::GetInstance()->GetBundleSoundPermission( in CheckSoundPermission()
|
/base/notification/distributed_notification_service/services/ans/test/unittest/notification_subscriber_manager_branch_test/ |
H A D | mock_notification_preferences.cpp | 31 ErrCode NotificationPreferences::GetNotificationSlot(const sptr<NotificationBundleOption> &bundleOption,
in GetNotificationSlot()
|
/base/notification/distributed_notification_service/services/ans/src/clone/ |
H A D | notification_clone_bundle_service.cpp | 51 NotificationPreferences::GetInstance()->GetAllCLoneBundlesInfo(userId, cloneBundles); in OnBackup() 98 NotificationPreferences::GetInstance()->UpdateCloneBundleInfo(userId, *bundle); in OnRestore() 132 NotificationPreferences::GetInstance()->UpdateCloneBundleInfo(userId, *bundle); in HandleBundleEvent()
|
H A D | notification_clone_disturb_service.cpp | 48 NotificationPreferences::GetInstance()->GetDoNotDisturbProfileListByUserId(userId, profiles); in OnBackup() 98 NotificationPreferences::GetInstance()->UpdateDoNotDisturbProfiles(userId, in OnRestore() 188 NotificationPreferences::GetInstance()->UpdateDoNotDisturbProfiles(userId, in HandlerBundleEvent()
|
/base/notification/distributed_notification_service/services/ans/include/ |
H A D | notification_preferences.h | 30 class NotificationPreferences final { 32 NotificationPreferences(); 33 ~NotificationPreferences() = default; 35 * @brief Get NotificationPreferences instance object. 37 static std::shared_ptr<NotificationPreferences> GetInstance(); 409 static std::shared_ptr<NotificationPreferences> instance_;
|
/base/notification/distributed_notification_service/services/ans/src/notification_smart_reminder/ |
H A D | smart_reminder_center.cpp | 301 if (NotificationPreferences::GetInstance()->IsSmartReminderEnabled(deviceType, isEnable) != ERR_OK || !isEnable) { in IsNeedSynergy() 312 if (NotificationPreferences::GetInstance()->IsDistributedEnabledByBundle( in IsNeedSynergy()
|
/base/notification/distributed_notification_service/services/test/moduletest/ |
H A D | ans_module_test.cpp | 105 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUpTestCase() 112 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in TearDownTestCase() 121 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp() 126 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in TearDown()
|
/base/notification/distributed_notification_service/services/ans/test/unittest/advanced_notification_service_test/ |
H A D | advanced_notification_service_publish_test.cpp | 94 NotificationPreferences::GetInstance()->ClearNotificationInRestoreFactorySettings(); in SetUp()
|