Fix hard privacy mode presence in supportedAttributes - #3201
Conversation
|
Channel deleted. |
|
matter-switch_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against c66b601 |
Test Results 73 files 541 suites 0s ⏱️ Results for commit c66b601. ♻️ This comment has been updated with latest results. |
|
The fix looks good for the One standards-related edge case still seems uncovered, though:
So this is a valid combination: The PR correctly detects I think the profile decision should therefore be based on either condition: and the capability metadata should then be built independently: For a hard-privacy-only camera, and the soft-privacy setter commands should not be advertised. One smaller cleanup: now that Other than that, the approach looks good. |
9fe8022 to
c66b601
Compare
…ommunity#3201) * Fix hard privacy mode presence in `supportedAttributes` * Make hardPrivacyMode independant of soft one
…ommunity#3201) * Fix hard privacy mode presence in `supportedAttributes` * Make hardPrivacyMode independant of soft one
Description of Change
The
cameraPrivacyMode.hardPrivacyModewas getting dropped fromsupportedAttributes, even on devices that report it.HardPrivacyModeOnis of optional conformance in the Matter spec on top of the PRIV feature bit that gates the soft-privacy attributes - so it can only be detected from the Camera AVSM cluster'sAttributeList, not from the cluster feature map.The
build_camera_privacy_supported_attributes()was hardcoded to always return just{"softRecordingPrivacyMode", "softLivestreamPrivacyMode"}. A separate reactive path (enabled_state_factory) tried to append"hardPrivacyMode"when a liveHardPrivacyModeOnreport came in, but any subsequent profile/capability reconciliation (triggered by any of several unrelated feature-map attribute reports) compared current state against that hardcoded baseline, saw a mismatch, and resetsupportedAttributesback down to the 2-item list, silently clobberinghardPrivacyModeagain.Fix
camera_av_stream_management_attribute_list_handlerto also detectHardPrivacyModeOnpresence in the reportedAttributeList(same pattern already used there forStatusLightEnabled/StatusLightBrightness), and persist it via a newupdate_hard_privacy_mode_attribute_presence.build_camera_privacy_supported_attributesnow takes device and conditionally includes"hardPrivacyMode"based on that persisted presence, instead of a static 2-item list.hardPrivacyModeentry.Summary of Completed Tests
hardPrivacyModesupport (privacy feature bit + presence ofHardPrivacyModeOnin attributes list) but wasn't previously reflecting it in thecameraPrivacyMode:: supportedAttributes.hardPrivacyModecameraPrivacyModein the profile).Attributelist