forked from organicmaps/organicmaps-tmp
Download notification fix.
This commit is contained in:
parent
1f3b3f3d26
commit
69d65a9066
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ public class WorkerService extends IntentService
|
|||
{
|
||||
final LocationManager manager = (LocationManager) getApplication().getSystemService(Context.LOCATION_SERVICE);
|
||||
final Location l = manager.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);
|
||||
if (!LocationUtils.isExpired(l, l.getTime(), LocationUtils.LOCATION_EXPIRATION_TIME_MILLIS_LONG))
|
||||
if (l != null && !LocationUtils.isExpired(l, l.getTime(), LocationUtils.LOCATION_EXPIRATION_TIME_MILLIS_LONG))
|
||||
{
|
||||
placeDownloadNotification(l);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue