This worker provides all the functionality of removing a trackable from all the places that it is stored, after detaching from the channel has been completed elsewhere. It also removes any subscriber data related to the trackable. It also updates resolutions and other stateflows related to trackables. If the trackable is the last trackable, then location updates are stopped. If the trackable is the active one, then the active trackable is cleared (and resolution policy informed). Once all of this is done, TrackableRemovalSuccess work is posted with a success result.
This worker disconnects the ably connection asynchronously if the trackable is the only trackable present, and calls StoppingConnectionFinished when this is the case.
If the asynchronous work fails and we are trying to disconnect, StoppingConnectionFinished work is posted.
If the synchronous work fails, TrackableRemovalSuccess work is posted with a failure result.
Implement the following worker from AAT Android:
This worker provides all the functionality of removing a trackable from all the places that it is stored, after detaching from the channel has been completed elsewhere. It also removes any subscriber data related to the trackable. It also updates resolutions and other stateflows related to trackables. If the trackable is the last trackable, then location updates are stopped. If the trackable is the active one, then the active trackable is cleared (and resolution policy informed). Once all of this is done,
TrackableRemovalSuccess
work is posted with a success result.This worker disconnects the ably connection asynchronously if the trackable is the only trackable present, and calls StoppingConnectionFinished when this is the case.
If the asynchronous work fails and we are trying to disconnect, StoppingConnectionFinished work is posted.
If the synchronous work fails,
TrackableRemovalSuccess
work is posted with a failure result.This work depends on: