Keep the display still before the first tap (Nokia 6.1) #3

Merged
stephen merged 1 commit from portrait-lock into main 2026-11-18 18:40:14 +00:00
Owner

v1.0.1 still failed tappingCountsUp on a Nokia 6.1 (API 29), now on the first tap (Taps: 0). Logcat on the failing run: the phone is portrait at launch, the display rotates to landscape (rotation 0 to 3) while the activity is created, and the injected click lands about 0.6 s after that. No keyguard or dialog (focus was the launcher, screen awake), animation scales 1.0. So my earlier double-tap reading was wrong.

The activity is now locked to portrait. Android 16 ignores that on large screens, so the two tests that tap also wait, bounded to 5 s, for the rotation to hold still for 600 ms, and fail with a message if it never does. README says why.

Not proven until a tag build of this runs on the Nokia 6.1.

v1.0.1 still failed tappingCountsUp on a Nokia 6.1 (API 29), now on the first tap (Taps: 0). Logcat on the failing run: the phone is portrait at launch, the display rotates to landscape (rotation 0 to 3) while the activity is created, and the injected click lands about 0.6 s after that. No keyguard or dialog (focus was the launcher, screen awake), animation scales 1.0. So my earlier double-tap reading was wrong. The activity is now locked to portrait. Android 16 ignores that on large screens, so the two tests that tap also wait, bounded to 5 s, for the rotation to hold still for 600 ms, and fail with a message if it never does. README says why. Not proven until a tag build of this runs on the Nokia 6.1.
Keep the display still before the first tap: lock portrait, wait for rotation in the tests
All checks were successful
release-apks / build (push) Successful in 5m24s
295f647292
On a Nokia 6.1 (API 29) the display rotated to landscape while the activity
was created and the first test tap was lost (Taps: 0). Logcat showed the
rotation change about 0.6 s before the injected click. The app is now locked
to portrait; Android 16 ignores that on large screens, so the tests that tap
also wait (bounded, 5 s) for the rotation to hold still.
gerri approved these changes 2026-11-18 14:59:31 +00:00
gerri left a comment

Automated Codex review (read-only) of head 295f647292.

  • Low (edge case), MainActivityTest.java:54: The invariant is that a tap should be sent after startup rotation has settled. The helper observes only the preceding 600 ms, so a rotation that starts after that interval can still overlap a tap. Both tap tests use the helper, and the second tap in tappingCountsUp has no additional check. This is a narrow timing race, but it means the wait cannot guarantee the stated outcome on large screens where the orientation lock is ignored. Exercise delayed rotation on a device and synchronize with the actual transition or retry the interaction after a detected rotation.

BLOCKING: 0

Reviewed head 295f647292 at 2026-11-18T14:59:31Z by codex exec (read-only sandbox).

Automated Codex review (read-only) of head 295f647292f7567bced610dd2785d29bb8be3c55. - **Low** (edge case), [MainActivityTest.java:54](/home/dev/work/reviews/rasterstate-grid-sample-android-3/app/src/androidTest/java/org/gridsample/app/MainActivityTest.java:54): The invariant is that a tap should be sent after startup rotation has settled. The helper observes only the preceding 600 ms, so a rotation that starts after that interval can still overlap a tap. Both tap tests use the helper, and the second tap in `tappingCountsUp` has no additional check. This is a narrow timing race, but it means the wait cannot guarantee the stated outcome on large screens where the orientation lock is ignored. Exercise delayed rotation on a device and synchronize with the actual transition or retry the interaction after a detected rotation. BLOCKING: 0 --- Reviewed head 295f647292f7567bced610dd2785d29bb8be3c55 at 2026-11-18T14:59:31Z by codex exec (read-only sandbox).
stephen deleted branch portrait-lock 2026-11-18 18:40:14 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rasterstate/grid-sample-android!3
No description provided.