[Xamarin.Android.Build.Tasks] pass -S
for am start
commands
#8032
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1777086
Context: https://github.com/xamarin/xamarin-android/blob/17c74c5cfcc383464931e6a2f828a689ba998965/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs#L187-L190
If an android app is already running, and you do one of:
It doesn't actually close and restart the app.
To do this, we need to pass
-S
:This appears to work fine going back to API 21, we are already using this flag in unit tests.
Now the
<Exec/>
task prints an extra line:Note that this only fixes the OSS side of xamarin-android, we will need a change in:
https://github.com/xamarin/monodroid/blob/84a2ae648143924eafb8daa59b2a4e9f05f54359/tools/msbuild/Tasks/RunActivity.cs
To fix this in the commercial product.