{"action":"created","comment":{"url":"https://api.github.com/repos/mapzen/LOST/pulls/comments/77016497","id":77016497,"diff_hunk":"@@ -52,56 +58,63 @@ public FusedLocationProviderService getService() {\n     Log.d(TAG, \"[onDestroy]\");\n   }\n \n-  public Location getLastLocation() {\n-    return serviceImpl.getLastLocation();\n+  public Location getLastLocation(LostApiClient apiClient) {","path":"lost/src/main/java/com/mapzen/android/lost/internal/FusedLocationProviderService.java","position":40,"original_position":40,"commit_id":"d040bd2e127c29672cb004288291ca441f65781e","original_commit_id":"d040bd2e127c29672cb004288291ca441f65781e","user":{"login":"ecgreb","id":464123,"avatar_url":"https://avatars.githubusercontent.com/u/464123?v=3","gravatar_id":"","url":"https://api.github.com/users/ecgreb","html_url":"https://github.com/ecgreb","followers_url":"https://api.github.com/users/ecgreb/followers","following_url":"https://api.github.com/users/ecgreb/following{/other_user}","gists_url":"https://api.github.com/users/ecgreb/gists{/gist_id}","starred_url":"https://api.github.com/users/ecgreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecgreb/subscriptions","organizations_url":"https://api.github.com/users/ecgreb/orgs","repos_url":"https://api.github.com/users/ecgreb/repos","events_url":"https://api.github.com/users/ecgreb/events{/privacy}","received_events_url":"https://api.github.com/users/ecgreb/received_events","type":"User","site_admin":false},"body":"What do you think about renaming this param from `apiClient` to `client` in all the method signatures? It would be a bit more brief and also consistent with the [play services API](https://developers.google.com/android/reference/com/google/android/gms/location/FusedLocationProviderApi.html#getLastLocation(com.google.android.gms.common.api.GoogleApiClient)).\r\n\r\n","created_at":"2016-08-31T16:01:27Z","updated_at":"2016-08-31T16:01:27Z","html_url":"https://github.com/mapzen/LOST/pull/87#discussion_r77016497","pull_request_url":"https://api.github.com/repos/mapzen/LOST/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/mapzen/LOST/pulls/comments/77016497"},"html":{"href":"https://github.com/mapzen/LOST/pull/87#discussion_r77016497"},"pull_request":{"href":"https://api.github.com/repos/mapzen/LOST/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/mapzen/LOST/pulls/87","id":82962807,"html_url":"https://github.com/mapzen/LOST/pull/87","diff_url":"https://github.com/mapzen/LOST/pull/87.diff","patch_url":"https://github.com/mapzen/LOST/pull/87.patch","issue_url":"https://api.github.com/repos/mapzen/LOST/issues/87","number":87,"state":"open","locked":false,"title":"Multiple location clients","user":{"login":"sarahlensing","id":494323,"avatar_url":"https://avatars.githubusercontent.com/u/494323?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahlensing","html_url":"https://github.com/sarahlensing","followers_url":"https://api.github.com/users/sarahlensing/followers","following_url":"https://api.github.com/users/sarahlensing/following{/other_user}","gists_url":"https://api.github.com/users/sarahlensing/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahlensing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahlensing/subscriptions","organizations_url":"https://api.github.com/users/sarahlensing/orgs","repos_url":"https://api.github.com/users/sarahlensing/repos","events_url":"https://api.github.com/users/sarahlensing/events{/privacy}","received_events_url":"https://api.github.com/users/sarahlensing/received_events","type":"User","site_admin":false},"body":"### Overview\r\nThis PR adds support for multiple `LostApiClient`s to be used with the `LocationServices#FusedLocationApi`.\r\n\r\n### Proposed Changes\r\nThe PR adds `LostApiClient` as a required parameter to the `FusedLocationProviderApi` and implements scoping `LocationListeners`, `PendingIntents`, and `LocationCallbacks` to each `LostApiClient`. It introduces a new class, `ClientManager` for assisting with disconnection logic in the `LostApiClient` so that the static APIs will be set to `null` when there are no more clients in the `ClientManager`. In addition, this PR changes how we handle `LocationEngines` and now creates an engine per client so that setting a mock location for one client does not affect the mock location of another client.\r\n\r\n### TODO\r\n- ~~Implement support for multiple clients in remaining `FusedLocationProviderApi` methods~~\r\n- ~~Add tests for `FusedLocationProviderApi` multiple client support~~\r\n- Implement and add tests for `GeofencingApi` ~~and `SettingsApi`~~ multiple client support\r\n\r\n### Future PR\r\n- Implement and add tests for `GeofencingApi` multiple client support","created_at":"2016-08-26T22:26:05Z","updated_at":"2016-08-31T16:01:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64ef3b901237af2caf2ce97e24ddf1b385772827","assignee":{"login":"ecgreb","id":464123,"avatar_url":"https://avatars.githubusercontent.com/u/464123?v=3","gravatar_id":"","url":"https://api.github.com/users/ecgreb","html_url":"https://github.com/ecgreb","followers_url":"https://api.github.com/users/ecgreb/followers","following_url":"https://api.github.com/users/ecgreb/following{/other_user}","gists_url":"https://api.github.com/users/ecgreb/gists{/gist_id}","starred_url":"https://api.github.com/users/ecgreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecgreb/subscriptions","organizations_url":"https://api.github.com/users/ecgreb/orgs","repos_url":"https://api.github.com/users/ecgreb/repos","events_url":"https://api.github.com/users/ecgreb/events{/privacy}","received_events_url":"https://api.github.com/users/ecgreb/received_events","type":"User","site_admin":false},"assignees":[{"login":"ecgreb","id":464123,"avatar_url":"https://avatars.githubusercontent.com/u/464123?v=3","gravatar_id":"","url":"https://api.github.com/users/ecgreb","html_url":"https://github.com/ecgreb","followers_url":"https://api.github.com/users/ecgreb/followers","following_url":"https://api.github.com/users/ecgreb/following{/other_user}","gists_url":"https://api.github.com/users/ecgreb/gists{/gist_id}","starred_url":"https://api.github.com/users/ecgreb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecgreb/subscriptions","organizations_url":"https://api.github.com/users/ecgreb/orgs","repos_url":"https://api.github.com/users/ecgreb/repos","events_url":"https://api.github.com/users/ecgreb/events{/privacy}","received_events_url":"https://api.github.com/users/ecgreb/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mapzen/LOST/pulls/87/commits","review_comments_url":"https://api.github.com/repos/mapzen/LOST/pulls/87/comments","review_comment_url":"https://api.github.com/repos/mapzen/LOST/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapzen/LOST/issues/87/comments","statuses_url":"https://api.github.com/repos/mapzen/LOST/statuses/d040bd2e127c29672cb004288291ca441f65781e","head":{"label":"mapzen:62-multiple-location-clients","ref":"62-multiple-location-clients","sha":"d040bd2e127c29672cb004288291ca441f65781e","user":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"repo":{"id":18451768,"name":"LOST","full_name":"mapzen/LOST","owner":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapzen/LOST","description":"A drop-in replacement for Google Play services location APIs for Android","fork":false,"url":"https://api.github.com/repos/mapzen/LOST","forks_url":"https://api.github.com/repos/mapzen/LOST/forks","keys_url":"https://api.github.com/repos/mapzen/LOST/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapzen/LOST/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapzen/LOST/teams","hooks_url":"https://api.github.com/repos/mapzen/LOST/hooks","issue_events_url":"https://api.github.com/repos/mapzen/LOST/issues/events{/number}","events_url":"https://api.github.com/repos/mapzen/LOST/events","assignees_url":"https://api.github.com/repos/mapzen/LOST/assignees{/user}","branches_url":"https://api.github.com/repos/mapzen/LOST/branches{/branch}","tags_url":"https://api.github.com/repos/mapzen/LOST/tags","blobs_url":"https://api.github.com/repos/mapzen/LOST/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapzen/LOST/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapzen/LOST/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapzen/LOST/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapzen/LOST/statuses/{sha}","languages_url":"https://api.github.com/repos/mapzen/LOST/languages","stargazers_url":"https://api.github.com/repos/mapzen/LOST/stargazers","contributors_url":"https://api.github.com/repos/mapzen/LOST/contributors","subscribers_url":"https://api.github.com/repos/mapzen/LOST/subscribers","subscription_url":"https://api.github.com/repos/mapzen/LOST/subscription","commits_url":"https://api.github.com/repos/mapzen/LOST/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapzen/LOST/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapzen/LOST/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapzen/LOST/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapzen/LOST/contents/{+path}","compare_url":"https://api.github.com/repos/mapzen/LOST/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapzen/LOST/merges","archive_url":"https://api.github.com/repos/mapzen/LOST/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapzen/LOST/downloads","issues_url":"https://api.github.com/repos/mapzen/LOST/issues{/number}","pulls_url":"https://api.github.com/repos/mapzen/LOST/pulls{/number}","milestones_url":"https://api.github.com/repos/mapzen/LOST/milestones{/number}","notifications_url":"https://api.github.com/repos/mapzen/LOST/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapzen/LOST/labels{/name}","releases_url":"https://api.github.com/repos/mapzen/LOST/releases{/id}","deployments_url":"https://api.github.com/repos/mapzen/LOST/deployments","created_at":"2014-04-04T20:26:14Z","updated_at":"2016-08-30T19:43:21Z","pushed_at":"2016-08-30T20:47:28Z","git_url":"git://github.com/mapzen/LOST.git","ssh_url":"git@github.com:mapzen/LOST.git","clone_url":"https://github.com/mapzen/LOST.git","svn_url":"https://github.com/mapzen/LOST","homepage":"","size":1311,"stargazers_count":127,"watchers_count":127,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":18,"forks":26,"open_issues":18,"watchers":127,"default_branch":"master"}},"base":{"label":"mapzen:master","ref":"master","sha":"b2d48639f4123947567d018755b9a5edbcfc90ae","user":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"repo":{"id":18451768,"name":"LOST","full_name":"mapzen/LOST","owner":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapzen/LOST","description":"A drop-in replacement for Google Play services location APIs for Android","fork":false,"url":"https://api.github.com/repos/mapzen/LOST","forks_url":"https://api.github.com/repos/mapzen/LOST/forks","keys_url":"https://api.github.com/repos/mapzen/LOST/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapzen/LOST/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapzen/LOST/teams","hooks_url":"https://api.github.com/repos/mapzen/LOST/hooks","issue_events_url":"https://api.github.com/repos/mapzen/LOST/issues/events{/number}","events_url":"https://api.github.com/repos/mapzen/LOST/events","assignees_url":"https://api.github.com/repos/mapzen/LOST/assignees{/user}","branches_url":"https://api.github.com/repos/mapzen/LOST/branches{/branch}","tags_url":"https://api.github.com/repos/mapzen/LOST/tags","blobs_url":"https://api.github.com/repos/mapzen/LOST/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapzen/LOST/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapzen/LOST/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapzen/LOST/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapzen/LOST/statuses/{sha}","languages_url":"https://api.github.com/repos/mapzen/LOST/languages","stargazers_url":"https://api.github.com/repos/mapzen/LOST/stargazers","contributors_url":"https://api.github.com/repos/mapzen/LOST/contributors","subscribers_url":"https://api.github.com/repos/mapzen/LOST/subscribers","subscription_url":"https://api.github.com/repos/mapzen/LOST/subscription","commits_url":"https://api.github.com/repos/mapzen/LOST/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapzen/LOST/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapzen/LOST/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapzen/LOST/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapzen/LOST/contents/{+path}","compare_url":"https://api.github.com/repos/mapzen/LOST/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapzen/LOST/merges","archive_url":"https://api.github.com/repos/mapzen/LOST/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapzen/LOST/downloads","issues_url":"https://api.github.com/repos/mapzen/LOST/issues{/number}","pulls_url":"https://api.github.com/repos/mapzen/LOST/pulls{/number}","milestones_url":"https://api.github.com/repos/mapzen/LOST/milestones{/number}","notifications_url":"https://api.github.com/repos/mapzen/LOST/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapzen/LOST/labels{/name}","releases_url":"https://api.github.com/repos/mapzen/LOST/releases{/id}","deployments_url":"https://api.github.com/repos/mapzen/LOST/deployments","created_at":"2014-04-04T20:26:14Z","updated_at":"2016-08-30T19:43:21Z","pushed_at":"2016-08-30T20:47:28Z","git_url":"git://github.com/mapzen/LOST.git","ssh_url":"git@github.com:mapzen/LOST.git","clone_url":"https://github.com/mapzen/LOST.git","svn_url":"https://github.com/mapzen/LOST","homepage":"","size":1311,"stargazers_count":127,"watchers_count":127,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":18,"forks":26,"open_issues":18,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapzen/LOST/pulls/87"},"html":{"href":"https://github.com/mapzen/LOST/pull/87"},"issue":{"href":"https://api.github.com/repos/mapzen/LOST/issues/87"},"comments":{"href":"https://api.github.com/repos/mapzen/LOST/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/mapzen/LOST/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/mapzen/LOST/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapzen/LOST/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/mapzen/LOST/statuses/d040bd2e127c29672cb004288291ca441f65781e"}}}}
{"actor":{"display_login":"ecgreb"}}