Add Javadocs

This commit is contained in:
misaochan 2018-04-18 17:26:53 +10:00
parent b7cd435a58
commit ba8c3b5131

View file

@ -79,6 +79,11 @@ public class LocationServiceManager implements LocationListener {
Manifest.permission.ACCESS_FINE_LOCATION);
}
/**
* Gets the last known location in cases where there wasn't time to register a listener
* (e.g. when Location permission just granted)
* @return last known LatLng
*/
public LatLng getLKL() {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
Location lastKL = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);