暂无描述
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
修改配置 Signed-off-by: yizihan <yizihan@huawei.com> | 9 个月前 | |
!4871 merge developer-7.0-0709-codecheck into master 新增json相关检视问题点 Created-by: wangsen1994 Commit-by: wangsen1994 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!4871 | 1 个月前 | |
docs: add key fault mode, ANS protection mechanism, importance columns Add three new columns to dependency fault propagation FMEA tables: - Key Fault Mode: concise pattern name for fault propagation - ANS Existing Protection: notification service's own defense mechanisms - Importance: P0/P1/P2/P3 priority rating Updated tables: - Dependency module list (13 modules) - D-level architecture issues (10 rows) - C-level coding issues (8 rows) - Cascade fault scenarios (3 rows) Change-Id: I2ac1180ba79020d1f80a2cfe5a140d22f0dcf2e1 | 18 天前 | |
modify photo Signed-off-by: zhaoyuan17 <zhaoyuan17@huawei.com> | 4 年前 | |
fix(ans): fix warning check defects from issue #4250 Fix various static analysis findings including memory leaks, null pointer dereferences, use-after-free risks, integer overflow, enum range validation, and resource management issues. A. NAPI async work return value unchecked (30+ sites): check napi_create_async_work/napi_queue_async_work_with_qos return values, free asynccallbackinfo on failure; fix subscribe.cpp UB, badge query timeout leak, ETS variant GetEnv leaks C. Type safety: add enum range validation for IPC deserialization (SWITCH_STATE, LiveViewStatus), JSON (clone switch info), JS input (InputEditType, RingtoneType, BadgeStyle, SlotType); fix uint8_t truncation in multiline content marshalling D. Integer overflow: replace atoi/atoll with strtol/strtoll+ERANGE; fix FindLastString logic error (pos != npos always true); fix VectorToString int64_t->int truncation; fix GetRemainPartitionSize returning -1 as uint64_t E. UAF/memory: unregister distributed callbacks in destructor; add ffrt::wait in StopCacheCleanupTimer; unsubscribe CommonEvent in DialogManager destructor; remove DeathRecipient in SubscriberImpl destructor; wait for FFRT queue in LocalLiveViewSubscriberManager F. new(nothrow) unchecked: add null checks for recipient_/deathRecipient_ allocation in 5 manager classes G. Other: implement ClearButtonIconsResource; init HaMetaMessage sceneId_/branchId_; add dlsym for 5 missing function pointers; check OH_DecodingOptions_Create return; fix GetAllDoNotDisturbProfiles substring match; add array length limits; check CreateTimer return; fix pushRecipient_ overwrite logic; add try-catch for JSON parse Change-Id: I4204fe52d9fbbd8d89cf188892ab243847649f59 Change-Id: I5588bd9c663d54a17c429143721c124259401e8d Change-Id: If0705f229837ed1edf0a05712481fb9cfc1f7cda Change-Id: Id494add5740c95d908016934e69ae704c4ad6f70 Change-Id: I73990ec7e4ff7374a71e3da4692e5bc53bfdbc2c Change-Id: I57840e82aa808259fc43b9ae8b942f9b999f1271 Change-Id: I715fc92bede97bde739aed63e384359fd39ad3d7 Change-Id: Ib7dce869072b3b4b812fa46319dca3ce946b7c5a Change-Id: If7359da9013fb008cee436d4db3fd6aa3508421f Change-Id: I984f57d01cc39b9682f8ce08c88b146e50d132d1 Change-Id: I5b307d34ae22ae8a3919eacb1f3d4efe6c7ef75b Change-Id: I922a6fdfadb7344c4649a5e54f8ee439f87069cd Change-Id: I90d91e060c92d6fb0ff056801a58dc056d51b4bc Change-Id: I21e6e587511d98b2fff3306089b42d997333dfcf Change-Id: Ie9afd57cfeb66e5a68fa76a35862e84b47177fbf Change-Id: I29bc907d5653ee322b8a46c9c4523388f8492d47 Change-Id: Ie82eb2cf6541ef43bcd9254cf342e980e4ab19b7 Change-Id: I480ebfe965c7dcb13a2ca30a3b7fb73e35606309 Change-Id: I4e00bfd6020f9f6e50fcab4c7b2d11e824371417 Change-Id: I384d6621b6915c45ad4dc6013c52406bba1b2491 Change-Id: Ifb01195d74f70604e5dd1bad9e291e5ce4d96fcc Change-Id: I99764684c4c029a114734de1161d0591d59e15c1 Change-Id: I2637febf7282779082f5135671328dfaa75f441a Change-Id: I8db817f8e84da51e6c1bf69dfc67c90b1b516f41 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: Idaeb6de6233925455d7da38dc41299229244ba32 | 1 个月前 | |
!4896 merge master into master add subscribeNotification Created-by: bettykico Commit-by: bettykico Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) add subscribeNotification for priorityStrategy Issue: #4243 ### 二、建议测试周期和提测地址 建议测试完成时间: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 | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: Co-Authored-By: Agent See merge request: openharmony/notification_distributed_notification_service!4896 | 1 个月前 | |
系统组件使用HDI Signed-off-by: yuechunyang <yuechunyang1@h-partners.com> | 9 个月前 | |
!4931 merge fix/preferences-db-bundle-name-digit-parse into master fix(liveview): prevent false failCount accumulation on empty live view DB Created-by: cheerful_ricky Commit-by: CheerfulRicky Merged-by: openharmony_ci Description: ## 问题现象 手机没有实况窗时,每次系统重启 failCount 错误累积 +1 且不重置。累积到 MAX_RESTART_ATTEMPTS(2) 后,下次重启触发 CleanUserLiveViewData,误删期间发布的三方实况数据。 ## 根因 GetBatchKvsFromDb 把无记录(E_EMPTY_VALUES_BUCKET) 误判为 DB 错误(E_ERROR),导致 RecoverLiveViewForUser 在无实况窗时提前 return,跳过 SetRecoverFailCount(0) 重置。每次无实况窗重启 failCount 累积 +1 不重置,达 2 后触发 CleanUserLiveViewData 误删三方实况数据。 ## 修复 在 RecoverLiveViewForUser 中 GetBatch 查询失败时重置 failCount=0。查询阶段失败(含无记录)不属于 failCount 兜底机制要防的解析/处理阶段 freeze/crash,应视为正常退出,重置 failCount。 ## 测试 - RecoverLiveViewFromDb_EmptyDb_00001 补 failCount=0 断言(原测试漏检) - 新增 RecoverLiveViewFromDb_EmptyDb_NoAccumulation_00001: 无记录连续2次恢复,验证 failCount 不累积到2、不触发清理 构建验证通过(rk3568, distributed_notification_service_unit_test)。 See merge request: openharmony/notification_distributed_notification_service!4931 | 30 天前 | |
fix subscribeNotification bug Co-Authored-By: Agent Signed-off-by: bettykico <fangxiaofen1@h-partners.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 | 1 个月前 | |
docs: refactor AGENTS.md with structured code map, knowledge routing and constraint boundaries Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 2 个月前 | |
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> | 1 个月前 | |
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 年前 | |
新增 taihe_ffi_gen 部件依赖 在 bundle.json 的 deps.components 中补充 taihe_ffi_gen,适配部件独立后的依赖关系。 Issue: https://gitcode.com/openharmony/notification_distributed_notification_service/issues/4127 Change-Id: Ifaf13f80f04a9d6d7743803fb380f4453e51e471 Signed-off-by: LeechyLiang <liangweihong1@huawei.com> | 2 个月前 | |
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> | 1 个月前 |
通知子系统
简介
OpenHarmony通过ANS(Advanced Notification Service,通知系统服务)对通知类型的消息进行管理,支持多种通知类型,包括文本,长文本,多文本,图片,社交,媒体等。所有系统服务以及应用都可以通过通知接口发送通知消息,用户可以通过SystemUI查看所有通知消息。
通知常见的使用场景:
- 显示接收到短消息、即时消息等。
- 显示应用的推送消息,如广告、版本更新等。
- 显示当前正在进行的事件,如导航、下载等。
架构图
图1 子系统架构图

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