05nelsonm/kmp-tor

Application process persists after service destroyed API 24+

05nelsonm opened this issue · 0 comments

If the task has been removed, whether or not TorService is shutting down in onTaskRemoved, the application process continues running in the background, even though the service has been shutdown. Need to call exit if user does not open the task again.

Implementation details:

  • TorServiceConfig.Foreground: Add configuration option for opt-out behavior.
  • Service.onTaskRemoved: Register Application.ActivityLifecycleCallbacks to monitor return to task
  • Service.onDestroy: If user has not returned to task, call exit

Part of #423