Repository navigation
Commit c97170d
feat(chargepilot): CP-080 the trip monitor comes back with the car
Automatic detection was automatic only for whoever had opened the app since
the last boot. TripRecordingService already outlives the dashboard — it is a
started foreground service, which is why a trip survives the driver switching
to the media app — but the head unit shuts the process down with the car and
nothing started it again.
Measured: the odometer moved 148 km between the 2026-09-17 and 2026-09-24
probe bundles while the trip history recorded 32 km of it. Every threshold
downstream is denominated in recorded kilometres — the consumption fit wants
twelve segments and has four, the health estimate wants six discharges of 25
points and has none, and the eco verdict can only judge a drive somebody
recorded.
TripMonitorBootReceiver restarts the monitor on BOOT_COMPLETED and on
MY_PACKAGE_REPLACED, and only when automatic detection is enabled. Both are
protected broadcasts, so exported="true" is safe here in a way the
steering-wheel receiver elsewhere in this suite is not; the action is checked
regardless. The receiver catches its own failures, because a crash in a boot
receiver is the kind of instability this suite may not introduce on a head
unit.
What it costs is bounded by the service that was already there: 1 Hz, a
low-importance notification, no disk write until a completed trip is stored,
and MISSING_SPEED_SAMPLE_LIMIT suspends everything after ten consecutive
reads with no usable speed — which is what a head unit that booted without
the vehicle interfaces looks like.
RECEIVE_BOOT_COMPLETED is install-time, reaches no vehicle interface and
carries no data; it is in the permission allowlist with that reasoning.
EVHardware moves to master HEAD (bcbd55a) in the same commit.
Not compiled: no JDK or Android SDK in this workspace. The on-vehicle check
is the only one that proves this — drive without ever opening the app.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent ebb115c commit c97170d
4 files changed
Lines changed: 83 additions & 1 deletion
File tree
- .github/security
- app/src/main
- java/com/evsuite/chargepilot
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
158 | 179 | | |
159 | 180 | | |
160 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments