Skip to content

Call Activity.finish() when android_main returns#81

Merged
rib merged 1 commit into
rust-mobile:mainfrom
rib:finish-activity
Jun 19, 2023
Merged

Call Activity.finish() when android_main returns#81
rib merged 1 commit into
rust-mobile:mainfrom
rib:finish-activity

Conversation

@rib
Copy link
Copy Markdown
Member

@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

@rib rib requested review from MarijnS95 April 27, 2023 21:19
@rib rib force-pushed the finish-activity branch from 677c003 to 4d63fc4 Compare April 27, 2023 22:17
Copy link
Copy Markdown
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.

Comment thread android-activity/src/native_activity/glue.rs
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