Conversation
NKU100
force-pushed
the
fix/qs-tile-collapse
branch
from
September 3, 2026 19:13
104f8dd to
995bc71
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.
Fixes #2112
问题
在快捷设置里点击 FlClash 磁贴,通知面板会立刻收起。声明了
TOGGLEABLE_TILE=true的磁贴本应像 WLAN/蓝牙那样原地切换。原因
TileService.onClick()无条件调用startActivityAndCollapse()启动透明的QuickActionActivity,而这个 API 的语义就是"启动 Activity 并收起面板"。该 Activity 只是个壳:onCreate调一次ServiceState.handleToggleAction()就finish()。启动前台服务并不需要它——系统在磁贴点击时会给 15 秒临时白名单。修复前的 logcat:
即 FGS 本来就不是靠那个 Activity 放行的。唯一真正需要 Activity 的场合是系统 VPN 授权对话框(
VpnService.prepare()非 null),故仅在该情况下保留原路径。改动
TileService.onClick():仅当需要 VPN 授权时走QuickActionActivity,否则直接ServiceState.handleToggleAction()ServiceState.toggleRequiresVpnConsent():停止路径永不需要 UI;启动路径只在"启用 VPN 且系统尚未授权"时需要磁贴意图仍然只经
ServiceState表达,ServiceController仍是唯一的绑定/运行时所有者。真机验证
Pixel 9 Pro / Android 17,debug 包,同一配置做 A/B:
appops ACTIVATE_VPN denyflutter analyze --no-fatal-infos无问题;build_tool包dart analyze+dart test全绿。第二个 commit(与本修复无关,可单独 drop)
Fix Go core build on Windows hosts:Windows 主机上make core-android一直失败于ProcessException: %1 不是有效的 Win32 应用程序。NDK 的aarch64-linux-android21-clang无扩展名文件是 bash 脚本,Windows 需要旁边的.cmd包装器。旧
setup.dart只把它作为CC交给go build,Go 的exec.LookPath会自动补 PATHEXT 所以没暴露;新 buildkit 在算指纹时用Process.runSync(cc, ['--version'])直接 spawn,Dart 不补 PATHEXT,于是在go build之前就硬失败。CI 的platform: android只在ubuntu-latest上构建,故无覆盖。