mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
fix(ioscompanion): retry describe past transient collapsed accessibility dumps
This commit is contained in:
1 parent
8b7a51c5b5
commit
a745ec7938
2 files changed
+53
-10
No files matched your search
@@ -19,6 +19,20 @@ type rawFrame struct {
|
||||
// it maps to an empty value rather than surfacing as literal field text.
|
||||
const emptyFieldValueSentinel = "Invalid"
|
||||
|
||||
// dumpIsCollapsed reports whether a flat describe-all dump carries no real UI
|
||||
// content: it is empty or holds only the application shell. The accessibility
|
||||
// bridge briefly returns this state during cold start and screen transitions
|
||||
// before the real tree reappears.
|
||||
func dumpIsCollapsed(dump []byte) bool {
|
||||
elements := decodeDump(dump)
|
||||
for _, element := range elements {
|
||||
if element.Type != "" && element.Type != "Application" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// rawElement is one entry in the flat describe-all dump returned by the
|
||||
// simulator companion. Only the fields the mapper consumes are declared;
|
||||
// unknown fields are ignored.
|
||||
|
||||
Reference in new issue
Block a user