Another step in the continuing saga of the service/client/RightMesh lifecycle drama.
Since we changed the app to only unbind on activity destroy, the service was staying alive (though not in the foreground) until the activity was swipe-killed.
This PR changes things so the it unbinds on activity stop, so that the service can come to a full stop (RightMesh included) when the app isn't in the foreground. To try to mitigate the issues we were having previously I have made the service not set the callback to null on unbind, so that the AIDL link (hopefully) isn't broken during the rapid unbind/bind process.
Another step in the continuing saga of the service/client/RightMesh lifecycle drama.
Since we changed the app to only unbind on activity destroy, the service was staying alive (though not in the foreground) until the activity was swipe-killed.
This PR changes things so the it unbinds on activity stop, so that the service can come to a full stop (RightMesh included) when the app isn't in the foreground. To try to mitigate the issues we were having previously I have made the service not set the callback to null on unbind, so that the AIDL link (hopefully) isn't broken during the rapid unbind/bind process.