|
|
@ -263,9 +263,13 @@ public class TaskRabbitControlSet extends TaskEditControlSet implements Assigned
|
|
|
|
locationManager = (LocationManager) fragment.getActivity().getSystemService(Context.LOCATION_SERVICE);
|
|
|
|
locationManager = (LocationManager) fragment.getActivity().getSystemService(Context.LOCATION_SERVICE);
|
|
|
|
currentLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
|
|
|
|
currentLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
|
|
|
|
if (currentLocation == null) {
|
|
|
|
if (currentLocation == null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
|
|
|
|
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
|
|
|
|
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
|
|
|
|
// No gps
|
|
|
|
|
|
|
|
isEnabledForTRLocation = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
} else {
|
|
|
|
isEnabledForTRLocation = supportsCurrentLocation(currentLocation);
|
|
|
|
isEnabledForTRLocation = supportsCurrentLocation(currentLocation);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|