Skip to content

Commit 1c17b8d

Browse files
jamesarichCopilot
andcommitted
feat(car): implement PR #5162 recommendations + official docs alignment
- Migrate to SendMessageUseCase (replaces raw commandSender.sendData()) - Migrate Messages tab to ConversationItem API (official required pattern) - Add ConversationCallback for native reply + mark-as-read - Add Status tab with device metrics (battery, utilization, uptime, TX/RX) - Add ConversationShortcutManager + PersonIconFactory for notification linking - Add CarScreenDataBuilder with pure testable functions (533-line test suite) - Fix notification actions (SEMANTIC_ACTION_REPLY/MARK_AS_READ, setShowsUserInterface) - Wire CarReplyReceiver to actually send messages and clear unreads - Lower minCarApiLevel from 8 to 7 with graceful API 8 fallbacks - Add android:permission on CarAppService for security - Remove dead code: ConversationScreen, CarTtsEngine, messagesCache Files added: ConversationShortcutManager, PersonIconFactory, CarScreenDataBuilder, ic_car_status.xml, CarScreenDataBuilderTest (533 lines) Files removed: ConversationScreen.kt, CarTtsEngine.kt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c35c23d commit 1c17b8d

15 files changed

Lines changed: 1145 additions & 321 deletions

File tree

feature/car/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<application>
55
<service
66
android:name="org.meshtastic.feature.car.service.MeshtasticCarAppService"
7-
android:exported="true">
7+
android:exported="true"
8+
android:permission="androidx.car.app.CarAppService">
89
<intent-filter>
910
<action android:name="androidx.car.app.CarAppService" />
1011
<category android:name="androidx.car.app.category.MESSAGING" />
@@ -17,6 +18,6 @@
1718

1819
<meta-data
1920
android:name="androidx.car.app.minCarApiLevel"
20-
android:value="8" />
21+
android:value="7" />
2122
</application>
2223
</manifest>

feature/car/src/main/kotlin/org/meshtastic/feature/car/model/CarUiModels.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,15 @@ data class EmergencyAlert(
7474
val timestamp: Long,
7575
val isActive: Boolean,
7676
)
77+
78+
data class CarLocalStats(
79+
val batteryLevel: Int = 0,
80+
val hasBattery: Boolean = false,
81+
val channelUtilization: Float = 0f,
82+
val airUtilization: Float = 0f,
83+
val totalNodes: Int = 0,
84+
val onlineNodes: Int = 0,
85+
val uptimeSeconds: Int = 0,
86+
val numPacketsTx: Int = 0,
87+
val numPacketsRx: Int = 0,
88+
)

feature/car/src/main/kotlin/org/meshtastic/feature/car/screens/ConversationScreen.kt

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)