The notification preferences database has migrated to
Infra::NotificationRdbMgr via Domain::GetAnsNotificationRdbMgrInstance().
Remove the legacy NotificationDataMgr class, its unit tests and mock
implementations, and update BUILD.gn files and AGENTS.md accordingly.
Co-Authored-By: Agent
Signed-off-by: stepend98 <yangjun273@huawei.com>
Change-Id: Ie7cb8a875e8d33fe662a45485824175ca22a355f
CheckHealthWhiteList_300 fails when health_white_list_util_test leaves
HEALTH_BUNDLE_WHITE_LIST_KEY data in RDB without cleanup, and a subsequent
test (advanced_notification_publish_service_test after 9023b1a0 switched
to direct ExcuteRemoveAllNotificationsByBundleName) initializes RDB via
ProcForDeleteNotificationFromDb -> CheckRdbStore. The residual data
["testBundleName"] causes CheckInLiveViewList("testBundleName1") to
return false.
Fix:
1. health_white_list_util_test: add TearDown to clear DB key after each case
2. smart_reminder_center_test: clear DB at start of CheckHealthWhiteList_300
for self-contained test isolation
Co-Authored-By: Agent
Signed-off-by: stepend98 <yangjun273@huawei.com>
Change-Id: I5815d209635ea7d815a93075f411106a80e1c670
Group the boolean behavior flags previously scattered across function signatures into the...
Created-by: let_it_rot
Commit-by: let_it_rot
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)
Group the boolean behavior flags previously scattered across function signatures into the ShowLimit struct, and use a new isUpdateDeliveryTime flag to control whether the notification delivery time is refreshed when showing a reminder.
- Add isPlaySound/isSysTimeChanged/isCloseDefaultSound/isSlienceNotification fields to ShowLimit in reminder_data_manager.h
- Add isUpdateDeliveryTime field (default true) to ShowLimit
- ShowReminder: signature changes to (reminder, const ShowLimit& limits); pass limits.isUpdateDeliveryTime through to ReminderRequest::UpdateNotificationRequest
- HandleImmediatelyShow: signature changes to (vector, ShowLimit&, size_t index = 0); OnShow and the recursive ffrt callback now read isSysTimeChanged/isSlienceNotification from limits
- Update all call sites (OnLanguageChanged, LoadShareReminders, UpdateShareReminders, OnDataShareInsertOrDelete, InitShareReminders, boot complete, system time change, ShowActiveReminder) to populate the relevant flags on a local ShowLimit before invoking
- isUpdateDeliveryTime is true only for normal timer trigger (ShowActiveReminder) and system time change trigger; false for all other cases (boot, init, data share, language change)
- Update unit test and both fuzz harnesses to the new signatures

### 二、建议测试周期和提测地址
建议测试完成时间:xxxx.xx.xx
投产上线时间:xxxx.xx.xx
提测地址:CI环境/压测环境
测试账号:
### 三、变更内容
* 3.1 关联PR列表
* 3.2 数据库和部署说明
1. 常规更新
2. 重启unicorn
3. 重启sidekiq
4. 迁移任务:是否有迁移任务,没有写 "无"
5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"
* 3.4 其他技术优化内容(做了什么,变更了什么)
- 重构了 xxxx 代码
- xxxx 算法优化
* 3.5 废弃通知(什么字段、方法弃用?)
* 3.6 后向不兼容变更(是否有无法向后兼容的变更?)
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
自测测试结论:
### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
检查点:
| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx | 否 | 需要 | 不需要 |
| | | | |
接口测试:
性能测试:
并发测试:
其他:
See merge request: openharmony/notification_distributed_notification_service!4975
Add ans_service_sources_test (ohos_static_library, testonly) that wraps ans_service_sources and automatically provides the mock_ans_rdb_mgr_builder strong override (isolated temp DB). All test targets now depend on ans_service_sources_test instead of ans_service_sources, so new test suites automatically get RDB isolation without manual changes.
ans_service_sources_test_config propagates all needed include paths (ans headers, rdb headers, mock headers) to test targets. The mock source (mock_ans_rdb_mgr_builder.cpp) is compiled once into the static lib, avoiding include-path propagation issues with source_set recompilation.
Co-Authored-By: Agent
Signed-off-by: CheerfulRicky <yuegang7@h-partners.com>
Change-Id: Ieafd58f9f1e1433e3381c89a8c105f7191662986
Signed-off-by: CheerfulRicky <yuegang7@h-partners.com>
PublishNotificationForIndirectProxy and PrepareContinuousTaskNotificationRequest
were not setting appName/appIndex on NotificationRequest, causing subscribers
to receive empty values. Add the standard SetAppName/SetAppIndex calls using
BundleManagerHelper, consistent with PrepareNotificationRequest and
PrePublishNotificationBySa.
Co-Authored-By: Agent
Signed-off-by: CheerfulRicky <yuegang7@h-partners.com>
Change-Id: I7714abda9278dd584d5d772157838929822209ec
signatures into the ShowLimit struct, and use a new isUpdateDeliveryTime
flag to control whether the notification delivery time is refreshed when
showing a reminder.
- Add isPlaySound/isSysTimeChanged/isCloseDefaultSound/isSlienceNotification
fields to ShowLimit in reminder_data_manager.h
- Add isUpdateDeliveryTime field (default true) to ShowLimit
- ShowReminder: signature changes to (reminder, const ShowLimit& limits);
pass limits.isUpdateDeliveryTime through to ReminderRequest::
UpdateNotificationRequest
- HandleImmediatelyShow: signature changes to (vector, ShowLimit&,
size_t index = 0); OnShow and the recursive ffrt callback now read
isSysTimeChanged/isSlienceNotification from limits
- Update all call sites (OnLanguageChanged, LoadShareReminders,
UpdateShareReminders, OnDataShareInsertOrDelete, InitShareReminders,
boot complete, system time change, ShowActiveReminder) to populate the
relevant flags on a local ShowLimit before invoking
- isUpdateDeliveryTime is true only for normal timer trigger
(ShowActiveReminder) and system time change trigger; false for all
other cases (boot, init, data share, language change)
- Update unit test and both fuzz harnesses to the new signatures
Signed-off-by: let_it_rot <gaojiaqi7@h-partners.com>
Co-Authored-By: Agent
Refactoring calendar reminder with repeated triggering of time calculation for month and day, and fixing multiple defects
Created-by: let_it_rot
Commit-by: let_it_rot
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)
Refactoring calendar reminder with repeated triggering of time calculation for month and day, and fixing multiple defects
Abandoning the old GetNextDay+monthly jump algorithm and replacing it with a single-layer monthly jump scheme based on absolute month numbers,
Year=absMonth/12 automatically crosses years, eliminating the hidden danger of manual setYear accumulation. Fix the following defects:
1. Multiple accumulations of setYear after the New Year result in a delay of 1 to N years in the next cycle
2. The candidate trigger time is earlier than the start date of firstDesignate
3. When firstDesignate exceeds the coverage range of the loop, it is misjudged as expired
4. setDay=255 is incorrectly normalized by mktime (such as invalid configuration for Hb 30)
Scan range expanded to 5 years, correctly handling the leap year cycle on February 29th.
Add 10 regression tests covering all reachable branches, constructed based on relative time to ensure future feasibility.

### 二、建议测试周期和提测地址
建议测试完成时间:xxxx.xx.xx
投产上线时间:xxxx.xx.xx
提测地址:CI环境/压测环境
测试账号:
### 三、变更内容
* 3.1 关联PR列表
* 3.2 数据库和部署说明
1. 常规更新
2. 重启unicorn
3. 重启sidekiq
4. 迁移任务:是否有迁移任务,没有写 "无"
5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"
* 3.4 其他技术优化内容(做了什么,变更了什么)
- 重构了 xxxx 代码
- xxxx 算法优化
* 3.5 废弃通知(什么字段、方法弃用?)
* 3.6 后向不兼容变更(是否有无法向后兼容的变更?)
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
自测测试结论:
### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
检查点:
| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx | 否 | 需要 | 不需要 |
| | | | |
接口测试:
性能测试:
并发测试:
其他:
See merge request: openharmony/notification_distributed_notification_service!4967
Abandoning the old GetNextDay+monthly jump algorithm and replacing it with a single-layer monthly jump scheme based on absolute month numbers,
Year=absMonth/12 automatically crosses years, eliminating the hidden danger of manual setYear accumulation. Fix the following defects:
1. Multiple accumulations of setYear after the New Year result in a delay of 1 to N years in the next cycle
2. The candidate trigger time is earlier than the start date of firstDesignate
3. When firstDesignate exceeds the coverage range of the loop, it is misjudged as expired
4. setDay=255 is incorrectly normalized by mktime (such as invalid configuration for Hb 30)
Scan range expanded to 5 years, correctly handling the leap year cycle on February 29th.
Add 10 regression tests covering all reachable branches, constructed based on relative time to ensure future feasibility.
Signed-off-by: let_it_rot <gaojiaqi7@h-partners.com>
Co-Authored-By: Agent