Repository navigation
feat: add Shizuku desktop and shared projection lifecycle contracts - #52
Merged
Merged
Conversation
fython
marked this pull request as ready for review
October 26, 2026 13:27
This was referenced Oct 26, 2026
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.
为 Issue #40 增加独立的 Android 虚拟桌面输入源,并统一各输入源的取消输入、状态/错误和启动取消契约。用户通过 Shizuku 启动指定应用到独立显示屏,在浏览器查看画面、触控和执行返回;缺少依赖、授权或可启动应用时,先拒绝切换,保留当前源。
实现:
moe.feng.wheelplay.projection.desktop。v7 协议使用 structured AIDL 声明握手、启动配置、实际显示信息、会话状态和结果;返回 displayId、实际尺寸/DPI、旋转与布局修订号,拒绝与请求不一致的布局。cancelInput和 Back 使用输入代次屏障,取消手势并拒绝迟到旧触控;取消不发送 UP 或点击。64 项输入队列有过载处理,持续故障通过健康检查报告。healthy返回会话快照并续期;getState只读、不续期。停止后保留实际显示信息、输入代次和故障。控制调用保留稳定错误码及独立诊断;反射异常按真实原因分类。ProjectionSession.cancelInput(reason)贯通浏览器、TouchLease 与 Runtime。Android Auto 使用 ACTION_CANCEL;VNC/CarPlay 标记为 RELEASE_ONLY;插件 API v2 增加可选原生取消标志和末尾事务,未声明的旧插件继续使用兼容释放。普通抬手仍使用触控快照。ProjectionStartup支持协作取消,open接纳与awaitReady就绪分离。启动期间可停止;晚到会话先清理、不会激活。获取/就绪默认各 60 秒、清理 15 秒;失败或超时保留资源所有权,迟到回调不能解除隔离。CI 触发规则:
push仅构建main和标签,开发分支由pull_request验证,避免同一次 PR 推送重复构建;保留workflow_dispatch供未开 PR 的分支手动运行。原有路径过滤、构建任务和主线开发版产物保持不变。验证:
c20e6b0):认证导入重建测试改用 finally 显式放行,避免固定 5 秒等待在慢 runner 上让模拟导入失败;后续检查先验证导入资源,失败信息直接指向导入。4 项认证导入测试及额外 5.5 秒延迟诊断场景通过,临时诊断副本未提交。新提交的 Actions 结果以 PR 检查为准。npm test全部 15 个测试文件通过,npm run check通过。覆盖普通抬手/取消区分、旧协议兼容、输入暂停时的取消,以及旧 session/epoch 和非租约所有者拒绝。:mobile:lintDebug(0 errors,22 warnings)、arm64-v8a:mobile:assembleDebug和git diff --check通过。保持草稿:尚无非 root 真机 P0 验证;Binder 吞吐/延迟、厂商限制、自定义尺寸/DPI、主屏同时操作、锁屏、受保护内容、跨屏任务和异常退出需按
docs/ANDROID_DESKTOP.md实测。Desktop 当前不提供 WebRTC、音频/麦克风、键盘或 Home;直接 ADB、Launcher 和会话内动态布局留待后续。本 PR 不自动关闭 #40。