connectivity: Added connectivity_plus Listener and AppLifecycleListener to UpdateMachine #2111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the app returns from background or the network reconnects after failures, the event polling may be stuck in a backoff wait.This causes users to see a loading indicator even though connectivity has been restored.
This PR aborts the backoff wait when:
Testing done:
1.Turn off wifi and turn on. ==> connects immediately
2.Aeroplane mode on then off. ==> connects immediatelyy after wifi reconnects
3.Go to Home screen and return to the App within 4 second(3999ms) app remains already connected.
4.Go to Home screen and open the app after 4 second(3999ms) the app connects immediately. (backoff aborted)
5.Lock screen (not possible with screen recording on physical device) but same as the test done on Home screen.(backoff aborted.)
The testing-
zulip-test.mp4
Fixes: #1884