暂无描述
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
docs(sdd): add ROM optimization SDD baseline (spec/design/plan v2.2) 基于根目录 proposal.md(2026-07-28 评审通过)与 PR #4940 扩展分析, 建立通知子系统 ROM 优化(7,963KB → ≤6,769KB)的 SDD 交付件基线: - proposal.md(v2.2):需求基线迁移 + 16 项代码级核验修订 + 范围暂缓决策 (annex 方向二与小 .so 合并暂缓,可实施潜力 3,287-7,129KB/41.2%-89.5%) - spec.md:10 条 AC(WHEN/THEN)+ 12 条规则,含 JSON 接口族变更受控、 nlohmann 符号消除、字节级等价三重守护 - design.md:11 个 ADR(P4 nlohmann 提取承载于 frameworks/ans/ans_innerkits, 规避 libans_base 依赖循环)+ 缺口矩阵 G1-G19 - execution-plan.md:9 个自包含 Task 卡(P1-P6 阶段映射,AC-1~10 全覆盖) - review.md:GA/GB 门禁记录 + 16 项核验审计轨迹 - annex/:PR #4940 扩展设计存档(1,253 行,PR closed 防丢失) 机器校验:ohos-sdd validate --level all PASS(33 checks / 0 broken / 0 warn) Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I8d0ce0ec989cc8a4e070d1aa2798bdab1e0c6941 | 29 天前 | |
修改配置 Signed-off-by: yizihan <yizihan@huawei.com> | 10 个月前 | |
输入不足告警整改 Signed-off-by: g00586423 <guxiang11@huawei.com> | 1 个月前 | |
test(ans): optimize unit test sleep efficiency with SelfClean mechanism Replace fixed-duration sleep calls in unit/module tests with direct SelfClean(false) / WaitForFfrtQueue() calls, eliminating ~137 sleep calls across 9 test files. This reduces test execution time and improves stability by synchronizing on actual task completion instead of fixed timeouts. Key changes: - Replace sleep with direct SelfClean(false) calls in 9 test files - Replace sleep with direct WaitForFfrtQueue() in subscriber manager test - Clean TearDown residual sleep, add StopCacheCleanupTimer() - Restore 1000ms sleep for 4 rate-limited publish test cases - No new files, no BUILD.gn changes, no macro abstraction Test results: 534/534 (100%) passed on ARM device with CFI disabled. Change-Id: I2b68edbdca43f183f55f681e0701fb543b668240 Change-Id: I3f3ddc0868105a2c6ebdd3232fae9188429114fd Change-Id: I08f7b9b8b45a2d90bd0580f0e92059b03d0aa514 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I44098e741e681234033e3ae9cdf8427205e86bfa | 2 个月前 | |
modify photo Signed-off-by: zhaoyuan17 <zhaoyuan17@huawei.com> | 4 年前 | |
!5014 merge master1 into master 修复string参数校验 Created-by: yi-zihan1 Commit-by: yizihan Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) ### 二、建议测试周期和提测地址 建议测试完成时间: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!5014 | 1 个月前 | |
!4924 merge master into master 输入不足告警整改 Created-by: lx180327070811 Commit-by: g00586423 Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) ### 二、建议测试周期和提测地址 建议测试完成时间: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!4924 | 1 个月前 | |
系统组件使用HDI Signed-off-by: yuechunyang <yuechunyang1@h-partners.com> | 10 个月前 | |
分享实况支持传入userId Co-Authored-By:Agent Signed-off-by: xdongs2009 <xdongs@163.com> | 30 天前 | |
fix(ans): fix stack-buffer-overflow in NotificationHelperFuzzTest from issue #4350 Replace the stack-allocated NotificationSubscriber with a static process-lifetime object. The by-reference subscribe APIs store a raw reference to the subscriber inside SubscriberImpl, so in-flight IPC callbacks on the binder thread could invoke the subscriber after the stack frame was destroyed, causing the ASAN stack-buffer-overflow reported in issue #4350. Also unsubscribe fuzzNotificationSubSptr3 to keep subscribe/unsubscribe symmetric, preventing server-side subscriber records from accumulating across fuzz iterations. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: Id410083aa46ce14b64729ebfd0f412aade4145c0 | 1 个月前 | |
!4924 merge master into master 输入不足告警整改 Created-by: lx180327070811 Commit-by: g00586423 Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) ### 二、建议测试周期和提测地址 建议测试完成时间: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!4924 | 1 个月前 | |
Remove unused NotificationDataMgr and related dead code 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 | 1 个月前 | |
feat(rom-size): ROM size optimization phase 1 - build config and symbol visibility Phase 1 of ROM size optimization (target: 30% reduction, baseline 7963KB). All changes are limited to BUILD.gn/.gni/.map files, no .cpp/.h modifications. Key changes: - Add notification_size_opt_cflags/ldflags public variables in notification.gni - Add -fno-rtti/-flto/-Bsymbolic/-fno-exceptions config to all production targets - Extract ANI sts_*.cpp (21 files) to ohos_shared_library notification_ani_common - Extract NAPI common*.cpp (12 files) to ohos_shared_library notification_napi_common - Tighten libans_innerkits.map from global:* to class-name-based export - Add version_script to 6 NAPI .so (export only napi_module) - Add version_script to 4 ANI .so (export only ANI_Constructor) - Feature-gate priority_notification/clone/geofence source files - Add distributed_notification_service_feature_clone flag Expected benefit: 500-1100KB reduction. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I029559a06708665662b1d2f9b7f66dcae53ee96f Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> | 2 个月前 | |
Update framework struct and add new function Signed-off-by: chensi10 <chen.s@neusoft.com> | 5 年前 | |
处理ans告警 Signed-off-by: yizihan <yizihan@huawei.com> Change-Id: I6797fad139e116676901cf960a7a41a294a80196 | 2 年前 | |
readme文档规范化整改 Signed-off-by: liqiang <liqiang121@huawei.com> Change-Id: If3914c5a9ceabe281f2e6f95bbac8e55d8df5676 | 3 年前 | |
update: 更新文件 bundle.json Signed-off-by: hanwenhui <hanwenhui2@h-partners.com> | 1 个月前 | |
update Signed-off-by: gaojiaqi <gaojiaqi7@huawei.com> | 1 年前 | |
增加notification_ue yaml配置 Signed-off-by: xdongs <xdongs@163.com> | 10 个月前 | |
update: 更新文件 notification.gni Signed-off-by: hanwenhui <hanwenhui2@h-partners.com> | 2 个月前 |
通知子系统
简介
OpenHarmony通过ANS(Advanced Notification Service,通知系统服务)对通知类型的消息进行管理,支持多种通知类型,包括文本,长文本,多文本,图片,社交,媒体等。所有系统服务以及应用都可以通过通知接口发送通知消息,用户可以通过SystemUI查看所有通知消息。
通知常见的使用场景:
- 显示接收到短消息、即时消息等。
- 显示应用的推送消息,如广告、版本更新等。
- 显示当前正在进行的事件,如导航、下载等。
架构图
图1 子系统架构图

目录
/base/notification/distributed_notification_service/
├── frameworks # 接口实现
├── interfaces
│ ├── inner_api # 对内接口目录
│ └── kits # 对外接口目录
├── sa_profile # 服务配置
├── services # 服务实现
└── tools # 工具实现
使用说明
ANS支持4种类型的通道,分别为:
- 社交通讯
- 服务提醒
- 内容资讯
- 其他
应用开发者可以根据使用场景创建通道。通道创建后,提醒方式均为系统默认提醒方式。终端用户可以通过设置应用调整各通道的提醒方式。
应用开发者发可发布以下类型的通知:
- 普通文本
- 长文本
- 图片
- 多行文本
- 社交
并且可调整通知的标签、分组、触发事件等属性。