Skip to content

Conversation

@ecgreb
Copy link
Collaborator

@ecgreb ecgreb commented Mar 7, 2017

Overview

My location layer should be disabled when the PlacePickerActivity is no longer visible on the screen (i.e. paused or finished).

This resolves two issues:

  1. When the place picker activity was finished location services would not be properly shutdown and the app would leak a service connection to the Lost fused location service (Place picker activity leaks Lost service connection after place is selected #301).

  2. This prevents location services from running hot when the place picker activity is in the background. Location updates are only needed when the place picker is visible on the screen and the user is in the process of selecting a place.

Proposed Changes

  • Disable location services in PlacePickerActivity#onPause().
  • Re-enable location services in PlacePickerActivity#onResume().

Fixes #301

@sarahcodes100 sarahcodes100 merged commit c9d089e into master Mar 8, 2017
@sarahcodes100 sarahcodes100 deleted the 301-service-connection-leak branch March 8, 2017 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Place picker activity leaks Lost service connection after place is selected

3 participants