(state: AppState, action: F)
| 5459 | } |
| 5460 | |
| 5461 | async fn run_android_action<F, T>(state: AppState, action: F) -> Result<T, AppError> |
| 5462 | where |
| 5463 | F: FnOnce(AndroidBridge) -> Result<T, AppError> + Send + 'static, |
| 5464 | T: Send + 'static, |
| 5465 | { |
| 5466 | let android = state.android.clone(); |
| 5467 | task::spawn_blocking(move || action(android)) |
| 5468 | .await |
| 5469 | .map_err(|error| { |
| 5470 | AppError::internal(format!("Failed to join Android bridge task: {error}")) |
| 5471 | })? |
| 5472 | } |
| 5473 | |
| 5474 | async fn all_device_values(state: AppState, force_refresh: bool) -> Result<Vec<Value>, AppError> { |
| 5475 | let ios = list_simulators_cached(state.clone(), force_refresh).await?; |
no test coverage detected