(
udid: &str,
source: Option<&str>,
max_depth: Option<usize>,
include_hidden: bool,
interactive_only: bool,
)
| 3369 | } |
| 3370 | |
| 3371 | fn accessibility_cache_key( |
| 3372 | udid: &str, |
| 3373 | source: Option<&str>, |
| 3374 | max_depth: Option<usize>, |
| 3375 | include_hidden: bool, |
| 3376 | interactive_only: bool, |
| 3377 | ) -> Option<AccessibilitySnapshotCacheKey> { |
| 3378 | let source = AccessibilitySource::parse(source).ok()?; |
| 3379 | if source != AccessibilitySource::NativeAX |
| 3380 | && !(interactive_only && source == AccessibilitySource::Auto) |
| 3381 | { |
| 3382 | return None; |
| 3383 | } |
| 3384 | Some(AccessibilitySnapshotCacheKey { |
| 3385 | udid: udid.to_owned(), |
| 3386 | source: source.as_query_value().to_owned(), |
| 3387 | max_depth: max_depth.map(|depth| depth.min(80)), |
| 3388 | include_hidden, |
| 3389 | interactive_only, |
| 3390 | }) |
| 3391 | } |
| 3392 | |
| 3393 | fn spawn_accessibility_warmup(state: AppState, udid: String) { |
| 3394 | let generation = state.accessibility_cache.generation(&udid); |
no test coverage detected