Android: setOverrideSynchronousUpdate for existing sources (#4366)

Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Richard Fairhurst
2026-08-04 21:00:50 +01:00
committed by GitHub
parent f1905c5215
commit 40be634126
7 changed files with 36 additions and 3 deletions

View File

@@ -217,6 +217,10 @@ jboolean GeoJSONSource::isUpdateSynchronous(jni::JNIEnv&) {
return source.as<style::GeoJSONSource>()->isUpdateSynchronous();
}
void GeoJSONSource::setOverrideSynchronousUpdate(jni::JNIEnv&, jni::jboolean newOverride) {
source.as<style::GeoJSONSource>()->setOverrideSynchronousUpdate(newOverride);
}
void GeoJSONSource::registerNative(jni::JNIEnv& env) {
// Lookup the class
static auto& javaClass = jni::Class<GeoJSONSource>::Singleton(env);
@@ -241,7 +245,8 @@ void GeoJSONSource::registerNative(jni::JNIEnv& env) {
METHOD(&GeoJSONSource::getClusterChildren, "nativeGetClusterChildren"),
METHOD(&GeoJSONSource::getClusterLeaves, "nativeGetClusterLeaves"),
METHOD(&GeoJSONSource::getClusterExpansionZoom, "nativeGetClusterExpansionZoom"),
METHOD(&GeoJSONSource::isUpdateSynchronous, "nativeIsUpdateSynchronous"));
METHOD(&GeoJSONSource::isUpdateSynchronous, "nativeIsUpdateSynchronous"),
METHOD(&GeoJSONSource::setOverrideSynchronousUpdate, "nativeSetOverrideSynchronousUpdate"));
}
void FeatureConverter::convertJson(std::shared_ptr<std::string> json, ActorRef<GeoJSONDataCallback> callback) {

View File

@@ -86,6 +86,7 @@ private:
void setCollectionSync(jni::JNIEnv&, const jni::Object<JNIType>&);
jboolean isUpdateSynchronous(jni::JNIEnv&);
void setOverrideSynchronousUpdate(jni::JNIEnv&, jni::jboolean);
}; // class GeoJSONSource