fix(car): wire notifications & emergency, fix TabTemplate crash, pin car-app to stable#5997
Merged
Conversation
…car-app to stable The car feature shipped against androidx.car.app 1.9.0-alpha01 with several surfaces built but never wired, plus a latent crash once pinned to stable. 🐛 Fixes - HomeScreen built TabTemplate without setActiveTabContentId(), which throws on stable 1.7.0 — the tabbed car UI would crash on launch for every connected user. - Messaging notifications never reached Android Auto: the manifest was missing the com.google.android.gms.car.application meta-data pointing at automotive_app_desc. - meshName showed the firmware version string instead of the owner long name. 🌟 Wiring - Emergency flow: ALERT_APP packets now drive EmergencyHandler (was emptyFlow()). - Reply / mark-read notification actions now carry the Android Auto semantic actions (SEMANTIC_ACTION_REPLY / _MARK_AS_READ + setShowsUserInterface(false)) at the source in core MeshNotificationManagerImpl, so the app's existing MessagingStyle notifications work hands-free in-car. 🧹 Cleanup - Deleted dead duplicate CarNotificationManager / CarReplyReceiver (core already posts richer notifications; the car copies were never called). - Pinned androidx.car.app 1.9.0-alpha01 → 1.7.0 stable; dropped unused app-automotive. 🛠️ Tests - CarScreensTest: drives the real HomeScreen via TestCarContext + a CarStateCoordinator test seam (mokkery repos, Robolectric), asserting template-per-state and the ALERT_APP → emergency flow. This caught the TabTemplate crash above. - feature/car/TESTING.md documents the verification paths. Testing Performed: spotlessCheck, detekt, :feature🚗testGoogleDebugUnitTest (incl. CarScreensTest), :core:service:compileAndroidMain, :androidApp:assembleGoogleDebug — all pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n up group summary Replying to a message from Android Auto left the conversation showing in the head unit, because the cancel only removed the individual notification and left the group summary behind — and the reply never marked the conversation read. 🐛 Fixes - cancelMessageNotification now rebuilds (or clears) the group summary, so the dismissed conversation doesn't linger in the Android Auto notification center. - showGroupSummary cancels the summary entirely when no message conversations remain. - ReplyReceiver marks the conversation read (clearUnreadCount) on reply, mirroring the mark-as-read action — Android Auto keys dismissal off read state. - ReplyReceiver sends first, then dismisses in a defensive finally, so a slow/failed BLE send can no longer drop the reply or leave the notification stuck. Added logging. Verified on a Pixel 6a via the Desktop Head Unit: reply sends, conversation is marked read, and the notification (and summary) clear from the phone and the head unit. Testing Performed: spotlessCheck, detekt, :core:service:compileAndroidMain, :androidApp:assembleGoogleDebug — all pass; manual DHU verification on device. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
The Android Auto (
feature:car) feature shipped againstandroidx.car.app:1.9.0-alpha01with several surfaces built but never wired to data, plus a latent crash that surfaces once pinned to a stable release. This wires them up, fixes the crash, and pins to stable.🐛 Fixes
HomeScreenbuilt itsTabTemplatewithoutsetActiveTabContentId(). That was tolerated by the alpha but throwsIllegalStateExceptionon stable 1.7.0 — the tabbed car UI would crash on launch for every connected user. Caught by the new test.com.google.android.gms.car.applicationmeta-data pointing atautomotive_app_desc.xml, soMessagingStylenotifications never surfaced in-car.🌟 Wiring
ALERT_APPpackets now driveEmergencyHandler(wasemptyFlow()).SEMANTIC_ACTION_REPLY/_MARK_AS_READ+setShowsUserInterface(false), added at the source incoreMeshNotificationManagerImplso the app's existing (richer)MessagingStylenotifications work hands-free in-car.🧹 Cleanup
CarNotificationManager/CarReplyReceiver(core already posts richer notifications with avatars + multi-message; the car copies were never called).androidx.car.app1.9.0-alpha01→1.7.0stable; dropped the unusedapp-automotivecatalog entry.🛠️ Tests
CarScreensTestdrives the realHomeScreenviaTestCarContext+ aCarStateCoordinatortest seam (mokkery-mocked repos, Robolectric), asserting the correct template per connection state and theALERT_APP→ emergency flow. This test caught the TabTemplate crash above.feature/car/TESTING.mddocuments the verification paths (SessionController tests; DHU/AAOS caveats).Testing Performed
spotlessCheck,detekt,:feature:car:testGoogleDebugUnitTest(incl.CarScreensTest),:core:service:compileAndroidMain,:androidApp:assembleGoogleDebug— all pass.🤖 Generated with Claude Code