Skip to content

Wear OS: a hold the phone logged first is logged again as the next set #1427

Open

Description

@cubetes

Suggested labels: bug, mobile

With "Timed holds start by themselves" on, a lifter doing a plank on Wear OS can end up with the wrong set logged. The phone and the watch both run the hold. The phone's ends first and logs set N. When the watch's hold ends, it logs the first set still to do, which is set N+1. Set N+1 is then marked done although nobody held it.

Why Wear OS still has it. WearStore.endHold ends by calling completeSet, which logs setIndex(), the first set not done. Nothing checks that the set the hold started for is still open. Release commit 3862a4e only stops a phone tick from moving the watch to another exercise during the count-in. It does not end the hold.

Fix. The hold remembers its set (by set id, else by place, plus the side on a per-side set). When a snapshot from the phone shows that set done, the hold ends there, unlogged. This is the same rule the Apple Watch got in #1410 and the Garmin in #1404.

Found while fixing #1403 / #1409. Related: #1403 #1404 #1409 #1410.
Checked for overlap: no open PR or release commit touches the Wear hold path. #1185, #1317 and #1412 edit WearStore.kt but not startHold, endHold or stopHold.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions