Skip to content

Callout control improvements to match iOS - #1066

Merged
davecraig merged 3 commits into
Scottish-Tech-Army:mainfrom
davecraig:main
Sep 6, 2026
Merged

davecraig merged 3 commits into
Scottish-Tech-Army:mainfrom
davecraig:main

Conversation

@davecraig

Copy link
Copy Markdown
Contributor

No description provided.

davecraig and others added 3 commits September 6, 2026 17:13
Bus and tram stops are part of the Mobility super-category, but there are
far more of them than of anything else in it - a walk down an urban main
road passes one every couple of hundred metres, and a bus ride passes
almost nothing else - so they get a switch of their own. Turning them off
leaves the rest of Mobility (crossings, gates, lifts, steps...) alone.

It silences both of the callout paths that name a stop: the "Approaching
X" announcement while riding (buildCalloutForVehicleTransitStop) and the
walking-pace nearby-POI callout, where stops arrive as Mobility POIs.

Only bus_stop and tram_stop. TreeId.TRANSIT_STOPS also carries stations,
subway and ferry terminals, and those are destinations in their own right
that are passed rarely enough that nobody needs them switched off.

The preference is read per callout rather than captured, so turning the
switch off takes effect on the next location update rather than at the
next grid rebuild - which is what gates the existing Places and Mobility
switches. It hangs off AllowCallouts alone and not off Mobility: the
vehicle stop callout reads along-way features attached to roads, not
SELECTED_SUPER_CATEGORIES, so it fires with Mobility off and making the
new switch depend on Mobility would have been misleading.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PuWFLdKuyocaThznkNfrhp
"Intersection and transportation information" was inherited verbatim from
iOS, where the one switch sets three senses (CalloutSettingsCellView.swift
sets mobilitySenseEnabled, safetySenseEnabled and intersectionSenseEnabled
together). The Android port narrowed it to just the mobility POIs, so the
description promised control over intersection callouts that the switch
did not have.

Mobility now also gates the intersection callouts and the in-vehicle
road-sense callout, matching IntersectionGenerator.swift:178 and
AutoCalloutGenerator.swift:359. Both read the preference per callout
rather than through the grid's enabled categories, so they follow the
current value rather than whatever it was when the grid was last built.

The guard in buildCalloutForRoadSense sits below that function's vehicle
bookkeeping rather than at the top of it: lastVehicleTimestampMs is
recorded there on every update and read by callouts this setting has
nothing to do with, so the sticky window has to keep arming whether or
not road sense itself is allowed to speak. There is a test for that
placement.

Places and Landmarks now selects the information POIs alongside places
and landmarks, as informationSenseEnabled does on iOS. Guideposts, maps
and notice boards were classified at tile load time and then never read
by anything - TreeId.INFORMATION_POIS had no reader, so the earcon case
for SuperCategoryId.INFORMATION in buildCalloutForNearbyPOI was dead.
Measured on real tiles this adds 32 POIs in Milngavie and 53 in central
Glasgow.

Safety is deliberately left out, though iOS folds it into Mobility too.
On our tiles it is almost entirely parking - 1512 of 1515 safety POIs in
a central Glasgow grid, of which 1046 are individual parking bays, and
only 32 named. With a 10m trigger range and generic callouts deduped only
within 20m that is a firehose of "Parking", so it needs either the
parking classes excluded or evidence from a real walk first.

Also removes TmpCategoryCountTest, a scratch test used to take those
measurements which was swept into 652e6a22b by accident.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PuWFLdKuyocaThznkNfrhp
@davecraig
davecraig merged commit 52b9550 into Scottish-Tech-Army:main Sep 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant