#include <JNIHelp.h> // For jniRegisterNativeMethods
#include <jni_utility.h> // For getJNIEnv
-#include "Frame.h"
#include "Geoposition.h"
#include "PositionError.h"
#include "PositionOptions.h"
// On Android, high power == GPS. Set whether to use GPS before we start the
// implementation.
- // FIXME: Checking for the presence of options will probably not be required
- // once WebKit bug 27254 is fixed.
- if (options && options->enableHighAccuracy())
+ ASSERT(options);
+ if (options->enableHighAccuracy())
m_javaBridge->setEnableGps(true);
if (!haveJavaBridge)
errorOccurred();
}
-void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* timer) {
+void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* timer)
+{
ASSERT(&m_timer == timer);
ASSERT(m_lastPosition || m_lastError);
if (m_lastPosition)
public:
static GeolocationService* create(GeolocationServiceClient*);
- GeolocationServiceAndroid(GeolocationServiceClient*);
virtual ~GeolocationServiceAndroid() {};
virtual bool startUpdating(PositionOptions*);
void timerFired(Timer<GeolocationServiceAndroid>* timer);
private:
+ GeolocationServiceAndroid(GeolocationServiceClient*);
+
static bool isPositionMovement(Geoposition* position1, Geoposition* position2);
static bool isPositionMoreAccurate(Geoposition* position1, Geoposition* position2);
static bool isPositionMoreTimely(Geoposition* position1, Geoposition* position2);