fix(car): notification-only car messaging for production; park templated behind flag#6015
Merged
Conversation
…mplated behind flag Google rejected v2.8.0-closed.2 (App crashes / "content not able to load") under the Auto App Quality Guidelines. The car app is a "templated messaging experience" — a Google beta restricted to Internal/Closed tracks; Open/Production submissions are auto-rejected regardless of correctness. The crashing surface is the templated CarAppService/HomeScreen, which the DHU can't launch (sideloaded apps are denied by CAR.VALIDATOR) and which doesn't report to Crashlytics/Datadog. The #5997 TabTemplate fix was already in the rejected build; it crashed anyway. Default (production) builds now ship notification-only car messaging, which is GA and production-safe: - CarAppService is android:enabled=false and automotive_app_desc declares only <uses notification>. - Hands-free reply / mark-as-read still works — that code lives in core:service (every build). - Result: not a templated Auto app, so it is not subject to the Auto templated review. The templated dashboard is parked behind -PenableCarTemplates=true for Closed-track builds: - Adds androidApp/src/googleCarTemplates/res (automotive_app_desc + <uses template>) and enables the service. - feature:car stays compiled (FlavorModule references FeatureCarModule); feature:car resolves the enabled placeholder from the same property, since a library's own manifest placeholder is not overridden by the app's value. Also harden HomeScreen.onGetTemplate() to degrade to a safe template instead of crashing the Android Auto host on any build-path exception. Testing Performed: - aapt-verified the packaged manifest + automotive_app_desc: flag-off -> service disabled + notification-only; flag-on -> service enabled + <uses template>. - spotlessCheck, detekt, assembleDebug (google + fdroid), :feature🚗test (CarScreensTest both cases pass). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Why
Google rejected v2.8.0-closed.2 (versionCode 29321269) — "App crashes / the content of your application is not able to load" under the Auto App Quality Guidelines.
Root cause: the car app is a "templated messaging experience" (CarAppService
MESSAGING+ MessagingStyle notifications +<uses name="template" />). Per Google's docs, templated messaging is beta — publishable to Internal/Closed tracks only; Open/Production submissions are auto-rejected regardless of correctness. The crash is in the templated surface (launched by tapping a message notification → rendersHomeScreen). The #5997TabTemplatefix was already in the rejected build — it crashed anyway, and adding thecom.google.android.gms.car.applicationmeta-data there is what first exposed the templated app to review.Reproduction is blocked locally: the DHU (2.1) can't launch sideloaded apps (
CAR.VALIDATOR: Package DENIED; failed all other checksfor every non-Google app, even with unknown-sources on), and Auto-host crashes don't reach Crashlytics/Datadog. R8 code-strip and resource-shrink were ruled out (all car code/resources survive the minified release build).So this design can never reach Production. This PR makes the default build notification-only (GA, production-safe) and parks the templated experience behind a flag for Closed-track builds.
🌟 Production: notification-only car messaging
googleReleaseships notification-only:CarAppServiceisandroid:enabled=falseandautomotive_app_descdeclares only<uses name="notification" />. It is therefore not a templated Auto app and is not subject to the Auto templated review.core:service, which is in every build.🛠️ Templated dashboard parked behind
-PenableCarTemplatesandroidApp/src/googleCarTemplates/res, whoseautomotive_app_descoverride declares<uses name="template" />, and enables the service.feature:carstays compiled (FlavorModulereferencesFeatureCarModule). It resolves theenabledplaceholder from the same property, because a library's own manifest placeholder is not overridden by the app's value.🐛 Crash hardening
HomeScreen.onGetTemplate()now degrades to a safe template instead of throwing out to the Android Auto host (which crashes it = Play rejection). NOTE: a host-side template-contract rejection wouldn't throw here — the suspectedTabTemplate-vs-ListTemplate/SectionedItemTemplate-of-ConversationItemcontract issue still needs the Play Console pre-launch stack to confirm. Templated is parked until then.Testing Performed
automotive_app_desc: flag-off → serviceenabled=false+ notification-only; flag-on → serviceenabled=true+<uses template>.spotlessCheck,detekt,assembleDebug(google + fdroid),:feature:car:test(CarScreensTest: disconnected→PaneTemplate and connected→TabTemplate both pass).Follow-ups (not in this PR)
ListTemplate/SectionedItemTemplateofConversationItems rather than aTabTemplatedashboard.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes