[WIP] feat(security): 集成防窥保护 DlpAntiPeep 及设备能力检测#148
Open
IterClaw wants to merge 4 commits intoSolidFaker:devfrom
Open
[WIP] feat(security): 集成防窥保护 DlpAntiPeep 及设备能力检测#148IterClaw wants to merge 4 commits intoSolidFaker:devfrom
IterClaw wants to merge 4 commits intoSolidFaker:devfrom
Conversation
1572019 to
1d11b99
Compare
Collaborator
|
等待AGC审核权限,暂时不合入 |
Open
- 新建 DlpAntiPeepManager 核心管理器,封装完整防窥 API 生命周期 - module.json5 添加 ohos.permission.DLP_GET_HIDE_STATUS ACL 权限声明 - SecuritySheet 添加防窥保护开关,支持设备能力检测与弹窗引导 - EntryAbility 启动时根据用户偏好自动初始化防窥保护 - Index onPageShow 重置蒙层标志确保正确响应窥视事件 - 添加中英文资源字符串(zh_CN/zh_TW/en_US/base)
- SecuritySheet 在 aboutToAppear 中调用 canIUse 检测 SystemCapability.Security.DlpAntiPeep - 不支持设备上开关置灰(disable),描述文字提示设备不支持 - 不支持设备上 onChange 提前 return 防止误触发 - 新增中英文 unsupported 字符串
…ubItemToggle 移入 SettingItem 内容块内,修复 ListItem 单一子组件约束
1d11b99 to
21ebe37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
集成 HarmonyOS
DlpAntiPeep(防窥保护)能力,在应用运行时检测他人窥视屏幕,自动拉起系统防窥蒙层保护令牌隐私。变更内容
新增文件
entry/src/main/ets/utils/DlpAntiPeepManager.ets— 防窥保护单例管理器,封装@kit.DeviceSecurityKit中dlpAntiPeepAPI 的完整生命周期:isSupported()— 通过canIUse检测设备是否支持防窥能力isSwitchOn()— 查询系统级防窥开关状态start()/stop()— 激活/停用防窥保护,含状态回调订阅修改文件
entry/src/main/ets/pages/setting/SecuritySheet.ets— 安全设置页新增防窥保护开关:DlpAntiPeepManager.getInstance().start()stop()释放资源entry/src/main/ets/entryability/EntryAbility.ets— 应用生命周期集成:onForeground时按用户偏好激活防窥保护onBackground时停用防窥保护entry/src/main/ets/utils/AppPreference.ets— 添加SAFETY_DLP_ANTI_PEEP_ENABLE偏好键及默认值entry/src/main/module.json5— 声明ohos.permission.DLP_GET_HIDE_STATUS受限权限entry/src/main/resources/base/element/string.json— 添加防窥开关相关中英繁文案