Repository: dotnet/maui
File: src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs (C#)

Code before:
			// The state of things might have changed after the modal view was pushed
			if (IsModalReady)
			{
				GetCurrentRootView()
					.SendAccessibilityEvent(global::Android.Views.Accessibility.EventTypes.ViewFocused);
			}
		}

		async Task PresentModal(Page modal, bool animated)
		{
			var parentView = GetModalParentView();

			var dialogFragment = new ModalFragment(WindowMauiContext, modal)
			{
				Cancelable = false,
				IsAnimated = animated
			};

			var fragmentManager = WindowMauiContext.GetFragmentManager();
			var dialogFragmentId = AView.GenerateViewId().ToString();
			_modals.Push(dialogFragmentId);
			dialogFragment.Show(fragmentManager, dialogFragmentId);

			if (animated)
			{
				TaskCompletionSource<bool> animationCompletionSource = new();
				
				dialogFragment.AnimationEnded += OnAnimationEnded;

				void OnAnimationEnded(object? sender, EventArgs e)
				{
					dialogFragment.AnimationEnded -= OnAnimationEnded;
					animationCompletionSource.SetResult(true);
				}

				await animationCompletionSource.Task;
			}
			else
			{
				// Non-animated modals need to wait for presentation completion to prevent race conditions
				TaskCompletionSource<bool> presentationCompletionSource = new();
				
				dialogFragment.PresentationCompleted += OnPresentationCompleted;

				void OnPresentationCompleted(object? sender, EventArgs e)
				{
					dialogFragment.PresentationCompleted -= OnPresentationCompleted;
					presentationCompletionSource.SetResult(true);
				}

				await presentationCompletionSource.Task;

Review comment (suggestion):
```suggestion
				TaskCompletionSource<bool> animationCompletionSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
```

And perform this change at line `109`, also

Code after:
			// The state of things might have changed after the modal view was pushed
			if (IsModalReady)
			{
				GetCurrentRootView()
					.SendAccessibilityEvent(global::Android.Views.Accessibility.EventTypes.ViewFocused);
			}
		}

		async Task PresentModal(Page modal, bool animated)
		{
			var parentView = GetModalParentView();

			var dialogFragment = new ModalFragment(WindowMauiContext, modal)
			{
				Cancelable = false,
				IsAnimated = animated
			};

			var fragmentManager = WindowMauiContext.GetFragmentManager();
			var dialogFragmentId = AView.GenerateViewId().ToString();
			_modals.Push(dialogFragmentId);
			dialogFragment.Show(fragmentManager, dialogFragmentId);

			if (animated)
			{
				TaskCompletionSource<bool> animationCompletionSource = new(TaskCreationOptions.RunContinuationsAsynchronously);

				dialogFragment.AnimationEnded += OnAnimationEnded;

				void OnAnimationEnded(object? sender, EventArgs e)
				{
					dialogFragment.AnimationEnded -= OnAnimationEnded;
					animationCompletionSource.SetResult(true);
				}

				await animationCompletionSource.Task;
			}
			else
			{
				// Non-animated modals need to wait for presentation completion to prevent race conditions
				TaskCompletionSource<bool> presentationCompletionSource = new();

				dialogFragment.PresentationCompleted += OnPresentationCompleted;

				void OnPresentationCompleted(object? sender, EventArgs e)
				{
					dialogFragment.PresentationCompleted -= OnPresentationCompleted;
					presentationCompletionSource.SetResult(true);
				}

				await presentationCompletionSource.Task;