mozilla/MozStumbler — pull request #1319 by cascheberg (2014-12-02 18:11:47+00:00)
Title: Fix MapLocationListener pausing GPS

@garvankeeley This might fix #1317

STR (GPS is enabled, of course):
- start app, scanning will start automatically
- enable lockscreen (press power button)
- do not move, wait for scan to pause (GPS icon disappears)
- then move until scans are reactivated (GPS icon appears)
- unlock phone, app should be visible now
- stop scanning, press home button to hide app

Result:
- GPS is still active

I think what happens here is this:
- enabling the lockscreen: `MapFragment.onPause` calls `mMapLocationListener.removeListener`
- moving after pause: `MapFragment.showPausedDueToNoMotionMessage(false)` re-enables GPS
- app becomes visible: `MapFragment.onResume` creates a new `MapLocationListener`, the reference to the old `MapLocationListener` with the active GPS is lost

This PR makes sure that `pauseGpsUpdates` does not have any effect after `removeListener` was called.