Skip to content

Name the lock, however an action meets it (CHALLENGES 389) - #332

Merged
lana-20 merged 1 commit into
mainfrom
lock-waits-for-the-screen
Nov 5, 2026
Merged

lana-20 merged 1 commit into
mainfrom
lock-waits-for-the-screen

Conversation

@lana-20

@lana-20 lana-20 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #327.

lock lock answered once the device said asleep, while reads went on showing the app for about half a second. A tap in that window answered tapped, exit 0, and reached nothing. Going through every action on a locked device found the rest.

What changes

  • lock lock waits until a read will see the lock: on Android for interactiveState to leave GOING_TO_SLEEP, on iOS for SpringBoard in front. Each is bounded at 3 s.
  • Any tool that fails reading on a locked device answers device_not_ready, in one place, lockedFailure. find, wait, scroll-to, swipe up, keyboard --text and current blamed a changing screen, exit 1.
  • A touch at a point on an Android screen that is off is refused. A swipe, long press or drag at a point had no read in front of it and answered done.
  • A miss or a scroll-to with the system shell in front asks whether the device is locked. scroll-to swiped an iOS lock screen, which can unlock it.

Asleep is not locked. A lock screen that is up takes touches, a swipe up or a PIN pad, so nothing refuses those.

Measured

After lock lock Before After
Tap, Android 15 8 of 8 false successes 8 of 8 exit 3, none landed
Tap, Android 17 not run 8 of 8 exit 3, none landed
Tap, iOS 26.5 6 of 6 exit 4, no mention of the lock 10 of 10 exit 3
scroll-to, iOS 26.5 swiped once 8 of 8 exit 3, still locked

lock now takes about 0.6 s on Android and 1.5 s on iOS. The new lock.sh fails on main on both devices and passes here. Unlocked point gestures still land, and a tap straight after lock unlock landed 6 of 6.

device-state, gestures, locators, mobium-app and dialogs pass on Android; biometric, gestures, locators and mobium-app on iOS. The emulator froze once during a run, and passed gestures after a restart.

Not settled here

  • A device put to sleep by anything else, then tapped by element within the half second, still reports the tap: 4 of 4 with input keyevent KEYCODE_SLEEP. Asking before every touch would close it for 45 ms of a 250 ms tap on the emulator, so that is left as a separate decision.
  • A read on a sleeping Android takes 10 s to fail, so those refusals do too.
  • press back and press home on a sleeping Android answer after 20 s.
  • A lock screen that stays awake on Android was not measured, and nothing here ran on a real phone.

Fixes #327. lock lock now waits until a read sees the lock. Any tool that fails
reading on a locked device answers device_not_ready. A touch at a point on an
Android screen that is off is refused, and scroll-to leaves a lock screen unswiped.

Measured, tap after lock: Android 15 and 17, 8 of 8 exit 3, none landed; Android
15 before, 8 of 8 false successes. iOS 26.5: scroll-to 8 of 8 exit 3, still locked.
lock takes about 0.6 s on Android and 1.5 s on iOS. lock.sh fails on main and
passes here. device-state, gestures, locators, mobium-app and dialogs pass on
Android; biometric, gestures, locators and mobium-app on iOS. The emulator froze
once during a run and passed gestures after a restart.

A sleep from outside Mobium, tapped by element within the half second, is still
reported: 4 of 4 with input keyevent KEYCODE_SLEEP.
@lana-20
lana-20 merged commit ebab788 into main Nov 5, 2026
10 checks passed
@lana-20
lana-20 deleted the lock-waits-for-the-screen branch November 5, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A tap right after lock lock can report success on a locked device

1 participant