mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
fix(sidecar): an unreadable animation count is not idle
Defaulting the count to zero made a dumpsys that said nothing mean nothing is animating, so a degraded link broke out of the settle early and handed the runner a frame caught mid-animation. Unknown now waits, inside the deadline waitForIdle already holds.
This commit is contained in:
1 parent
34b8be2d8c
commit
9ff82b1565
1 file changed
+7
-1
@@ -538,8 +538,14 @@ class StubDriverBackend(
|
|||||||
companion object {
|
companion object {
|
||||||
private const val IDLE_POLL_INTERVAL_MILLIS = 50L
|
private const val IDLE_POLL_INTERVAL_MILLIS = 50L
|
||||||
|
|
||||||
|
// A count we could not read is not a count of zero. Defaulting it to
|
||||||
|
// zero made an unreadable dumpsys mean "nothing is animating, go
|
||||||
|
// ahead", which is the one answer the caller cannot check: it breaks
|
||||||
|
// out of the settle and snapshots whatever frame is on screen. Unknown
|
||||||
|
// keeps it waiting instead, inside the deadline waitForIdle already
|
||||||
|
// holds, and it agrees with the probe's own exception path.
|
||||||
internal fun isAnimationCountIdle(grepOutput: String): Boolean =
|
internal fun isAnimationCountIdle(grepOutput: String): Boolean =
|
||||||
(grepOutput.trim().toIntOrNull() ?: 0) == 0
|
grepOutput.trim().toIntOrNull() == 0
|
||||||
|
|
||||||
internal fun parseResolvedActivity(
|
internal fun parseResolvedActivity(
|
||||||
bundleId: String,
|
bundleId: String,
|
||||||
|
|||||||
Reference in new issue
Block a user