When gps is disabled, clear the current location.

This commit is contained in:
Jimmy Shih
2012-09-11 13:29:23 -07:00
parent 1e3e6af9b9
commit b6d0609bed
2 changed files with 3 additions and 0 deletions
@@ -686,6 +686,7 @@ public class TrackDataHub implements DataSourceListener {
TrackDataListener.LocationState locationState;
if (!hasProviderEnabled) {
locationState = LocationState.DISABLED;
lastSeenLocation = null;
} else if (!hasFix) {
locationState = LocationState.NO_FIX;
} else if (!hasGoodFix) {
@@ -289,6 +289,8 @@ public class MapFragment extends Fragment
: R.string.gps_location_access);
message = getString(R.string.gps_disabled, setting);
isGpsDisabled = true;
currentLocation = null;
updateCurrentLocation();
break;
case NO_FIX:
message = getString(R.string.gps_wait_for_signal);