1c1bbe2551
Make the existing Application automation rule (foreground app -> activate scene) work on the Android-TV build. A Kotlin ForegroundAppBridge reads the foreground app via UsageStatsManager and lists launchable apps via LauncherApps; PlatformDetector bridges it in (ahead of the Windows-only ctypes guard) so the existing AutomationEngine / ApplicationRule / storage / deactivation modes are unchanged. New /system/installed-apps + /system/info endpoints feed an app picker that stores package names (vs process names on desktop); on Android the editor hides the match-type selector since the foreground app is the only obtainable signal. PACKAGE_USAGE_STATS is granted via an on-device button + a web-UI banner (no blanket prompt at capture start); detection degrades gracefully until granted. Zero new Python/Gradle deps (UsageStatsManager + LauncherApps are in-platform; matching only string-compares the package name, so no QUERY_ALL_PACKAGES). assembleDebug + 1897 pytest + ruff + tsc + npm build all green; independent final review (0 blockers) + security review (no critical issues).
32 lines
1.9 KiB
XML
32 lines
1.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<resources>
|
|
<string name="app_name">LedGrab</string>
|
|
<string name="tagline">电视氛围灯光</string>
|
|
<string name="btn_start">开始捕获</string>
|
|
<string name="btn_starting">正在启动…</string>
|
|
<string name="btn_stop">停止</string>
|
|
<string name="status_running">运行中</string>
|
|
<string name="status_checking_root">正在检查 root 权限…</string>
|
|
<string name="status_permission_denied">权限被拒绝 — 屏幕捕获需要授权</string>
|
|
<string name="status_no_network">无网络 — 请连接 Wi-Fi 或以太网</string>
|
|
<string name="label_web_ui">Web界面地址</string>
|
|
<string name="scan_to_configure">扫码配置</string>
|
|
<string name="scan_fallback_hint">或在同一网络的任何设备上访问上方网址</string>
|
|
<string name="qr_description">Web界面二维码</string>
|
|
<string name="version_prefix">v%1$s</string>
|
|
<string name="autostart_label">开机自启(仅限 root)</string>
|
|
<string name="autostart_unavailable">开机自启 — 不可用(需要 root)</string>
|
|
<string name="fatal_title">LedGrab 启动失败</string>
|
|
<string name="fatal_body_prefix">Python 运行时初始化失败:</string>
|
|
<string name="fatal_copy_log">复制日志</string>
|
|
<string name="fatal_show_details">显示详情</string>
|
|
<string name="fatal_hide_details">隐藏详情</string>
|
|
<string name="notification_channel_name">LedGrab 屏幕捕获</string>
|
|
<string name="notification_channel_description">LedGrab 捕获屏幕时显示。</string>
|
|
<string name="notification_title">LedGrab 运行中</string>
|
|
<string name="notification_text">Web界面:%1$s</string>
|
|
<string name="notification_listener_label">LedGrab 通知捕获</string>
|
|
<string name="btn_grant_notification_access">授予通知访问权限</string>
|
|
<string name="btn_grant_usage_access">授予使用情况访问权限</string>
|
|
</resources>
|