-
Notifications
You must be signed in to change notification settings - Fork 582
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
Added code to get bonded devices from adapter #46
Conversation
The build appears to be failing because of an existing failing test. |
@@ -66,6 +66,17 @@ public RxBleDevice getBleDevice(@NonNull String macAddress) { | |||
} | |||
|
|||
@Override | |||
public Set<RxBleDevice> getBondedDevices() { | |||
Set<RxBleDevice> rxBleDevices = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this line should look: Set<RxBleDevice> rxBleDevices = new HashSet(size);
Otherwise the function will throw NPE in line 73 or I have missed where the rxBleDevices
is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are probably correct. I will make that change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test scenario in RxBleClientTest.groovy
as well.
The failing test should be fixed at the current top of the |
Could you also add an appropriate test in |
Good to go, I'm merging. |
Dear Contributor, similar to many open source projects we kindly request to sign our CLA if you'd like to contribute to our project. This license is for your protection as a Contributor as well as the protection of Polidea; it does not change your rights to use your own Contributions for any other purpose. You can find a link here: https://cla-assistant.io/Polidea/RxAndroidBle |
For a development project I am working on I have the need to pull a list of bonded devices. Added code to the RxBleClient in order to facilitate this. I also fixed an existing style issue.