!14434 增加控件截图权限校验

Merge pull request !14434 from lmy/verify
This commit is contained in:
openharmony_ci 2024-08-30 01:50:26 +00:00 committed by Gitee
commit a29d1735fb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -876,6 +876,13 @@ void RSRenderServiceConnection::TakeSurfaceCapture(NodeId id, sptr<RSISurfaceCap
// When the isSync flag in captureConfig is true, UI capture processes commands before capture.
// When the isSync flag in captureConfig is false, UI capture will check null node independently.
// Therefore, a null node is valid for UI capture.
if (!selfCapture) {
RS_LOGE("RSRenderServiceConnection::TakeSurfaceCapture uicapture failed, nodeId:[%{public}" PRIu64
"], selfCapture: %{public}u",
id, selfCapture);
callback->OnSurfaceCapture(id, nullptr);
return;
}
if (RSUniRenderJudgement::IsUniRender()) {
TakeSurfaceCaptureForUiParallel(id, callback, captureConfig);
} else {