forked from organicmaps/organicmaps
[android] Added logs, removed heavy core initialization
This commit is contained in:
parent
f2b419269a
commit
c36c31cb49
1 changed files with 5 additions and 17 deletions
|
@ -49,6 +49,7 @@ public class GeofenceTransitionsIntentService extends JobIntentService
|
|||
private void onSuccess(@NonNull GeofencingEvent geofencingEvent)
|
||||
{
|
||||
int transitionType = geofencingEvent.getGeofenceTransition();
|
||||
LOG.d(TAG, "transitionType = " + transitionType);
|
||||
|
||||
if (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER)
|
||||
onGeofenceEnter(geofencingEvent);
|
||||
|
@ -80,7 +81,7 @@ public class GeofenceTransitionsIntentService extends JobIntentService
|
|||
}
|
||||
|
||||
private void makeLocationProbesBlocking(@NonNull GeofencingEvent event) throws
|
||||
InterruptedException
|
||||
InterruptedException
|
||||
{
|
||||
CountDownLatch latch = new CountDownLatch(LOCATION_PROBES_MAX_COUNT);
|
||||
for (int i = 0; i < LOCATION_PROBES_MAX_COUNT; i++)
|
||||
|
@ -126,7 +127,7 @@ public class GeofenceTransitionsIntentService extends JobIntentService
|
|||
}
|
||||
|
||||
@Override
|
||||
public void runInternal()
|
||||
public void run()
|
||||
{
|
||||
requestLocationCheck();
|
||||
}
|
||||
|
@ -153,11 +154,11 @@ public class GeofenceTransitionsIntentService extends JobIntentService
|
|||
}
|
||||
|
||||
@Override
|
||||
public void runInternal()
|
||||
public void run()
|
||||
{
|
||||
GeofenceLocation location = getGeofenceLocation();
|
||||
GeofenceRegistry geofenceRegistry = GeofenceRegistryImpl.from(getApplication());
|
||||
|
||||
LOG.d(TAG, "Exit event for location = " + location);
|
||||
try
|
||||
{
|
||||
geofenceRegistry.unregisterGeofences();
|
||||
|
@ -184,19 +185,6 @@ public class GeofenceTransitionsIntentService extends JobIntentService
|
|||
mGeofenceLocation = location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
||||
/* FIXME */
|
||||
/* if (!getApplication().arePlatformAndCoreInitialized())
|
||||
getApplication().initCore();*/
|
||||
|
||||
runInternal();
|
||||
}
|
||||
|
||||
protected abstract void runInternal();
|
||||
|
||||
@NonNull
|
||||
protected MwmApplication getApplication()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue