Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call Activity.finish() when android_main returns #81

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

rib
Copy link
Collaborator

@rib rib commented Apr 27, 2023

Calling Activity.finish() is what ensures the Activity will get gracefully destroyed, including calling the Activity's onDestroy method.

Fixes: #67

Copy link
Member

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, especially a good idea to also invoke all this cleanup when android_main() returns via panicking/unwinding :). That's strictly a separate change though.

android-activity/src/native_activity/glue.rs Show resolved Hide resolved
Calling Activity.finish() is what ensures the Activity will get
gracefully destroyed, including calling the Activity's onDestroy
method.

Fixes: rust-mobile#67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call ANativeActivity_finish() or GameActivity_finish() when android_main returns
2 participants