-
Notifications
You must be signed in to change notification settings - Fork 8
Session Parameter Picker
This page defines data and interaction constraints for VerticalOptionPicker in the session editor. The canonical implementation is in feature/session/ui/component/AddSessionDialog.kt; game-mode normalization is in SessionDialogState.kt.
| Parameter | Normal presets | Game presets | Custom |
|---|---|---|---|
| Maximum size | 720, 1080, 1920, Original | 720, 1080, 1920 | Normal only; Original persists as 0
|
| Video bitrate | 700K, 1M, 2M, 4M, 8M, 12M, 20M, 40M, 80M, 120M | 1M, 2M, 4M, 8M, 12M, 20M | Normal only, K/M units |
| Maximum FPS | 15, 30, 60, 90, 120 | 60, 90, 120 | Normal only |
| Audio bitrate | 64K, 128K, 192K, 256K | 64K, 128K | Both modes, K/M units |
Enabling game mode disables full screen and normalizes size, video bitrate, and FPS to game presets. Empty values default to 720, 2M, and 60 respectively. A bitrate below the game range also normalizes to 2M, while an in-range value selects the nearest preset. normalizeGameVideoSettings() owns the rule; UI must not duplicate it.
- Compatibility mode replaces scrcpy video/control with low-frame-rate ADB JPEG screenshots and ADB input. It is mutually exclusive with game mode and disables full screen, hardware decoding, ADB forwarding, audio, automatic clipboard synchronization, screen-off/cleanup-dependent controls, virtual display, and other scrcpy-only options.
- Maximum size keeps the scrcpy long-edge rule. Compatibility JPEG quality is selected automatically: 55 at 720, 60 at 1080, 65 above 1080, and 70 for Original; custom values are capped at 8192 for the helper.
- Rotation is an explicit Local/Target choice. Local removes the activity orientation restriction and lets this device rotate; Target restricts the activity to follow the target frame orientation.
- Power off on close requires cleanup on disconnect. The launch command forces
power_off_on_close=falsewhen cleanup is disabled.
- Selecting Custom opens a numeric editor; only a positive integer can be confirmed.
- Bitrate uses a separate K/M unit button to form the stored text. Size and FPS have no unit.
- Cancelling a newly selected custom maximum size returns to Original. Other parameters retain the prior value or use the code default.
- Saving parses values into integer
ScrcpyConfigfields. Original maximum size is0; bitrate is stored in bit/s.
- The viewport is
104dp × 42dp; inner margin and item gap are2dp, leaving a38dpvisible item. - The current drag threshold per option is
50dp, while visual item pitch is40dp. - Translation maps directly from accumulated drag distance; drag frames do not start tweens.
- Index is clamped at both ends, and the picker consumes vertical drag immediately so the outer session page does not scroll.
- The inner
Columnuses top-aligned unbounded content height and is clipped by the fixed viewport. Constrained measurement or default vertical centering compresses items or misaligns the selected value.
- All four preset groups remain consistent with
ScrcpyConfigsave parsing. - Switching normal/game modes leaves allowed values and cannot bypass the full-screen constraint.
- Custom confirm, cancel, empty state, and K/M units are covered.
- Edge dragging does not jitter, adjacent borders are hidden at rest, and the outer page does not scroll during drag.
- Game-rule changes update
GAME_*_OPTIONS, UI presets, andSessionDialogGameVideoSettingsTesttogether. - Compatibility normalization remains covered by
SessionDialogCompatibilityModeTestandCompatibilityCaptureSettingsTest; rotation policy remains covered byRemoteScreenOrientationTest.
Dimensions and gesture values are facts of the current UI implementation. If these constants change, update this page and visual regression in the same change.
- Overview / 总览
- Quick Start / 快速开始
- Connection & Pairing / 连接设备与配对
- Session Management / 会话管理
- Remote Control / 远程控制
- Settings / 设置
- Management Features / 管理功能
- FAQ / 常见问题
- Overview / 总览
- Technical Index / 技术文档索引
- Audit Checklist / 初始化与更新清单
- Conventions / 文档维护约定
- Architecture / 架构
- Module Map / 模块地图与边界
- Runtime Path / 运行时主链路
- Session State / 会话状态与事件
- Session Lifecycle / 会话配置与连接生命周期
- ADB, USB & Wireless / ADB、USB 与无线
- ADB Lifecycle / ADB 连接生命周期
- Pairing / 设备配对与无线调试
- Codecs / 编码与解码
- Remote Interaction / 远程交互性能与悬浮菜单
- Clipboard / 剪贴板同步
- Management / 管理功能
- Events & Shell / 事件、监控与 Shell
- Logging / 日志系统与维护
- Troubleshooting / 分层排障方法
- UI Design / UI 设计系统
- Bilingual Copy / 双语与文案
- Remote UI Analysis / 远程 UI 布局分析
- Engineering Rules / 工程与验证规则
- External Research / 外部研究与取舍
Technical topics appear here only after their page-level audit is complete. / 技术主题仅在完成逐页审核后加入侧边栏。