Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes in the code and tests according to PR #455 related to utilization of the NetworkState class #469

Open
wants to merge 9 commits into
base: RxJava2.x
Choose a base branch
from

Conversation

pwittchen
Copy link
Owner

fixes in the logic of MarshmallowNetworkObservingStrategy and tests according to PR #455 related to utilization of the NetworkState class

@pwittchen
Copy link
Owner Author

pwittchen commented Dec 4, 2022

I also updated code of the sample apps. Unfortunately, In the Android emulator, network changes are not invoked for some reason. They're invoked only when I restart the Activity. On the RxJava2.x branch it works fine on the emulator, so it needs fix.

@pwittchen
Copy link
Owner Author

pwittchen commented Dec 4, 2022

Current analysis: Logic in MarshmallowNetworkObservingStrategy#propagateAnyConnectedState needs to be updated. Probably new strategy QNetworkObservingStrategy needs to be created to handle this on Android Q. In general propagateAnyConnectedState receives 5 notifications and for NetworkState logic is incorrect to propagate state change.

…ccording to PR #455 related to utilization of the NetworkState class
…and added todo comments (2 tests are failing now)
@pwittchen pwittchen self-assigned this Dec 6, 2022
@pwittchen
Copy link
Owner Author

pwittchen commented Dec 10, 2022

I finally fixed handling state in the correct manner, so the last available connected network is propagated to the end of the stream if we lost connectivity with one network while being connected to two networks or more.

Now a few more things needs to be done:

  • fixing tests, which use removed code to apply the same logic with different code
  • moving new code from the MarshmallowNetworkObservingStrategy to the QNetworkObservingStrategy and rolling back old code to the changed file
  • serving QNetworkObservingStrategy for Android Q and higher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants