Merges to keep up to date with v1.0#965
Open
davecraig wants to merge 26 commits into
Open
Conversation
We moved the multiplatform branch to main and so we needed to rejig.
Ignoring the safe mode resulted in parts of the screen being drawn behind camera slots etc.
TextToSpeech.getVoices() makes a synchronous Binder IPC to the system TTS service, which can block for a long time on some OEM builds. It was being called from viewModelScope's default Main dispatcher, blocking the UI thread and triggering ANRs. Move it and getAvailableSpeechEngines() to Dispatchers.IO. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…rror callback Calling release() synchronously from within OnCompletionListener/OnErrorListener re-enters MediaPlayer's native teardown while its EventHandler is still dispatching that very callback, which can hang the main thread waiting on native locks. Posting the release to the next message-loop iteration breaks the reentrancy. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Our own worst-case splash hold time (maxSplashDelay=7000ms) exceeded Android's 5s "no focused window" input-dispatch ANR timeout, so a tap during a slow/never-completing splash sound could outlast the system's patience for the window to become focusable. Cuts the safety net to 3000ms, comfortably under that threshold. Also replaces the hand-rolled ViewTreeObserver.OnPreDrawListener that held the splash open by suppressing the content view's first draw with the platform's own SplashScreen.setKeepOnScreenCondition/ setOnExitAnimationListener APIs, which are coordinated with WindowManagerService's window-focus bookkeeping rather than working around it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
TileSearch only ever resolved fuzzy hits back to a feature via the literal "name" tag, so POIs whose matching text lived under name:hi, name:pa etc. (very common in OSM/OpenMapTiles data) were found by the fuzzy pass but silently dropped during feature resolution, leaving non-English searches (e.g. Hindi) empty. Also surface the actual matched name variant instead of always re-reading the Latin "name" tag, and stop normalizeForSearch from stripping non-Latin combining marks (Devanagari matras/virama etc.) that it was only meant to strip for Latin/Greek/Cyrillic accents. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The Photon server only supports en/fr/de + each location's local language, and getPhotonLanguage() already correctly omits the lang param for anything else so Photon falls back to local-language matching - verified this against the live production server for an Arabic query. There was no test coverage for this behavior at all, so add a fast unit test for the fallback logic plus an instrumented end-to-end check against the real server. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bring in ANR fixes (splash input dispatch, MediaPlayer.release in callback, TTS getVoices binder call), offline search fixes for localized POI names, and doc/version updates from v1.0. # Conflicts: # app/build.gradle.kts # app/src/androidTest/java/org/scottishtecharmy/soundscape/GeocoderTest.kt # app/src/main/java/org/scottishtecharmy/soundscape/MainActivity.kt # app/src/main/java/org/scottishtecharmy/soundscape/viewmodels/SettingsViewModel.kt # app/src/test/java/org/scottishtecharmy/soundscape/SearchTest.kt # docs/documentationScreens/homeScreen.png # docs/documentationScreens/homeScreenWithRoute.png # docs/documentationScreens/routeDetails.png # docs/documentationScreens/routeEdit.png # shared/src/commonMain/kotlin/org/scottishtecharmy/soundscape/geoengine/utils/geocoders/TileSearch.kt
The main change here is removing the audio beacons being a scrolling list within the screen and instead just having the screen be bigger an containing the whole list. This makes Maestro tests much easier as swipping upwards works the same at any point on the screen. Rows had been split into separate beacon+icon by mistake at some point. That's fixed.
# Conflicts: # shared/src/commonMain/kotlin/org/scottishtecharmy/soundscape/screens/onboarding/audiobeacons/AudioBeaconItem.kt # shared/src/commonMain/kotlin/org/scottishtecharmy/soundscape/screens/onboarding/audiobeacons/AudioBeacons.kt
TileSearch only ever resolved fuzzy hits back to a feature via the literal "name" tag, so POIs whose matching text lived under name:hi, name:pa etc. (very common in OSM/OpenMapTiles data) were found by the fuzzy pass but silently dropped during feature resolution, leaving non-English searches (e.g. Hindi) empty. Also surface the actual matched name variant instead of always re-reading the Latin "name" tag, and stop normalizeForSearch from stripping non-Latin combining marks (Devanagari matras/virama etc.) that it was only meant to strip for Latin/Greek/Cyrillic accents. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The Photon server only supports en/fr/de + each location's local language, and getPhotonLanguage() already correctly omits the lang param for anything else so Photon falls back to local-language matching - verified this against the live production server for an Arabic query. There was no test coverage for this behavior at all, so add a fast unit test for the fallback logic plus an instrumented end-to-end check against the real server. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The main change here is removing the audio beacons being a scrolling list within the screen and instead just having the screen be bigger an containing the whole list. This makes Maestro tests much easier as swipping upwards works the same at any point on the screen. Rows had been split into separate beacon+icon by mistake at some point. That's fixed.
StreetDescription.getInterpolateLocation() assumed every house number feature had Point geometry, but building/POI polygons tagged with a housenumber also get added to the street's house number map. Use getCentralPointForFeature() (already used elsewhere for this) instead of casting directly to Point. Co-Authored-By: Claude Sonnet 5 <[email protected]>
# Conflicts: # app/build.gradle.kts # app/src/androidTest/java/org/scottishtecharmy/soundscape/GeocoderTest.kt # app/src/test/java/org/scottishtecharmy/soundscape/GeoEngineLanguageTest.kt # app/src/test/java/org/scottishtecharmy/soundscape/SearchTest.kt # docs/documentationScreens/homeScreen.png # docs/documentationScreens/homeScreenWithRoute.png # docs/documentationScreens/routeDetails.png # docs/documentationScreens/routeEdit.png # shared/src/commonMain/kotlin/org/scottishtecharmy/soundscape/geoengine/utils/geocoders/StreetDescription.kt # shared/src/commonMain/kotlin/org/scottishtecharmy/soundscape/geoengine/utils/geocoders/TileSearch.kt # shared/src/commonMain/kotlin/org/scottishtecharmy/soundscape/screens/onboarding/audiobeacons/AudioBeacons.kt
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.
No description provided.