Repository navigation
perf(android): read screenshot rotation from the helper response - #4603
Conversation
The helper's screenshot response now carries the default display's rotation and the display count, so a helper capture no longer spawns adb shell dumpsys display beside it. The screencap fallback and a helper without the headers keep the dumpsys probe; a device with more than one display still reports no rotation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…antics Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ ApproveNo open findings. Reviewed with this repository's own Sentinel configuration ( 💬 Talking to SentinelIn a finding's thread, reply with:
On this conversation, comment |
There was a problem hiding this comment.
No issues found across 10 files
You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
|
This PR is ready: I found no problems in 04a2045, and all 24 checks pass. There are no conflicts, and it can go to maintainer review. Not blocking, and fine to take or leave: the branch in |
Summary
Each Android helper screenshot spawned
adb shell dumpsys displayto learn the rotation. The helper's screenshot response now carriesdisplayRotation(default display, read before and after the capture, sent only when both agree) anddisplayCount. A helper capture spawns no adb process.dumpsysstays for thescreencapfallback, orientation settle, and a helper without the headers.10 files touched.
Validation
Head
04a2045827, base244d1ff683. Emulator API 35,screenshoton a live helper session. 2 passes × 6 interleaved rounds × 5 shots (n=60 per arm), load 23–49 on 12 cores:Main already ran the probe in parallel with the capture, so wall time stays within host noise. The firm gain is one fewer adb call per screenshot, which counts more on remote devices.
At all four rotations, the helper rotation matched
dumpsys mCurrentOrientationand the helper PNG was pixel-identical toscreencap. This was verified on API 35 only. A second overlay display made the helper report no rotation.Focused unit tests, helper JVM suite, and
pnpm typecheckpass. CI is green.🤖 Generated with Claude Code