Repository navigation
refactor(tools): 收拢三档权限并按清单整理工具目录 - #92
Open
3316891527 wants to merge 4 commits into
Open
3316891527 wants to merge 4 commits into
3316891527 wants to merge 4 commits into
Conversation
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.
变更说明 / Description
工具设置已经采用标准、管理员和 Root 三档模式,内部实现仍沿用无障碍、调试、管理员等多层继承,修改工具时难以判断实际执行位置。此 PR 将权限实现收口为三档,在保留现有操作能力的基础上,按逐文件清单整理内置工具、插件包和系统能力目录,让维护者能按功能找到实现。
背景与动机 / Context and motivation
原文件、系统、设备和 UI 工具中存在没有独立行为的继承壳,管理员功能跨历史等级分散;
packTool同时放置解析、加载、运行、安装及 UI DSL 文件。继续按原结构开发会增加定位成本,也容易漏掉同一功能的不同权限实现。改动范围 / Changes
core.tools.builtin中按文件、界面、系统、网页、媒体等功能归类工具。管理员直接承接原无障碍和 Shell 操作,Root 保留专有 UI 行为;删除历史等级和没有独立行为的工具壳,维护者无需沿五层继承查找具体操作。Shizuku,工厂、日志及提示同步更新,避免实现名称继续暗示一个独立调试权限等级。STANDARD、ADMIN、ROOT;旧偏好由已有 DataStore 迁移入口转换为ADMIN,避免旧配置继续作为运行时模式传播。packTool按 parser、loader、runtime、install、minify、uidsl、metadata 归类;工具执行与注册进入core.tools.runtime,授权检测与安装、Shell、终端和屏幕捕获分别归入对应职责目录。packTool.parser的ToolPkgParser与ToolPkgMainRegistrationScriptParser中显式导入metadata共享注册常量,覆盖校验提示里的字符串插值;解析器拆分为独立包后,这些引用仍能正确解析,避免缺少导入导致编译失败。文件清单与目录说明
兼容性与风险 / Compatibility and risks
工具名、参数和结构化结果类型保持现有契约;无障碍、Shizuku 继续作为实际执行后端,用户模式只有三档。Root 设置与其他偏好沿用现有迁移规则。
内部完整类名发生调整,直接反射引用这些内部类的扩展需要同步对应引用。仓库内引用和内部组件声明已同步,三个已被外部脚本调用的公开广播组件保持原名。本次不调整应用标识、数据库模型或 JNI 接口。
关联 Issue / Related issue
N/A:本次为维护者安排的内部权限实现与工具目录重构,没有关联 Issue。
验证方式 / Verification
工作分支先派发上述仓库工作流,再创建本 PR。HTTP 204 仅表示派发受理,构建和单测最终结果尚未核实;没有等待或轮询 CI。
静态核对与回归范围
证据 / Evidence
检查清单 / Checklist