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
If the task has been removed, whether or not
TorService
is shutting down inonTaskRemoved
, the application process continues running in the background, even though the service has been shutdown. Need to callexit
if user does not open the task again.Implementation details:
TorServiceConfig.Foreground
: Add configuration option for opt-out behavior.Service.onTaskRemoved
: RegisterApplication.ActivityLifecycleCallbacks
to monitor return to taskService.onDestroy
: If user has not returned to task, callexit
Part of #423