Renamed method

This commit is contained in:
Dmitry Yunitsky 2014-09-25 11:33:46 +03:00 committed by Alex Zolotarev
parent 59074f292b
commit dc7d6c92af
6 changed files with 10 additions and 8 deletions

View file

@ -456,7 +456,7 @@ public class MWMActivity extends NvEventQueueActivity
}
else
{
final Location l = LocationService.INSTANCE.getLastKnown();
final Location l = LocationService.INSTANCE.getLastLocation();
if (l != null && nativeIsInChina(l.getLatitude(), l.getLongitude()))
return true;
else
@ -636,7 +636,7 @@ public class MWMActivity extends NvEventQueueActivity
private void shareMyLocation()
{
final Location loc = LocationService.INSTANCE.getLastKnown();
final Location loc = LocationService.INSTANCE.getLastLocation();
if (loc != null)
{
final String geoUrl = Framework.nativeGetGe0Url(loc.getLatitude(), loc.getLongitude(), Framework.getDrawScale(), "");

View file

@ -169,7 +169,7 @@ public class SearchActivity extends MapsWithMeBaseListActivity implements Locati
// If now position detected or no country downloaded for position.
if (mContext.mSearchMode != IN_VIEWPORT)
{
final Location loc = LocationService.INSTANCE.getLastKnown();
final Location loc = LocationService.INSTANCE.getLastLocation();
if (loc == null)
{
return mContext.getString(R.string.unknown_current_position);

View file

@ -193,7 +193,7 @@ public class BookmarkListAdapter extends BaseAdapter
void setDistance(Bookmark bmk)
{
final Location loc = LocationService.INSTANCE.getLastKnown();
final Location loc = LocationService.INSTANCE.getLastLocation();
if (loc != null)
{
final DistanceAndAzimut daa = bmk.getDistanceAndAzimut(loc.getLatitude(), loc.getLongitude(), 0.0);

View file

@ -137,7 +137,9 @@ public enum LocationService implements
}
}
public Location getLastKnown() { return mLastLocation; }
public Location getLastLocation() { return mLastLocation; }
public long getLastLocationTime() { return mLastLocationTime; }
private void notifyLocationUpdated(final Location l)
{

View file

@ -517,7 +517,7 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
mTvLon = (TextView) mGeoLayout.findViewById(R.id.info_box_lon);
mTvLon.setOnClickListener(this);
final Location lastKnown = LocationService.INSTANCE.getLastKnown();
final Location lastKnown = LocationService.INSTANCE.getLastLocation();
updateLocation(lastKnown);
updateCoords();
@ -580,7 +580,7 @@ public class MapInfoView extends LinearLayout implements View.OnClickListener
{
if (mGeoLayout != null && mMapObject != null && mMapObject.getType() != MapObjectType.MY_POSITION)
{
final Location l = LocationService.INSTANCE.getLastKnown();
final Location l = LocationService.INSTANCE.getLastLocation();
if (l != null)
{
final DistanceAndAzimut da = Framework.nativeGetDistanceAndAzimutFromLatLon(

View file

@ -59,7 +59,7 @@ public class Yota
if (addLastKnow)
{
final Location lastLocation = LocationService.INSTANCE.getLastKnown();
final Location lastLocation = LocationService.INSTANCE.getLastLocation();
if (lastLocation != null)
{
i.putExtra(EXTRA_HAS_LOCATION, true)