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.
Description of the Change
Now when call resetBindAll always force bindProcessToNetwork(null) without network connection connected ("desired" variable equal NULL).
Events such network receiver and network callback are correctly managed and unregistered before register new events. This fix try to avoid double invoking of the same event and cause problems when connecting to a network with bindAll parameter set to TRUE and subsequently disconnected.
Benefits
If you connect to a Wifi network without internet connection (bindAll parameter activated) and subsequently connect to a Wifi network with internet connection, second connection invoke bindProcessToNetwork(network) also without bindAll parameter.
Now if you disconnect from network, resetBindAll don't work property and app doesn't access to mobile data connection for example.
Possible Drawbacks
From my tests and use case, nothing. I use this plugin to connect to a specific wifi network without internet connection and switching between different network configurations: mobile data, wifi with internet and wifi without internet access.
Applicable Issues
#94