| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
!2030 merge master into master fix:modify testcase Created-by: quyh Commit-by: quyh Merged-by: openharmony_ci Description: ### 相关的Issue https://gitcode.com/openharmony/distributeddatamgr_pasteboard/issues/1632 ### 原因(目的、解决的问题等) 修正用例 ### 描述(做了什么,变更了什么) - Feature or Bugfix: - Binary Source:NO ### 验证结果(新增、改动、可能影响的功能,建议贴上验证报告) - TDD结果:Pass  - XTS结果:NA - Pretest结果:NA ### 日志规范自检: - [ ] 【规则】高频代码的正常流程中禁止打印日志 - [ ] 【规则】在基本不可能发生的点必须要打印日志 - [ ] 【规则】事件记录的日志使用who do what 主谓宾的形式打印 - [ ] 【规则】状态变化的日志打印使用state_name:s1->s2, reason:msg的形式打印 - [ ] 【规则】参数值的日志打印使用name1=value1, name2=value2…的形式打印 - [ ] 【规则】代码运行成功的日志使用xxx successful的形式打印 - [ ] 【规则】代码运行失败的日志使用xxx failed, please xxx的形式打印 ### 安全编码自检: - [ ] 【指针】禁止对指针进行逻辑或位运算,对指针求sizeof需确认,指针解引用时需确认是否存在空指针解引用问题; - [ ] 【临时变量】指针变量、表示资源描述符的变量、bool变量初始化必须赋初值; - [ ] 【数组下标】数组下标需要确认是否越界,如果下标来自外部输入,必须校验合法性; - [ ] 【锁管理】加锁后必须释放锁,并确认锁变量一致; - [ ] 【fd管理】fd申请后必须关闭,代开与关闭成对使用; - [ ] 【内存管理】内存申请前必须对内存大小进行合法性校验; - [ ] 【内存管理】内存申请后必须释放,申请与释放成对使用; - [ ] 【内存管理】内存申请后必须判空,判断内存申请是否成功; - [ ] 【内存管理】全局变量释放内存后必须置空,循环体中释放变量内存后确认是否需要置空; - [ ] 【内存管理】正则表达式构造后需释放资源,regcomp/regexec与regfree必须成对使用; - [ ] 【内存管理】strdup使用需要注意内存释放; - [ ] 【内存管理】realpath使用时如果resolved_path为NULL需要注意内存释放; - [ ] 【敏感信息】禁止打印密钥、文件路径、内存地址、udidhash、设备名称、账号id等敏感信息; - [ ] 【敏感信息】堆、栈密钥使用后必须清零; - [ ] 【敏感信息】禁止不作匿名化直接打印udid/networkid/uuid/ip/mac等敏感信息; - [ ] 【整数运算】整数之间运算时必须严格检查,确保不会出现溢出、反转、除0; - [ ] 【整数运算】禁止对有符号整数进行位操作符运算; - [ ] 【循环变量】无符号数作为循环变量需确认是否存在死循环问题; - [ ] 【循环变量】循环次数如果受外部数据控制,需要检验其合法性; - [ ] 【安全函数】安全函数必须检查返回值,并进行正确处理; - [ ] 【安全函数】安全函数目标缓冲区大小入参与目标缓冲区实际大小必须一致; - [ ] 【外部输入校验】外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验; - [ ] 【外部输入校验】按TLV格式解析时需校验解析长度值是否小于等于缓冲区实际值,并校验是否符合业务数据范围; - [ ] 【外部输入校验】解析数据后拷贝时需校验源buffer实际缓冲区大小,避免越界读写; - [ ] 【外部输入校验】新增外部输入处理需考虑完整校验方案,方案需经过MDEG评审,并有相应fuzz、UT用例; - [ ] 【常见问题】修改单个函数时,如果涉及新增异常返回分支,必须排查是否需要释放锁、内存、fd等资源; - [ ] 【常见问题】CHECK_AND_RETURN、CHECK_AND_RETURN_RET_LOG_INNER等宏确认无资源漏释放; - [ ] 【常见问题】函数返回值需与函数签名相同,参数定义需在同一范畴,或同一枚举类型; - [ ] 【常见问题】格式化打印类型需匹配,例如:int32_t %d; uint32_t %u; long %ld; unsigned long %lu; long long PRId64(%lld); unsigned long long PRIu64(%llu); int16_t(short) %hd; uint16_t(unsigned short) %hu; int8_t %hhd; uint8_t %hhu; See merge request: openharmony/distributeddatamgr_pasteboard!2030 | 3 个月前 | |
Fix: Disposable Target bundleName -> windowId Signed-off-by: 朱思远 <zhusiyuan2@huawei.com> | 1 年前 | |
modify pasteboard process Signed-off-by: yangli-test <yangli200@huawei.com> | 8 个月前 | |
Refactor: Update include paths for pasteboard_common_utils Update all include paths for pasteboard_common_utils.h to use common/pasteboard_common_utils.h after file reorganization. Changes: - adapter/src/device_profile_adapter.cpp - adapter/test/device_profile_client_test.cpp - framework/framework/common/pasteboard_common_utils.cpp - framework/innerkits/src/pasteboard_copy.cpp - interfaces/ani/src/pasteboard_ani.cpp - interfaces/kits/napi/src/napi_systempasteboard.cpp - interfaces/ndk/src/oh_pasteboard.cpp - interfaces/taihe/src/ohos.pasteboard.pasteboard.impl.cpp - services/core/src/pasteboard_disposable_manager.cpp - services/core/src/pasteboard_service.cpp - services/dfx/src/hiview_adapter.cpp - services/switch/pasteboard_switch.cpp - framework/framework/BUILD.gn: Remove common include from include_dirs - framework/framework/device/dev_profile.cpp: Remove unused include - framework/framework/device/distributed_module_config.cpp: Remove unused include - framework/framework/device/dm_adapter.cpp: Remove unused include - test/fuzztest/pasteboarddisposable_fuzzer/BUILD.gn: Fix sources list - Update copyright year to 2026 This cleans up remaining references to old common/include directory after flattening directory structure and fixes fuzzer build config. Co-Authored-By: Agent <agent@opencode.ai> Signed-off-by: yang-yinghua <yangyinghua1@huawei.com> | 6 个月前 | |
支持根据蓝牙WIFI模组决策是否使能跨设备剪贴板 Co-Authored-By: Agent Signed-off-by: yanghuiqing <yanghuiqing6@h-partners.com> | 1 个月前 | |
fix: update HTTP_URL pattern to allow space-separated URLs Update HTTP_URL pattern detection to match URLs at string start or after space: - Update HTTP_URL regex to (?:^|\s+)https?://[^\s]+ to match at start or after space - Remove manual position check logic as it's now handled by regex - Update test case DetectHttpLinkTest013 to expect 0 (no match without space) - Add test case DetectHttpLinkTest014 to verify space-separated URLs are detected - Add test case DetectHttpLinkTest015 to verify comma-separated URLs are not detected Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: yyh <yangyinghua1@huawei.com> Co-Authored-By: Agent <agent@opencode.ai> Signed-off-by: yang-yinghua <yangyinghua1@huawei.com> | 6 个月前 | |
修复UnsubscribeAllObserver按userId误删所有应用观察者的问题 UnsubscribeAllObserver原实现调用RemoveAllObserver(userId, map)按userId 遍历删除,会清掉同一userId下所有应用的观察者;同时调用ClearInputMethodPid() 清空所有用户输入法pid注册。应用经内层API传入无效callback时会误删其它应用 的观察者与输入法注册。 现按调用方pid清理:RemoveObserverByPid(userId, callPid, ...)仅删本应用条目, ClearInputMethodPidByPid(userId, callPid)仅清本应用,与UnsubscribeObserver/ AppExit作用域一致。删除无参ClearInputMethodPid()。新增UnsubscribeAllObserverTest005 覆盖跨应用作用域。 Signed-off-by: yangxiaodong41 <yangxiaodong41@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[98%] Co-authored-by: opencode (glm-5.2) <ai@local> Change-Id: Iffe5b4f9447e27f57163efbd9d9f20ea2b753189 | 7 天前 | |
refactor: 按评审意见修订版权头与若干实现 - 版权头改为升序(创建-修改)格式,与仓库惯例一致 - GetDeviceCollabSwitch: 恢复 SetUserId 调用;value.empty() 返回 true;ret!=E_OK 与 empty 两个分支分开处理 - DataShare GetValue: 合并日志、去掉新增错误分支,count==0 日志补 ret=%{public}d - get/set_data_command: 恢复 if(client==nullptr) 防御分支(保留新增 record 空指针校验) - oh_pasteboard: 恢复 cid 为 const,删除 delete 前无效的 cid=0 赋值 - dev_profile: SubscribeProfileEvent 还原为 HILOGD,避免订阅失败时行为变更 Co-Authored-By:Agent Signed-off-by: wwdz123456 <shaojian14@h-partners.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> Change-Id: I22ce8353c873547396498e0defa0f7af2ed76060 | 1 个月前 | |
refactor: 按评审意见修订版权头与若干实现 - 版权头改为升序(创建-修改)格式,与仓库惯例一致 - GetDeviceCollabSwitch: 恢复 SetUserId 调用;value.empty() 返回 true;ret!=E_OK 与 empty 两个分支分开处理 - DataShare GetValue: 合并日志、去掉新增错误分支,count==0 日志补 ret=%{public}d - get/set_data_command: 恢复 if(client==nullptr) 防御分支(保留新增 record 空指针校验) - oh_pasteboard: 恢复 cid 为 const,删除 delete 前无效的 cid=0 赋值 - dev_profile: SubscribeProfileEvent 还原为 HILOGD,避免订阅失败时行为变更 Co-Authored-By:Agent Signed-off-by: wwdz123456 <shaojian14@h-partners.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> Change-Id: I22ce8353c873547396498e0defa0f7af2ed76060 | 1 个月前 | |
refactor: 剪贴板服务支持多前台用户场景的屏幕状态与用户上下文管理 1. 将全局屏幕状态 currentScreenStatus 替换为 per-userId 的 screenStatusMap_(ConcurrentMap),支持多用户独立锁屏/解锁状态管理 2. HandleScreenLocked/HandleScreenUnlocked 改为接收 CommonEventData 参数,通过 ResolveUserIdFromWant 解析 userId 3. 移除不带 userId 的重载方法(IsFocusedApp(tokenId)、AppExit(pid)、GetFocusedAppInfo()、IsNeedThaw(userId,status) 等),统一使用带 userId 参数的版本 4. IsDataValid 增加 userId 参数,确保数据有效性校验在正确用户上下文中执行 5. CheckUIExtensionIsFocused 增加 displayId 参数,支持多显示场景下的焦点判断 6. 删除冗余 RefreshCriticalState() 调用 7. 重命名 ResolvePackageRemovedUser 为 ResolveUserIdFromWant,移除 ResolveUserSwitchedOldUser 和 SetUserContextResolver 8. ResolveMainDisplayUserId 增加 const 修饰和空指针检查 9. IsNeedThaw 简化为内部获取 userId,删除 userId 重载版本 10. DumpData/DumpHistory 内联合并,移除 userId 重载版本 11. SetInputMethodPid 内联 IsCurrentImeByPid 逻辑,移除独立包装方法 12. 同步更新所有相关单元测试用例 Fixes #1627 Co-Authored-By: Agent Signed-off-by: yangxiaodong41 <yangxiaodong41@huawei.com> Change-Id: Ic9bcb55be309fbc94a3121aa2333bee206c1d906 | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 6 个月前 | ||
| 1 个月前 | ||
| 6 个月前 | ||
| 7 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 3 个月前 |