Repository navigation
Conversation
…or less Holding a drawer row crashed with "Already resumed" when the platform long-press timeout was 80 ms or less: the second awaitTouch got a timeout of 0 or below, and Compose's withTimeout then resumes the pointer awaiter the first timeout already resumed. The hold wait is now skipped when no time is left, so the hold starts at the 80 ms press delay. Verified: reproduced on dev on the emulator with long_press_timeout 80 (same stack as Play's); with the fix a hold selects the row and a tap opens it, at 80 ms and at the default 400 ms. scripts/check.sh passes. Fixes #351
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.
The app crashed whenever someone touched and held a session row in the drawer with Android's touch-and-hold delay set to 80 ms or less. Google Play reported it from one phone.
The drawer waits 80 ms for a press, then waits the rest of the long-press timeout for the hold. With a long-press timeout of 80 ms or less that second wait got a timeout of 0 or below, and Compose's
withTimeoutthen resumes the pointer wait that the first timeout had already resumed, which throws "Already resumed". Now the second wait is skipped when no time is left, so the hold starts at 80 ms.Nothing visible changes at normal settings.
settings put secure long_press_timeout 80, open the drawer, hold a session row. It crashed with the same stack as Play's reports ("Timed out waiting for 0 ms"). With the fix the hold chooses the row for selection, and a tap still opens it. At the default 400 ms, hold and tap work as before.scripts/check.shpasses.ViewConfigurationwith an 80 ms long-press timeout and expectheldto be called without a crash.Fixes #351