Repository navigation
feat(wear-os): add local fall detection diagnostics - #131
Merged
Merged
Conversation
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.
Summary
Missed falls cannot currently be investigated on a signed Wear OS build because raw sensor readings, effective thresholds, and rejection criteria are unavailable. Add opt-in local diagnostics that record all delivered accelerometer samples, including sub-threshold events, without changing detection thresholds or watch-to-phone alert contracts.
Record read-only detector state, measurement/delivery timestamps, screen interactivity, registration details, heartbeats, and diagnostic losses. Write compressed batches off the sensor thread with a bounded queue and 64 MiB/72-hour retention limits. Add an English/French watch toggle and an ADB export provider protected by the platform DUMP permission and caller UID checks. Exports contain no credentials, location, or phone data.
Bump Wear OS to
1.1-diagnostics(version code 2), document collection/export, and ignore generated Kotlin cache files.Validation
make -C apps/wear_os check: 27 JVM tests, Android lint, and Debug/Release builds passed.git diff --check: passed.Limitations
This instruments the existing detector; it does not improve fall sensitivity or establish clinical reliability. The sensor is non-wake-up and no monitoring wake lock is added. The short physical recording contained measurement gaps up to 882 ms and delivery delays up to 1,073 ms; long-term deep-sleep and battery behavior remain unvalidated. The byte cap can shorten retained history, and abrupt process termination can lose the latest in-memory batch. Export promptly after a spontaneous event; do not ask a vulnerable wearer to fall for testing.