| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
修复通知弹窗多次请求回调异常&限制VOIP同步PCPAD Signed-off-by: xdongs <xdongs@163.com> | 1 年前 | |
fix: resolve code scan issues including memory leaks, null derefs and JSON parse validation - Fix NAPI memory leaks by deleting callback references on error paths - Add null pointer checks for context and bundle option objects - Add bounds validation for Parcel vector sizes against MAX_PARCELABLE_VECTOR_NUM - Add is_discarded() checks before JSON parse result usage - Fix uninitialized member variables in constructors - Fix timer id type from int32_t to uint64_t - Fix log format placeholder and return empty string instead of nullptr Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> Change-Id: I980acf6c5aaed0e4ee31de14f246d95fae2d2c65 | 25 天前 | |
fix: resolve code scan issues including memory leaks, null derefs and JSON parse validation - Fix NAPI memory leaks by deleting callback references on error paths - Add null pointer checks for context and bundle option objects - Add bounds validation for Parcel vector sizes against MAX_PARCELABLE_VECTOR_NUM - Add is_discarded() checks before JSON parse result usage - Fix uninitialized member variables in constructors - Fix timer id type from int32_t to uint64_t - Fix log format placeholder and return empty string instead of nullptr Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> Change-Id: I980acf6c5aaed0e4ee31de14f246d95fae2d2c65 | 25 天前 | |
PC/PAD 展示应用级开关二 Signed-off-by: wangsen1994 <wangsen51@huawei.com> | 4 个月前 | |
Signed-off-by: zhuhan <zhuhan10@huawei.com> Change-Id: Id96806b644455b64d06185022d27219bd8814d01 Change-Id: Id79d6043dfd4a47f487bc78e065e65b8e849a647 | 3 年前 | |
优先通知(支持开关回调和关键词) Signed-off-by: guxiang <guxiang11@huawei.com> | 8 个月前 | |
[Feature]Support listener of silent reminder switch Signed-off-by: yangjun <yangjun273@huawei.com> | 6 个月前 | |
json整改 Signed-off-by: songjindian <songjindian1@huawei.com> | 3 年前 | |
Add aggregation notification feature with classification and switch support Signed-off-by: stepend98 <yangjun273@huawei.com> Co-Authored-By: Agent | 2 个月前 | |
refactor(ans): replace WantParams/WantAgent serialization with envelope format Switch WantParams serialization to WantParamWrapperJson::Serialize and WantAgent serialization to ToStringWithEnvelope for safer JSON escaping that correctly handles quotes, backslashes, and nested delimiters. Deserialization uses envelope detection (HasEnvelope/HasWantParamsEnvelope) with legacy fallback to ParseWantParams/FromString so that historical data continues to round-trip unchanged. Add NotificationWantParamsHelper in frameworks/core/common to centralize the envelope-detection logic across all call sites. Add 16 unit tests covering all branches (>90% branch coverage). Scope notes: - Distributed serialization stays legacy (cross-device version compat); only its deserialization is upgraded to envelope-aware. - Analytics/event reporting unchanged (consumers not yet envelope-aware). - Remove wantParameters debug serialization from Dump functions. - Fix null pointer dereference on template data access. - Fix variable name typo: wangAgent -> wantAgent. Change-Id: Ifaa17126e2ba864c4dd968bd15314c2d8dec53eb Change-Id: Ic3121ed8242b5a1e58f659195b4103ea9b48c6a0 Change-Id: I4eb9a2b0fe87977f7ffe36b0cb60e6a2cf240450 Change-Id: I296fd76e97a888b49d053b243307e627a8bec0fa Change-Id: Ie5928906fa46b1d45912e9a02fd2f9d2f89dbda2 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: Ib5bc52d7a7fdcdda8bd894483f8e7b8506b6e18f | 27 天前 | |
支持全场景协同应用级开关 Signed-off-by: wangsen1994 <wangsen51@huawei.com> | 5 个月前 | |
fix: resolve code scan issues including memory leaks, null derefs and JSON parse validation - Fix NAPI memory leaks by deleting callback references on error paths - Add null pointer checks for context and bundle option objects - Add bounds validation for Parcel vector sizes against MAX_PARCELABLE_VECTOR_NUM - Add is_discarded() checks before JSON parse result usage - Fix uninitialized member variables in constructors - Fix timer id type from int32_t to uint64_t - Fix log format placeholder and return empty string instead of nullptr Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> Change-Id: I980acf6c5aaed0e4ee31de14f246d95fae2d2c65 | 25 天前 | |
app index support clone Signed-off-by: cheerful_ricky <yuegang7@huawei.com> | 8 个月前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
!4863 merge refactor/want-params-envelope-serialization into master refactor(ans): replace WantParams/WantAgent serialization with envelope format Created-by: cheerful_ricky Commit-by: CheerfulRicky Merged-by: openharmony_ci Description: ## Summary Replace legacy WantParams/WantAgent serialization with the new envelope-based format for safer JSON escaping (quotes, backslashes, nested delimiters). ## Changes - **New helper**: NotificationWantParamsHelper in frameworks/core/common centralizes envelope-detection logic (SerializeWantParams, ParseWantParams, ParseWantParamsWithBrackets, SerializeWantAgent, ParseWantAgent). - **Serialization (write)**: switch to WantParamWrapperJson::Serialize / WantAgentHelper::ToStringWithEnvelope at all persistence, dump, and CLI-display call sites. - **Deserialization (read)**: envelope detection (HasEnvelope / HasWantParamsEnvelope) → new Parse / FromStringWithEnvelope; legacy data falls back to ParseWantParams / FromString for backward compatibility. ## Scope decisions - Distributed serialization stays legacy (cross-device version compat); only its deserialization is upgraded to envelope-aware. - Analytics/event reporting unchanged (consumers not yet envelope-aware). ## Verification All 12 modified files pass clang -fsyntax-only with full OpenHarmony include paths (0 errors). Full build blocked by a pre-existing arkcompiler breakage (unhandled_object_manager.cpp) unrelated to this change. Co-Authored-By: Agent See merge request: openharmony/notification_distributed_notification_service!4863 | 27 天前 | |
上传napi功能 Signed-off-by: x00524330 <xujianhua9@huawei.com> Change-Id: Ibb5d5e8a1f554ba7f1b45840e8f4b4314ff3665d | 2 年前 | |
Add aggregation notification feature with classification and switch support Signed-off-by: stepend98 <yangjun273@huawei.com> Co-Authored-By: Agent | 2 个月前 | |
Add aggregation notification feature with classification and switch support Signed-off-by: stepend98 <yangjun273@huawei.com> Co-Authored-By: Agent | 2 个月前 | |
fix: harden JSON parsing with type validation to prevent crashes from invalid data Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 1 个月前 | |
fix: resolve code scan issues including memory leaks, null derefs and JSON parse validation - Fix NAPI memory leaks by deleting callback references on error paths - Add null pointer checks for context and bundle option objects - Add bounds validation for Parcel vector sizes against MAX_PARCELABLE_VECTOR_NUM - Add is_discarded() checks before JSON parse result usage - Fix uninitialized member variables in constructors - Fix timer id type from int32_t to uint64_t - Fix log format placeholder and return empty string instead of nullptr Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> Change-Id: I980acf6c5aaed0e4ee31de14f246d95fae2d2c65 | 25 天前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
fix: harden JSON parsing with type validation to prevent crashes from invalid data Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 1 个月前 | |
PC/PAD 展示应用级开关二 Signed-off-by: wangsen1994 <wangsen51@huawei.com> | 4 个月前 | |
fix: harden JSON parsing with type validation to prevent crashes from invalid data Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 1 个月前 | |
Signed-off-by: zhuhan <zhuhan10@huawei.com> Change-Id: Id96806b644455b64d06185022d27219bd8814d01 Change-Id: Id79d6043dfd4a47f487bc78e065e65b8e849a647 | 3 年前 | |
fix(memleak): cleanup resources on napi async work failure and in service destructors Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> Change-Id: I844bc20ffa457a05d7c4753e2c0e898e8c1097c9 | 9 天前 | |
add subscribeNotification Signed-off-by: bettykico <fangxiaofen1@h-partners.com> | 19 天前 | |
降低通知提醒 Signed-off-by: he-guokai <heguokai6@huawei-partners.com> | 8 个月前 | |
地理围栏新增trigger属性 Signed-off-by: yuechunyang <yuechunyang1@h-partners.com> | 8 个月前 | |
update: 更新文件 notification_group_info.cpp Signed-off-by: he-guokai <heguokai6@huawei-partners.com> | 5 个月前 | |
fix(ans): fix cross-SO singleton issue by adding AnsNotification::GetInstance() DelayedSingleton<AnsNotification>::GetInstance() returns different singleton objects in different shared libraries because the template's static members (instance_, mutex_) have vague linkage (COMDAT) and are hidden per-SO by -fvisibility=hidden + version scripts. Solution: 1. Add AnsNotification::GetInstance() using function-local static (C++11 thread-safe, defined out-of-line in ans_notification.cpp within libans_innerkits, symbol exported via *Ans* in .map) 2. Replace ALL callers (NAPI/ANI/Tools/Tests/CJ FFI) from DelayedSingleton<AnsNotification>::GetInstance() to AnsNotification::GetInstance() 3. Fix singleton.h include hygiene: - Add #include singleton.h to 34 files that use Singleton<>, DelayedSingleton<>, DECLARE_SINGLETON etc. but relied on transitive includes - Add #include nocopyable.h to 7 files that use DISALLOW_COPY_AND_MOVE but relied on transitive includes - Remove #include singleton.h from 70 files that no longer use any singleton.h symbols after the DelayedSingleton replacement The function-local static in ans_notification.cpp lives in libans_innerkits.so's data segment. AnsNotification::GetInstance() is a non-inline member function compiled only in libans_innerkits.so and exported via *Ans* pattern in libans_innerkits.map. All SOs call this exported function through dynamic linking, sharing the single instance. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I1089cfa5bb010daf37c68333a1e71c55fc1f16f3 | 3 天前 | |
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 | 10 天前 | |
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 | 10 天前 | |
fix: harden JSON parsing with type validation to prevent crashes from invalid data Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 1 个月前 | |
fix: harden JSON parsing with type validation to prevent crashes from invalid data Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 1 个月前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
fix: harden JSON parsing with type validation to prevent crashes from invalid data Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> | 1 个月前 | |
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 | 10 天前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
distribute anco click and pc/pad collaborate optimised Signed-off-by: guxiang <guxiang11@huawei.com> | 1 年前 | |
refactor(ans): replace WantParams/WantAgent serialization with envelope format Switch WantParams serialization to WantParamWrapperJson::Serialize and WantAgent serialization to ToStringWithEnvelope for safer JSON escaping that correctly handles quotes, backslashes, and nested delimiters. Deserialization uses envelope detection (HasEnvelope/HasWantParamsEnvelope) with legacy fallback to ParseWantParams/FromString so that historical data continues to round-trip unchanged. Add NotificationWantParamsHelper in frameworks/core/common to centralize the envelope-detection logic across all call sites. Add 16 unit tests covering all branches (>90% branch coverage). Scope notes: - Distributed serialization stays legacy (cross-device version compat); only its deserialization is upgraded to envelope-aware. - Analytics/event reporting unchanged (consumers not yet envelope-aware). - Remove wantParameters debug serialization from Dump functions. - Fix null pointer dereference on template data access. - Fix variable name typo: wangAgent -> wantAgent. Change-Id: Ifaa17126e2ba864c4dd968bd15314c2d8dec53eb Change-Id: Ic3121ed8242b5a1e58f659195b4103ea9b48c6a0 Change-Id: I4eb9a2b0fe87977f7ffe36b0cb60e6a2cf240450 Change-Id: I296fd76e97a888b49d053b243307e627a8bec0fa Change-Id: Ie5928906fa46b1d45912e9a02fd2f9d2f89dbda2 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: Ib5bc52d7a7fdcdda8bd894483f8e7b8506b6e18f | 27 天前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
add message report Signed-off-by: wangdi <wangdi154@huawei.com> | 9 个月前 | |
fix: add null pointer checks to prevent crashes in notification service Add comprehensive null pointer validation across frameworks and services layers (notification_request, subscriber_image_util, napi converters, geofence service, live view service, preferences, subscriber manager, etc.) to prevent null-dereference crashes, and add unit tests covering the new null-check branches. Co-Authored-By: Agent Signed-off-by: stepend98 <yangjun273@huawei.com> Change-Id: I62f9e3a450dbdbbcf7b0657c7187c6f7709b01df | 9 天前 | |
修复dump方法crash问题 Co-Authored-By:Agent Signed-off-by: xdongs2009 <xdongs@163.com> | 2 个月前 | |
通知模块化拆分,基础设施拆分(一) Signed-off-by: wangsen1994 <wangsen51@huawei.com> | 7 个月前 | |
update log Signed-off-by: heguokai <heguokai6@huawei-partners.com> | 1 年前 | |
Optimize subscrption callback handling process Signed-off-by: yangjun <yangjun273@huawei.com> | 7 个月前 | |
updata all Signed-off-by: he-guokai <heguokai6@huawei-partners.com> | 4 个月前 | |
add subscribeNotification Signed-off-by: bettykico <fangxiaofen1@h-partners.com> | 19 天前 | |
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 | 10 天前 | |
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 | 10 天前 | |
Hilog日志整改 Signed-off-by: zhengzhuolan <zhengzhuolan@huawei-partners.com> | 1 年前 | |
系统实况窗增加time字段 Signed-off-by: markYao <yaozhiyuan@huawei.com> | 2 年前 | |
地理围栏新增trigger属性 Signed-off-by: yuechunyang <yuechunyang1@h-partners.com> | 8 个月前 | |
refactor(ans): replace WantParams/WantAgent serialization with envelope format Switch WantParams serialization to WantParamWrapperJson::Serialize and WantAgent serialization to ToStringWithEnvelope for safer JSON escaping that correctly handles quotes, backslashes, and nested delimiters. Deserialization uses envelope detection (HasEnvelope/HasWantParamsEnvelope) with legacy fallback to ParseWantParams/FromString so that historical data continues to round-trip unchanged. Add NotificationWantParamsHelper in frameworks/core/common to centralize the envelope-detection logic across all call sites. Add 16 unit tests covering all branches (>90% branch coverage). Scope notes: - Distributed serialization stays legacy (cross-device version compat); only its deserialization is upgraded to envelope-aware. - Analytics/event reporting unchanged (consumers not yet envelope-aware). - Remove wantParameters debug serialization from Dump functions. - Fix null pointer dereference on template data access. - Fix variable name typo: wangAgent -> wantAgent. Change-Id: Ifaa17126e2ba864c4dd968bd15314c2d8dec53eb Change-Id: Ic3121ed8242b5a1e58f659195b4103ea9b48c6a0 Change-Id: I4eb9a2b0fe87977f7ffe36b0cb60e6a2cf240450 Change-Id: I296fd76e97a888b49d053b243307e627a8bec0fa Change-Id: Ie5928906fa46b1d45912e9a02fd2f9d2f89dbda2 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: Ib5bc52d7a7fdcdda8bd894483f8e7b8506b6e18f | 27 天前 | |
!4863 merge refactor/want-params-envelope-serialization into master refactor(ans): replace WantParams/WantAgent serialization with envelope format Created-by: cheerful_ricky Commit-by: CheerfulRicky Merged-by: openharmony_ci Description: ## Summary Replace legacy WantParams/WantAgent serialization with the new envelope-based format for safer JSON escaping (quotes, backslashes, nested delimiters). ## Changes - **New helper**: NotificationWantParamsHelper in frameworks/core/common centralizes envelope-detection logic (SerializeWantParams, ParseWantParams, ParseWantParamsWithBrackets, SerializeWantAgent, ParseWantAgent). - **Serialization (write)**: switch to WantParamWrapperJson::Serialize / WantAgentHelper::ToStringWithEnvelope at all persistence, dump, and CLI-display call sites. - **Deserialization (read)**: envelope detection (HasEnvelope / HasWantParamsEnvelope) → new Parse / FromStringWithEnvelope; legacy data falls back to ParseWantParams / FromString for backward compatibility. ## Scope decisions - Distributed serialization stays legacy (cross-device version compat); only its deserialization is upgraded to envelope-aware. - Analytics/event reporting unchanged (consumers not yet envelope-aware). ## Verification All 12 modified files pass clang -fsyntax-only with full OpenHarmony include paths (0 errors). Full build blocked by a pre-existing arkcompiler breakage (unhandled_object_manager.cpp) unrelated to this change. Co-Authored-By: Agent See merge request: openharmony/notification_distributed_notification_service!4863 | 27 天前 | |
Add VoiceContent support for onConsumed callback - Add NotificationVoiceContent class with textContent field - Add SetVoiceContent/GetVoiceContent methods to Notification class - Add SUBSCRIBE_ON_CONSUMED_VOICE subscription flag - Implement NAPI binding for VoiceContent in JS layer - Implement ANI binding for VoiceContent in TS layer - Add comprehensive TDD tests with 90%+ branch coverage - Support Parcel serialization/deserialization for VoiceContent Co-Authored-By: Agent Signed-off-by: wangsen1994 <wangsen51@huawei.com> Change-Id: If7837710c9d9109a7ee4e9ddacf8cdc5ecef761d | 3 个月前 | |
峰值内存优化,native线程解析图片 Co-Authored-By: Agent Signed-off-by: g00586423 <guxiang11@huawei.com> | 2 个月前 | |
fix(ans): fix cross-SO singleton issue by adding AnsNotification::GetInstance() DelayedSingleton<AnsNotification>::GetInstance() returns different singleton objects in different shared libraries because the template's static members (instance_, mutex_) have vague linkage (COMDAT) and are hidden per-SO by -fvisibility=hidden + version scripts. Solution: 1. Add AnsNotification::GetInstance() using function-local static (C++11 thread-safe, defined out-of-line in ans_notification.cpp within libans_innerkits, symbol exported via *Ans* in .map) 2. Replace ALL callers (NAPI/ANI/Tools/Tests/CJ FFI) from DelayedSingleton<AnsNotification>::GetInstance() to AnsNotification::GetInstance() 3. Fix singleton.h include hygiene: - Add #include singleton.h to 34 files that use Singleton<>, DelayedSingleton<>, DECLARE_SINGLETON etc. but relied on transitive includes - Add #include nocopyable.h to 7 files that use DISALLOW_COPY_AND_MOVE but relied on transitive includes - Remove #include singleton.h from 70 files that no longer use any singleton.h symbols after the DelayedSingleton replacement The function-local static in ans_notification.cpp lives in libans_innerkits.so's data segment. AnsNotification::GetInstance() is a non-inline member function compiled only in libans_innerkits.so and exported via *Ans* pattern in libans_innerkits.map. All SOs call this exported function through dynamic linking, sharing the single instance. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I1089cfa5bb010daf37c68333a1e71c55fc1f16f3 | 3 天前 | |
权益校验异步方法修正 Signed-off-by: 15151839515 <zhaomengnan3@huawei.com> | 2 年前 | |
Add VoiceContentOption feature for notification subscription Add VoiceContentOption class to NotificationSubscribeInfo to control voice content subscription behavior. When VoiceContentOption is enabled, the SUBSCRIBE_ON_VOICE_CONTENT flag is automatically set in NotificationSubscriberManager::AddSubscriber, allowing service-side logic to determine if voice content generation is needed during callbacks. Key changes: - Add VoiceContentOption class with bool enabled member - Integrate VoiceContentOption into NotificationSubscribeInfo - Add SUBSCRIBE_ON_VOICE_CONTENT flag (bit 18) to SubscribedFlag enum - Implement service-side flag setting/clearing logic in AddSubscriber - Add comprehensive unit tests (26 test cases) - Update BUILD.gn files to include new sources Co-Authored-By: Agent Signed-off-by: wangsen1994 <wangsen51@huawei.com> | 4 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 25 天前 | ||
| 25 天前 | ||
| 4 个月前 | ||
| 3 年前 | ||
| 8 个月前 | ||
| 6 个月前 | ||
| 3 年前 | ||
| 2 个月前 | ||
| 27 天前 | ||
| 5 个月前 | ||
| 25 天前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 27 天前 | ||
| 2 年前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 25 天前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 4 个月前 | ||
| 1 个月前 | ||
| 3 年前 | ||
| 9 天前 | ||
| 19 天前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 5 个月前 | ||
| 3 天前 | ||
| 10 天前 | ||
| 10 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 10 天前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 27 天前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 天前 | ||
| 2 个月前 | ||
| 7 个月前 | ||
| 1 年前 | ||
| 7 个月前 | ||
| 4 个月前 | ||
| 19 天前 | ||
| 10 天前 | ||
| 10 天前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 27 天前 | ||
| 27 天前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 3 天前 | ||
| 2 年前 | ||
| 4 个月前 |