Skip to content

Conversation

@Autfy
Copy link
Owner

@Autfy Autfy commented Feb 8, 2026

Motivation

  • ScreenAdapter.scalePoints previously used a broken indexing approach that only populated the first element, causing incorrect point scaling results.
  • A small typo in the demo header and an unclear AppScope docstring should be fixed for clarity.
  • Add unit tests to cover ResultBox behavior to prevent regressions around latch release and blocking reads.

Description

  • Replace the hand-rolled loop in ScreenAdapter.scalePoints with an idiomatic mapping implementation using points.map { ... }.toTypedArray() to correctly scale every point.
  • Correct the comment header typo from actoins to actions in app/src/main/java/.../actoins.kt.
  • Clarify the AppScope KDoc by noting that an empty pageName means any page in accessibility-api/src/main/java/.../AppScope.kt.
  • Add ResultBoxTest with two unit tests in accessibility-api/src/test/java/.../ResultBoxTest.kt covering latch release (setAndNotify) and blockedGet behavior.

Testing

  • Added unit tests: ResultBoxTest containing setAndNotify_releasesLatchAndReturnsValue and blockedGet_returnsValueWithoutThrowingWhenAlreadySet, but the test suite was not executed in this change.
  • No automated test run was performed as part of this PR; tests were committed for CI or local execution.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant