Documentation
¶
Overview ¶
Command drawerrotateprobe live-checks #1467 on a phone: an open NavigationDrawer that rotates with the device must stay against the edge it opened on and span the new height.
It runs four phases of 8 s, each opening a drawer and logging where it is every half second. rotate.sh turns the device 3 s into each phase:
phase 1: end drawer, opened in portrait, turned to landscape
phase 2: end drawer, opened in landscape, turned to portrait
phase 3: start drawer, opened in portrait, turned to landscape
phase 4: start drawer, opened in landscape, turned to portrait
phase 5: start drawer, opened in landscape, turned the other way round
(90° to 270°): the canvas keeps its size, the notch changes side
Each line reads:
drawerrotateprobe phase=1 side=end canvas=360x780 drawer=x56 y0 304x780 gapEdge=0 gapBottom=0 ok=true
gapEdge is the distance from the drawer to the canvas edge it opened against, and gapBottom from its bottom to the canvas bottom. want is the width it should have here: 360 plus the system inset on its side, at most the canvas less a 56 dp strip of scrim. ok is true while the drawer is wholly on the canvas with both gaps 0 and the wanted width. Before the fix, phase 1 logs a large gapEdge after the turn (the drawer sits near the other side), and phase 2 a drawer past the right edge.
Android, from this directory:
CGO_LDFLAGS= bellui package --target android/arm64 --app-id com.trendvidia.drawerrotateprobe adb install -r drawerrotateprobe.apk ./rotate.sh # launches the probe, turns the device, restores rotation