Position pos = acquireLocation(enableHighAccuracy);
cachedPosition = pos;
if (pos != null) {
callback.onSuccess(pos);
} else {
callback.onFailure(new PositionError(PositionError.POSITION_UNAVAILABLE));
}
} catch (InterruptedException ie) {
cachedPosition = null;
callback.onFailure(new PositionError(PositionError.TIMEOUT));
}
}