My changes to address issues 17, 18, and 19#22
Open
ReyhanJB wants to merge 2 commits intofmetzger:masterfrom
Open
My changes to address issues 17, 18, and 19#22ReyhanJB wants to merge 2 commits intofmetzger:masterfrom
ReyhanJB wants to merge 2 commits intofmetzger:masterfrom
Conversation
Collaborator
|
@ReyhanJB, thanks for your pull request which I've finally come around to review. There's a couple of issues I see, some functional, some formal:
Feel free to reach out if I should clarify the points above (or anything else, actually). Your contributions are much appreciated! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I added broadcast receivers to bluetoothSensor, wifiSensor, and wifiSonnectionSensor classes to listen for changes in the status of bluetooth and wifi that is made by user. The receivers are registered in _enable() and unregistered in _disable(). If the user turns off bluetooth or wifi, the scantask will be stopped (callback is removed). If the user turns on bluetooth or wifi, scantask will be resumed. I intentionally didn't invoke _enable() or _disable() to avoid messing with core functionality of sensors.
I modified implementation of onProviderEnabled and onProviderDisabled for the locationlisteners in NetworkLocationSensor and GPSLocationSensor classes. I have to do a little refactoring (moving initialization of the listeners outside of _enable()) to make things work.
I tested the app to ensure the changes don't break the functionality. Please let me know if things work fine as well on your side.