Merged
Conversation
Remove IPlatformServices.QuitApplication()
mattleibow
commented
Sep 23, 2021
| { | ||
| public static void MapRequestTerminate(ApplicationHandler handler, IApplication application, object? args) | ||
| { | ||
| handler.NativeView.Exit(); |
Member
Author
There was a problem hiding this comment.
mattleibow
commented
Sep 23, 2021
# Conflicts: # src/Core/src/Platform/MauiContext.Android.cs
27 tasks
AmrAlSayed0
reviewed
Sep 23, 2021
src/Core/src/Handlers/Application/ApplicationHandler.Android.cs
Outdated
Show resolved
Hide resolved
Member
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
hartez
previously requested changes
Sep 29, 2021
src/Core/src/Handlers/Application/ApplicationHandler.Android.cs
Outdated
Show resolved
Hide resolved
PureWeen
reviewed
Sep 29, 2021
PureWeen
previously requested changes
Sep 29, 2021
Member
There was a problem hiding this comment.
-
I'd recommended making IMauiApplicationContext, IMauiWindowContext, and the related concrete classes internal. I could see these eventually becoming apart of our better scoping solution. For now we could expose Application/Window to users via extension methods?
-
And then we can create a tracking issue for the possible exit options on Android?
Member
Author
|
Need to re-verify iOS, but I think the code is ready again. And of course some rando errors. |
This was referenced Oct 1, 2021
Merged
Member
Author
|
Android (and others) quitting stuff: #2814 |
PureWeen
approved these changes
Oct 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of Change
This PR adds an
ApplicationHandlerso that an app can invoke a "quit" action. Previously this was onIPlatformServices, but now we got handlers - and not only that, it is easily overridable by setting the method in the mappers.#1965
Additions made
ApplicationHandlerIPlatformServices.QuitApplication()ScopedMauiContextandIScopedMauiContextIMauiContextand puts it inside a "proxy"IServiceProviderMakeScopedwith various overloads to wrap a context and add additional specific values (window, animation manager, fragment manager)It also removes the various
Forms.Init()calls that do not take a maui context. This is no longer needed since we got the compat extensions using the lifecycle events.PR Checklist
Does this PR touch anything that might affect accessibility?
If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.