harmony 鸿蒙Security Subsystem Changelog

  • 2025-06-12
  • 浏览 (27)

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

API Permission Before the Change Permission After the Change
reportSecurityEvent(securityEvent: SecurityEvent): void ohos.permission.securityguard.REPORT_SECURITY_INFO ohos.permission.REPORT_SECURITY_EVENT
querySecurityEvent(rules: Array<SecurityEventRule>, querier: Querier): void ohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFO ohos.permission.QUERY_SECURITY_EVENT
startSecurityEventCollector(rule: CollectorRule): void ohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFO ohos.permission.QUERY_SECURITY_EVENT
stopSecurityEventCollector(rule: CollectorRule): void ohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFO ohos.permission.QUERY_SECURITY_EVENT
getModelResult(rule: ModelRule): Promise<ModelResult> ohos.permission.securityguard.REQUEST_SECURITY_MODEL_RESULT ohos.permission.QUERY_SECURITY_MODEL_RESULT
on(type: ‘securityEventOccur’, securityEventInfo: SecurityEventInfo, callback: Callback<SecurityEvent>): void ohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFO ohos.permission.QUERY_SECURITY_EVENT
off(type: ‘securityEventOccur’, securityEventInfo: SecurityEventInfo, callback?: Callback<SecurityEvent>): void ohos.permission.securityguard.REQUEST_SECURITY_EVENT_INFO ohos.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

0  赞