Repository navigation
Reject water-induced touches by contact size, add crown sync - #13
Open
johnhringiv wants to merge 2 commits into
Open
johnhringiv wants to merge 2 commits into
johnhringiv wants to merge 2 commits into
Conversation
A droplet running across the glass registers as a tap. The top half of a live countdown is SYNC, which rounds to the nearest minute, so one stray contact silently moves the gun by up to 30s. Reproduced on-device as a 91s error from four stray taps 15s apart, each rounding the countdown back up so it never advanced. Guard sync, mode toggle and reset on MotionEvent touch-major, captured in dispatchTouchEvent before Compose routes the event (PointerInputChange does not carry it). Water reads SMALLER than skin, so the guard is a floor, calibrated on a Pixel Watch 3: water 2.99 .. 9.98 then 13.97 for a heavy direct drip real tap 8.98 .. 18.95 Taps are judged on the touch-down value, reset on the gesture peak: a press lands soft and spreads, measured as 6.98 growing to 10.97 over a 706ms hold, so judging a long-press by its down value refuses genuine presses and breaks reset entirely. The two populations overlap, so the floor also refuses the lightest real taps: 2 of 8 deliberately-light taps in testing. That trade is deliberate and documented in the tests. A refused tap is visible and repeatable; an accepted droplet silently moves the gun, which is the harm being fixed. Crown rotation syncs as a parallel, water-immune path and bypasses the guard. The guard also fails open where a device reports no contact size, so unmeasured watches behave exactly as before. Debug builds take applicationId .debug and the name "RT DEBUG" so a dev build installs alongside the Play Store copy instead of colliding with its signature. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing ends a race, so count-up runs until it is reset. Left overnight it reached "1022:47", which is too wide for the watch: the digits wrapped onto a second line and shoved the RACE label off the screen entirely. Caught by screenshotting a watch that had been counting since the previous evening. Roll into H:MM:SS past an hour instead of letting the minute field grow without bound. Format alone is not enough — "1:00:00" is seven characters, the same width class that was already wrapping — so the type also steps down for the longer strings: 68sp to 5 chars, 44sp for 6-7, 34sp beyond. maxLines/softWrap ensure anything unforeseen clips rather than wrapping. Under an hour the output is identical to the countdown's M:SS, so the digits do not change shape at the gun. The countdown is capped at its armed duration and keeps the original path untouched. Verified by rendering each band at 408x408 density 320 — the Pixel Watch 3 geometry, reproduced on an emulator, which otherwise defaults to 454 and would have flattered the result. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
johnhringiv
marked this pull request as ready for review
August 9, 2026 01:12
This branch has not been deployed
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.
Water on the glass could silently move your start.
A droplet running across the screen registers as a tap. The top half of a live countdown is SYNC, which rounds to the nearest minute, so one stray contact shifts the gun by up to 30 seconds with nothing on screen to show it happened. Reproduced on-device as a 91-second error from four stray contacts 15 seconds apart, each rounding the countdown back up so it never advanced.
What changed
H:MM:SSpast an hour instead of growing the minute field without bound. A timer left running after a race reached1022:47, too wide for the watch — it wrapped onto a second line and pushed the RACE label off the screen. Under an hour the format is unchanged, so the digits do not change shape at the gun.com.johnhringiv.regattatimer.debug, labelled RT DEBUG. The launcher entry, tile and complication all rename together, so a dev build can no longer be mistaken for the real one on the water.Calibration
Measured on a Pixel Watch 3.
MotionEvent.getTouchMajor()reports on the same 0–255 scale as the rawABS_MT_TOUCH_MAJORaxis, so kernel and framework captures are directly comparable.Taps are judged on the touch-down value, reset on the gesture peak. A press lands soft and spreads — measured as 6.98 growing to 10.97 over a 706 ms hold — so judging a long-press by its down value refuses genuine presses and breaks reset outright. That was found on-watch, not in the tests.
Pressure was evaluated first and discarded:
ABS_MT_PRESSUREon this device is binary, 0 or 1000, and carries no information despite advertising a 0–1000 range.The trade being made
The two populations overlap, so no threshold accepts every real tap and rejects every droplet. The floor is set to win the droplet side: 2 of 8 deliberately-light taps were refused in testing. A refused tap is visible and repeatable; an accepted droplet silently moves the gun. The tests assert this cost explicitly so it cannot later be mistaken for a bug.
The guard fails open where a device does not report contact size, so watches other than the calibrated one behave exactly as they did before.
Known limits
Note for review
The per-touch calibration logging in
MainActivity.dispatchTouchEvent,TimerViewModel.acceptTouchand the rotary handler is still present, deliberately — it is the only instrument for the outstanding wet-weather test. There is no-assumenosideeffectsrule inproguard-rules.pro, so R8 keeps these calls in release. Strip them before this reaches Play if that test is not going to happen first.🤖 Generated with Claude Code