Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Unregister callbacks #208

Merged
merged 4 commits into from
May 23, 2017
Merged

Unregister callbacks #208

merged 4 commits into from
May 23, 2017

Conversation

sarahsnow1
Copy link
Contributor

Overview

This PR adds LostApiClient#unregisterConnectionCallbacks so that developers can prevent leaking resources when adding callbacks in LostApiClient.Builder.addConnectionCallbacks

It also updates the sample app examples to use cleanup registered callbacks.

Future work will add LostApiClient#registerConnectionCallbacks to allow adding callbacks after the client has been created

Closes #206

@@ -133,6 +133,7 @@ private void removeGeofences(LostApiClient client, String geofenceRequestId)
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
@Override public PendingResult<Status> removeGeofences(LostApiClient client,
PendingIntent pendingIntent) throws SecurityException {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit: remove if not needed.

@msmollin msmollin merged commit ce4bf79 into master May 23, 2017
@msmollin msmollin deleted the unregister-callbacks branch May 23, 2017 20:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants