MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / resolve_serial

Method resolve_serial

packages/server/src/android.rs:845–856  ·  view source on GitHub ↗
(&self, avd_name: &str)

Source from the content-addressed store, hash-verified

843 }
844
845 fn resolve_serial(&self, avd_name: &str) -> Result<String, AppError> {
846 if let Some(serial) = self.running_emulators()?.remove(avd_name) {
847 return Ok(serial);
848 }
849 let serials = self.online_emulator_serials()?;
850 if serials.len() == 1 && self.known_avd(avd_name)? {
851 return Ok(serials[0].clone());
852 }
853 Err(AppError::native(format!(
854 "Android emulator `{avd_name}` is not running."
855 )))
856 }
857
858 fn running_emulators(&self) -> Result<HashMap<String, String>, AppError> {
859 static CACHE: OnceLock<Mutex<TimedMap<String>>> = OnceLock::new();

Callers 6

bootMethod · 0.80
shutdownMethod · 0.80
eraseMethod · 0.80
wait_until_bootedMethod · 0.80
serial_for_idMethod · 0.80

Calls 5

running_emulatorsMethod · 0.80
known_avdMethod · 0.80
removeMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected