fix: audit STEP-057 weather runtime facade
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
OpenAI Codex
2026-09-07 11:42:28 +08:00
parent efaa3e61c9
commit dad6876c72
20 changed files with 183 additions and 23 deletions

View File

@@ -1214,6 +1214,10 @@ jni::jboolean NativeMapView::setWeatherColorStops(JNIEnv& env,
return layer->setColorStops(std::move(stops));
}
jni::jint NativeMapView::getWeatherColorStopCapacity(JNIEnv&) {
return static_cast<jni::jint>(mbgl::style::MaxWeatherColorStops);
}
jni::jboolean NativeMapView::advanceRasterArraySourceFieldWindow(JNIEnv& env, const jni::String& sourceId) {
const auto id = jni::Make<std::string>(env, sourceId);
auto* source = map->getStyle().getSource(id);
@@ -1692,6 +1696,7 @@ void NativeMapView::registerNative(jni::JNIEnv& env) {
METHOD(&NativeMapView::setStyleLayerVisibility, "nativeSetStyleLayerVisibility"),
METHOD(&NativeMapView::setRasterParticleColors, "nativeSetRasterParticleColors"),
METHOD(&NativeMapView::setWeatherColorStops, "nativeSetWeatherColorStops"),
METHOD(&NativeMapView::getWeatherColorStopCapacity, "nativeGetWeatherColorStopCapacity"),
METHOD(&NativeMapView::advanceRasterArraySourceFieldWindow, "nativeAdvanceRasterArraySourceFieldWindow"),
METHOD(&NativeMapView::repeatRasterArraySourceFieldWindow, "nativeRepeatRasterArraySourceFieldWindow"),
METHOD(&NativeMapView::submitRasterArraySourceHostField, "nativeSubmitRasterArraySourceHostField"),

View File

@@ -285,6 +285,7 @@ public:
jni::jboolean setStyleLayerVisibility(JNIEnv&, const jni::String&, jni::jboolean);
jni::jboolean setRasterParticleColors(JNIEnv&, const jni::String&, const jni::Array<jni::jfloat>&, const jni::Array<jni::jfloat>&);
jni::jboolean setWeatherColorStops(JNIEnv&, const jni::String&, const jni::Array<jni::jfloat>&, const jni::Array<jni::jfloat>&);
jni::jint getWeatherColorStopCapacity(JNIEnv&);
jni::jboolean advanceRasterArraySourceFieldWindow(JNIEnv&, const jni::String&);
jni::jboolean repeatRasterArraySourceFieldWindow(JNIEnv&, const jni::String&);
jni::jint submitRasterArraySourceHostField(JNIEnv&,