openharmony 鸿蒙 changelogs-security_guard

2025-06-12 浏览 (1)

Security Subsystem Changelog

cl.security_guard.1 securityGuard Permission Change

Access Level

System API

Reason for Change

Redefined the permissions for obtaining detailed security data according to the permission naming specifications, and deleted old permissions.

Change Impact

This change is a non-compatible change. After the permission change, the compilation is successful, but the original functionality of the APIs cannot work. When the related API is called, error 201 is thrown.

Start API Level

12

Change Since

OpenHarmony 5.0.0.36

Key API/Component Changes

APIPermission Before the ChangePermission After the Change
reportSecurityEvent(securityEvent: SecurityEvent): voidohos.permission.securityguard.REPORT_SECURITY_INFOohos.permission.REPORT_SECURITY_EVENT
querySecurityEvent(rules: Array<SecurityEventRule>, querier: Querier): voidohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFOohos.permission.QUERY_SECURITY_EVENT
startSecurityEventCollector(rule: CollectorRule): voidohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFOohos.permission.QUERY_SECURITY_EVENT
stopSecurityEventCollector(rule: CollectorRule): voidohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFOohos.permission.QUERY_SECURITY_EVENT
getModelResult(rule: ModelRule): Promise<ModelResult>ohos.permission.securityguard.REQUEST_SECURITY_MODEL_RESULTohos.permission.QUERY_SECURITY_MODEL_RESULT
on(type: 'securityEventOccur', securityEventInfo: SecurityEventInfo, callback: Callback<SecurityEvent>): voidohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFOohos.permission.QUERY_SECURITY_EVENT
off(type: 'securityEventOccur', securityEventInfo: SecurityEventInfo, callback?: Callback<SecurityEvent>): voidohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFOohos.permission.QUERY_SECURITY_EVENT

Adaptation Guide

In migration scenarios only, request and configure the following permissions:
ohos.permission.REPORT_SECURITY_EVENT
ohos.permission.QUERY_SECURITY_EVENT
ohos.permission.QUERY_SECURITY_MODEL_RESULT

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkCompiler Subsystem Changelog

harmony 鸿蒙ArkGraphics2D Changelog

harmony 鸿蒙Bundle Manager Subsystem Changelog

harmony 鸿蒙Media Subsystem Changelog

harmony 鸿蒙Network Subsystem Changelog

harmony 鸿蒙File Subsystem Changelog

harmony 鸿蒙USB Subsystem Changelog

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/pPk2is