Commit 5bceb95
Use shared EmulatorRunner from android-tools for BootAndroidEmulator
Replace the 454-line BootAndroidEmulator implementation with a thin
~180-line wrapper that delegates to EmulatorRunner.BootEmulatorAsync()
from Xamarin.Android.Tools.AndroidSdk.
Key changes:
- Remove all process management, polling, and boot detection logic
- Delegate to EmulatorRunner.BootEmulatorAsync() for the full 3-phase
boot: check online → check AVD running → launch + poll + wait
- Map EmulatorBootResult errors to existing XA0143/XA0145 error codes
- Virtual ExecuteBoot() method for clean test mocking
- Update submodule to feature/emulator-runner (d8ee2d5)
Tests updated from 9 to 10 (added ExtraArguments and UnknownError tests)
using simplified mock pattern — MockBootAndroidEmulator overrides
ExecuteBoot() to return canned EmulatorBootResult values.
Depends on: dotnet/android-tools#284
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 64e5a28 commit 5bceb95
3 files changed
Lines changed: 134 additions & 427 deletions
File tree
- external
- src/Xamarin.Android.Build.Tasks
- Tasks
- Tests/Xamarin.Android.Build.Tests/Tasks
Submodule xamarin-android-tools updated 9 files
- .github/workflows/copilot-setup-steps.yml+20
- src/Xamarin.Android.Tools.AndroidSdk/Models/EmulatorBootOptions.cs+18
- src/Xamarin.Android.Tools.AndroidSdk/Models/EmulatorBootResult.cs+14
- src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt+28-2
- src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt+28-2
- src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbRunner.cs+91-2
- src/Xamarin.Android.Tools.AndroidSdk/Runners/EmulatorRunner.cs+291
- tests/Xamarin.Android.Tools.AndroidSdk-Tests/AdbRunnerTests.cs+59
- tests/Xamarin.Android.Tools.AndroidSdk-Tests/EmulatorRunnerTests.cs+370
0 commit comments