Skip to content

Android: shouldn't call std::process:exit in EventLoop::run #2709

@rib

Description

@rib

Winit shouldn't be assuming that it's safe to simply terminate the current process via std::process:exit after the event loop returns.

On Android it's possible to run multiple activities in a single process and it's also possible that an application is based on some Java/Kotlin subclass of an Activity that may be expecting various lifecycle events that could be short circuited when Winit simply calls std::process:exit.

Instead there should probably be some logic that leads to calling ANativeActivity_finish (i.e. something to indirectly call Activity::finish() in the JVM) and then entering an infinite AndroidApp::poll_events() loop instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs investigationIssue must be confirmed and researchedDS - androidAffects the Android backendS - apiDesign and usability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions