From 2fa58940e427a7c604acb5e7dc8000ae7ceea198 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Mon, 28 Sep 2026 21:54:16 -0400 Subject: [PATCH] [Fix] (ci): the trace APK is a launchable app; assert exactly one launcher activity The "Trace APK must not expose a launcher activity" check predates the render-server screen: 1f72597dd gave the trace APK a launcher on purpose and 884f6aac9 moved the entry icon back to PostActivity with a bottom navigation bar between the two screens, so the apk.yml build job has been red ever since - taking the whole retrace matrix down with it (skipped, not failed), which hid the distinction. What is left of the old isolation contract is the count: exactly one android.intent.action.MAIN in the merged manifest (a second one means a screen grew a launcher entry by accident), and it belongs to PostActivity. The fclPlugin metadata ban is unchanged. --- .github/scripts/validate-plugin-apks.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/scripts/validate-plugin-apks.sh b/.github/scripts/validate-plugin-apks.sh index 72173636..bc63ec86 100644 --- a/.github/scripts/validate-plugin-apks.sh +++ b/.github/scripts/validate-plugin-apks.sh @@ -67,9 +67,16 @@ if grep -Fq 'fclPlugin' <<<"$trace_manifest"; then echo '::error::Trace APK must not advertise renderer-plugin metadata' >&2 exit 1 fi -if grep -Fq 'android.intent.action.MAIN' <<<"$trace_manifest"; then - echo '::error::Trace APK must not expose a launcher activity' >&2 +# The trace APK IS a launchable app now: PostActivity (the POST self-test screen) is its +# entry icon and the bottom navigation bar switches to the render server screen. What is +# left of the old "no launcher" contract is the count - exactly ONE MAIN activity, so a +# screen that accidentally grows a launcher entry (ServerControlActivity was one for a day) +# reds here instead of shipping two icons. +main_count=$(grep -Fc 'android.intent.action.MAIN' <<<"$trace_manifest") +if [[ "$main_count" -ne 1 ]]; then + echo "::error::Trace APK must expose exactly one launcher activity (PostActivity); found ${main_count} android.intent.action.MAIN" >&2 exit 1 fi +require 'PostActivity' "$trace_manifest" 'trace launcher activity (PostActivity)' echo 'Validated unified MobileGL plugin APK and isolated trace APK.'